New – ACTIVE PHP SESSION, REST API ERROR Site Health
-
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)
Viewing 1 replies (of 1 total)
The topic ‘New – ACTIVE PHP SESSION, REST API ERROR Site Health’ is closed to new replies.