session start error (with fix)
-
I occasionally get this error:
The session id is too long or contains illegal characters, valid characters are a-z, A-Z, 0-9 and ‘-,’
The issue seems to be the “Agp_SessionAbstract.class.php” file. I was able to fix this by making this change to the constructor (check for valid session_start and regenerate the ID if not valid):
public function __construct() {
if (!session_id()) {
$ok = @session_start();
if ( !$ok ) {
session_regenerate_id(true); // replace the Session ID
session_start();
}
}
$this->name = strtolower(get_class($this));
}
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘session start error (with fix)’ is closed to new replies.