session_decode from session handler

From: Date: Thu, 19 Jul 2007 16:44:24 +0000
Subject: session_decode from session handler
Groups: php.general 
Request: Send a blank email to php-general+get-259179@lists.php.net to get a copy of this message
I'm having an issue getting session_decode to work from my session handler in PHP 5.2.3. Here's a short code snippet that demonstrates what I'm trying to do (from my read handler) - public function read($id) { .... var_dump($data); // prints out the serialized session correctly $retval = session_decode($data); var_dump($_SESSION); // prints out "array(0) {}" echo $retval; // prints false return $data; } In my calling function, $_SESSION is updated with everything that was held in $data, which means that $data was not corrupt - it worked when I returned it, but it did not work when I used session_decode. This is a problem because I want to change my read($id) function so that it decodes $data, adds something extra to the $_SESSION, then re-encodes $data and returns it. Thanks, - Ryan ____________________________________________________________________________________ Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.com/

« previous php.general (#259179) next »