• Hello,

    I have come across a problem and have found the solution also, just wanted to share fix:

    Error: An active PHP session was detected” critical warning in wordpress. rest api.

    Fix:

    Open and find: /wp-content/plugins/free-vehicle-data-uk/classes/FreeVehicleData.php

    Search for:

    if( !session_id() ){
    session_start();
    }
    return self::$Instance;
    }

    REPLACE WITH:

    if (session_status() == PHP_SESSION_NONE) {
    session_start([
    ‘cookie_lifetime’ => 86400,
    ‘read_and_close’ => true,
    ]);
    } return self::$Instance;
    }

Viewing 1 replies (of 1 total)
  • This caused a ‘Critical Error’ on the website
    Something’s not 100% correct.
    Edit, changed the
    ‘cookie_lifetime’ => 86400,
    ‘read_and_close’ => true,
    to
    ‘cookie_lifetime’ => 86400,
    ‘read_and_close’ => true,

    The (‘) was in an incorrect format.
    Still have to try with an active subscription now.

    • This reply was modified 7 months, 3 weeks ago by Torchy.
Viewing 1 replies (of 1 total)

The topic ‘New – ACTIVE PHP SESSION, REST API ERROR Site Health’ is closed to new replies.