From:             r2cosmin at rdstm dot ro
Operating system: windows xp
PHP version:      5.0.0b3 (beta3)
PHP Bug Type:     Zend Engine 2 problem
Bug description:  crash serializing objects with recursive references

Description:
------------
Php craches when trying to serialize objects with deep recursive
references. It only works with two objects, each having a reference to the
other. When using three or more objects in a circular chain, it crashes
badly.

I have written a simplified example for help.

Thanks.

PS.
     I have found this bug ( and bug reports on it ) in the past but it
doesn't seem to be fixed. Maybe it has reapered in php5. 

Reproduce code:
---------------
<?
class A
{
        public $b;
}
class B
{
        public $c;
}
class C
{
        public $a;
}
$a = new A();
$b = new B();
$c = new C();
$a->b = $b;
$b->c = $c;
$c->a = $a;
echo serialize($a);
?>

Expected result:
----------------
some serializaton string

Actual result:
--------------
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.

Please contact the server administrator, [EMAIL PROTECTED] and inform them
of the time the error occurred, and anything you might have done that may
have caused the error.

More information about this error may be available in the server error
log.


--------------------------------------------------------------------------------

Apache/2.0.45 (Win32) Server at 127.0.0.1 Port 80

-- 
Edit bug report at http://bugs.php.net/?id=26778&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26778&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26778&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26778&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26778&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26778&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=26778&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=26778&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26778&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26778&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26778&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26778&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26778&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26778&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26778&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26778&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26778&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26778&r=float

Reply via email to