From: [EMAIL PROTECTED] Operating system: Linux & Win2K PHP version: 4.1.1 PHP Bug Type: Session related Bug description: Nested Objects in session crash Both Apache and IIS
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 bug report at http://bugs.php.net/?id=15386&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=15386&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=15386&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=15386&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=15386&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=15386&r=support Expected behavior: http://bugs.php.net/fix.php?id=15386&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=15386&r=notenoughinfo -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php