PHP 4.0 Bug #6700 Updated: Problem With Objects as Session Variables

From: Date: Wed, 13 Sep 2000 22:21:17 +0000
Subject: PHP 4.0 Bug #6700 Updated: Problem With Objects as Session Variables
Groups: php.dev 
Request: Send a blank email to php-dev+get-33155@lists.php.net to get a copy of this message
ID: 6700 Updated by: sniper Reported By: dkm@cwcom.net Status: Closed Bug Type: *Session related Assigned To: joey Comments: Closed. (config error by user) --Jani Previous Comments: --------------------------------------------------------------------------- [2000-09-13 18:17:43] dkm@cwcom.net I' ve found the problem. My php.ini had "session.auto_start = On" which was causing the session to be started before the class definition was available. So the problem was stated in the error message after all. Perhaps there is an argument for insisting that users always post their php.ini, or at least the parts that are relevant to their problem. Thanks for your help. David Marley --------------------------------------------------------------------------- [2000-09-12 23:37:31] joey@php.net Assigning to me unless someone has an answer ready. --------------------------------------------------------------------------- [2000-09-12 23:36:25] joey@php.net Ooops. Looks like we were editing at the same time! :) I'll look into this. --------------------------------------------------------------------------- [2000-09-12 23:31:12] joey@php.net Your problem is stated right in the error message. PHP needs the class definition to be loaded in order to reconstruct the object. In other words: sencond.php needs person.inc, also --------------------------------------------------------------------------- [2000-09-12 23:30:56] dkm@cwcom.net I missed out the require statement in second.php. The actual script is: second.php ========== <? require("person.inc"); session_start(); ?> <html> <head> <title>Second</title> </head> <body> <? $aperson->display_details(); ?> </body> </html --------------------------------------------------------------------------- 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=6700

« previous php.dev (#33155) next »