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

From: Date: Wed, 01 Nov 2000 12:12:10 +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-36625@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 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 Previous Comments: --------------------------------------------------------------------------- [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... --------------------------------------------------------------------------- [2000-11-01 06:25:05] stas@php.net Works for me in latest version. Please try it. --------------------------------------------------------------------------- [2000-11-01 06:06:03] ori@chikki.net Andi - I checked the latest version you recommended - but I cannot evaluate it since the support for mySQL does not seem to work properly. Ori --------------------------------------------------------------------------- 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 (#36625) next »