#19243 [Opn->Fbk]: Seg Fault Restoring Session Variables with References to Objects
| From: | kalowsky@php.net | Date: | Fri, 06 Sep 2002 14:38:56 +0000 |
| Subject: | #19243 [Opn->Fbk]: Seg Fault Restoring Session Variables with References to Objects | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-18578@lists.php.net to get a copy of this message | ||
ID: 19243
Updated by: kalowsky@php.net
Reported By: fdruseikis@sc.rr.com
-Status: Open
+Status: Feedback
Bug Type: Session related
Operating System: Linux RH 7.0
PHP Version: 4.2.2
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-latest.zip
Once again, as code has changed yet again. Give it a try. :)
Previous Comments:
------------------------------------------------------------------------
[2002-09-06 09:24:22] fdruseikis@sc.rr.com
To elaborate on what I see: In php4.3.0-dev If there are any references
within an array/object you don't serialize it. Otherwise it is
serialized.
So, array( 1, 2, 3) and array( new TFoo(1), new TFoo(2) )
save and restore. However, in php4.3.0-dev
global $a;
$a = array(null,null)
$a[0] =& new TFoo(1);
$a[1] =& $a[0];
$a serializes as null.
This would be a change from 4.2.2, which permits this latter example
(but segfaults on the global $o1, $o2 of the original bug report). In
4.2.2 $a example does not segfault and the restored array has
references to the same object instance.
Did you want to take away functionality?
------------------------------------------------------------------------
[2002-09-06 08:16:38] fdruseikis@sc.rr.com
Also: doesn't save/restore arrays either.
------------------------------------------------------------------------
[2002-09-06 08:03:59] fdruseikis@sc.rr.com
I tried the script on this build: php4-200209060300 (linux)
No segfault.
However, both variables $o1 and $o2 are saved (and restored) as null.
This results in a "Fatal Error: Call to a member function on a
non-object in ..."
Both $o1 and $o2 should refer to the original (singleton) object
instance.
------------------------------------------------------------------------
[2002-09-05 16:48:14] kalowsky@php.net
keeping set as feedback
------------------------------------------------------------------------
[2002-09-05 16:41:24] fdruseikis@sc.rr.com
I'll give it a try.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/19243
--
Edit this bug report at http://bugs.php.net/?id=19243&edit=1