PHP 4.0 Bug #5784: serialize/unserizalize and objects

From: Date: Tue, 25 Jul 2000 18:20:02 +0000
Subject: PHP 4.0 Bug #5784: serialize/unserizalize and objects
Groups: php.dev 
Request: Send a blank email to php-dev+get-26040@lists.php.net to get a copy of this message
From: mausz@flyingdog.de Operating system: RH Linux on PPC PHP version: 4.0.1pl2 PHP Bug Type: Scripting Engine problem Bug description: serialize/unserizalize and objects None of our PHP scripts are working anymore in this PHP version! $o->name="test"; $x=serialize($o); $o=unserialize($x); echo $o->name; Prints out a "Fatal error: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition stdClass of the object you are trying to operate on was loaded _before_ the session was started in /usr/local/apache/htdocs/test.php3 on line 9" The following exaples are working: $o->name="test"; echo $o->name; and class test { } $o=new test; $x=serialize($o); $o=unserialize($x); echo $o->name; In PHP 4.0.0 this works ok!

« previous php.dev (#26040) next »