Bug #15385 Updated: Nested Objects in session crash Both Apache and IIS

From: Date: Fri, 15 Feb 2002 12:45:49 +0000
Subject: Bug #15385 Updated: Nested Objects in session crash Both Apache and IIS
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-351@lists.php.net to get a copy of this message
ID: 15385 Updated by: michal.matula@billboard.cz -Reported By: dastolfo@smart.it +Reported By: michal.matula@billboard.cz Status: Open Bug Type: Session related Operating System: Linux & Win2K PHP Version: 4.1.1 New Comment: Hi, don't know whether it is related but he have a similar problem. We inicialize a lot of objects with other nested objects in them. After some number of objects inicialized is reached, the apache child process crashes with Apache(Linux): child pid xxxxx exit signal Segmentation fault. It has definitely something to do with objects, their creation or cleanup as unsetting the object does not help, but not creating the nested objects does. Previous Comments: ------------------------------------------------------------------------ [2002-02-05 06:59:15] dastolfo@smart.it Operating Systems: - Linux (with Apache) - Win2k (with both Apache and IIS) I have a script with two object, one that has the reference to the other. Once the objects are initialized I put them in session before the parent and then the child. If I reload the page, accessing the child object and modifying a property, after 2-3 times I receive a server error on php module. On IIS: ACCESS VIOLATION XXXXXX On Apache(Linux): child pid xxxxx exit signal Segmentation fault If I invert the two session_register (registering before the child object and then the parent), it all works perfectly. <? class Nephew { var $name = "-"; } class Family { var $nephew = null; function setNephew(&$n) { $this->nephew = &$n; } function toString() { if($this->nephew) { echo "The nephews are " . $this->nephew->name."<br>"; } else { echo "No nephews<br>"; } } } session_start(); if(!isset($family)) { $family = new Family(); $nephew = new Nephew(); $family->setNephew(&$nephew); session_register('family'); session_register('nephew'); } $nephew->name .= " - "; ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15385&edit=1

« previous php.bugs (#351) next »