php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5784 serialize/unserizalize and objects
Submitted: 2000-07-25 20:20 UTC Modified: 2000-07-26 13:33 UTC
From: mausz at flyingdog dot de Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.1pl2 OS: RH Linux on PPC
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mausz at flyingdog dot de
New email:
PHP Version: OS:

 

 [2000-07-25 20:20 UTC] mausz at flyingdog dot de
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!

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-26 13:33 UTC] stas@php.net
Fixed in CVS.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 11:00:01 2026 UTC