View Single Post
Old 12-30-2007, 06:09 PM   #2 (permalink)
Wildhoney
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

I would assume by that error that you're actually trying to enforce a session ID yourself? I have heard of no problems since around PHP 4 of PHP issuing invalid characters. I know there was an issue in PHP of the session ID sometimes being null.

You could do the following, but I wouldn't recommend it because if there's a function you've written that's not performing well, then you'll want to correct it. For example, if the session ID is set as all invalid characters then the following would leave you with an empty session.

php Code:
$szSessionId = session_id();
$szSessionId = preg_replace('~[^a-z0-9]~', '\\1', $szSessionId);
session_id($szSessionId);
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote