PHP 4.0 Bug #7530 Updated: Session does not store Objects

From: Date: Wed, 01 Nov 2000 10:43:26 +0000
Subject: PHP 4.0 Bug #7530 Updated: Session does not store Objects
Groups: php.dev 
Request: Send a blank email to php-dev+get-36610@lists.php.net to get a copy of this message
ID: 7530 User Update by: ori@chikki.net Status: Feedback Bug Type: *Session related Description: Session does not store Objects Sample code as follows: ______________________________________________ // The Class class Count { var $counter; function add() { return $this->count++; } }// End class ______________________________________________ // The session // start up the sessions - use SESSION Array session_start(); session_register("SESSION"); /* initialise the Count objct if necessary */ if (!isset($SESSION["Count"])) { $SESSION["Count"] = new Count; } The problem is when trying to manipulate $SESSION["Count"]->add() - which does the required calculations, but does store the session for later use (the /tmp/sess_***** file). Previous Comments: --------------------------------------------------------------------------- [2000-11-01 02:18:46] andi@php.net Also can you please check the latest snapshot from snaps.php.net to see if it works for you now? --------------------------------------------------------------------------- [2000-10-30 09:51:30] stas@php.net Surely sessions can include objects. Please provide short script that reproduces behaviour that you do not like. --------------------------------------------------------------------------- [2000-10-30 09:38:01] ori@chikki.net Session do not store objects! They are deleted and does not appear in the /tmp/sess_************ file associated with the session. This does not affect normal session variables. Downgrading to PHP4.0.2 solved the problem. --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=7530

« previous php.dev (#36610) next »