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

From: Date: Mon, 27 Nov 2000 13:51:03 +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-39260@lists.php.net to get a copy of this message
ID: 7530 Updated by: sniper Reported By: ori@chikki.net Status: Closed Bug Type: *Session related Assigned To: Comments: Should be fixed in CVS. Please try latest snapshot from http://snaps.php.net/ and reopen this bug report if this doesn't work with it. --Jani Previous Comments: --------------------------------------------------------------------------- [2000-11-27 08:50:54] sniper@php.net Should be fixed in CVS. Please try latest snapshot from http://snaps.php.net/ and reopen this bug report if this doesn't work with it. --Jani --------------------------------------------------------------------------- [2000-11-01 07:12:10] ori@chikki.net The entire script I used is long - here is a summary: <? class Counter { var $counter; function add() { return $this->counter++; } } session_start(); session_register("SESSION"); /* initialise the SESSION variable if necessary */ if (!isset($SESSION)) { $SESSION = array(); } /* initialise the Counter objct if necessary */ if (!isset($SESSION["Counter"])) { $SESSION["Counter"] = new Counter; } echo "Visits using normal variables: " . $SESSION["visit"]++; echo "<BR>"; echo "Visits using classes: " . $SESSION["counter"]->add; ?> Ori --------------------------------------------------------------------------- [2000-11-01 06:59:59] andi@php.net Can you create a small reproducing script? That would help out a lot. --------------------------------------------------------------------------- [2000-11-01 06:52:03] ori@chikki.net recompiled using the 4.0.3pl1 and the register_globals in on. There is still a problem with objects in the $SESSION array. If you need to take a look at the application - I may be able to allow access to HTTP on my linux box. --------------------------------------------------------------------------- [2000-11-01 06:40:56] stas@php.net You may want also to check your register_globals setting... --------------------------------------------------------------------------- The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online. Full Bug description available at: http://bugs.php.net/?id=7530

« previous php.dev (#39260) next »