PHP 4.0 Bug #6941 Updated: References are not maintained through sessions
| From: | Bug Database | Date: | Sat, 30 Sep 2000 06:56:11 +0000 |
| Subject: | PHP 4.0 Bug #6941 Updated: References are not maintained through sessions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-33900@lists.php.net to get a copy of this message | ||
ID: 6941
Updated by: sas
Reported By: robert.hartman@eyeo.com
Status: Closed
Bug Type: *Session related
Assigned To:
Comments:
PHP does not segfault anymore when trying to serialize circular references.
Note however that the serializer won't support serializing references anytime soon. If you
think you cannot live without that, feel free to post a feature request.
Thanks for reporting this issue.
Previous Comments:
---------------------------------------------------------------------------
[2000-09-29 12:39:36] robert.hartman@eyeo.com
PHP causes httpd to segfault with the following scripts. Basically,
we feel that when the objects get restored at session_start the
references are no longer valid.
Apache Error Log:
[Thu Sep 28 19:55:57 2000] [notice] child pid 255 exit signal Segmentation fault (11)
=== file 1 ===
<?
class parentClass {
var $child;
var $relation = "mother";
function makeChild() {
$this->child = new ChildClass($this);
}
}
class childClass {
var $parentLink;
function childClass(&$parent) {
$this->parentLink = &$parent;
}
}
session_start();
session_register("mom");
$mom = new parentClass;
$mom->makeChild();
?>
<html>
<?
echo $mom->child->parentLink->relation . "<br>";
?>
<a href="next.phtml">next</a>
</html>
=== file 2 ===
<?
class parentClass {
var $relation = "mother";
}
class childClass {
var $parentLink;
function childClass(&$parent) {
$this->parentLink = &$parent;
}
}
session_start();
session_register("mom");
?>
<html>
<?
echo $son->parentLink->relation . "<br>";
?>
<a href="next.phtml">next</a>
</html>
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=6941