we have had extensive experience with this, and it
seems that the above bug only occurs while
register_globals is OFF. when it's on everything works
as expected.
Previous Comments:
------------------------------------------------------------------------
[2003-05-20 17:53:40] goth at php-resource dot de
Yes I am very sure that php4-STABLE-200302071830 worked properly with
the stated code above ... !
Another Question ... what does R:1 mean in this serialization??
A|i:10;B|R:1;
------------------------------------------------------------------------
[2003-05-20 17:38:00] s...@php.net
Not reproducible. I tried this with 4.2.3, 4.3.1 and current 4_3 CVS.
The references between $_SESSION entries are never reestablished.
Additionally, I tried a cvs checkout -r PHP_4_3_0 -D 2/7/2003 with the
same negative result.
So, are you absolutely sure that you have some code where this works?
Did you use register_globals = on?
------------------------------------------------------------------------
[2003-02-17 07:19:16] goth at php-resource dot de
Hello,
probably a hint:
my php4-STABLE-200302071830 works fine ...
php430 does not ... so as php4-STABLE-200302162230
------------------------------------------------------------------------
[2003-02-16 21:29:16] goth at php-resource dot de
Hello,
I've got a Problem unserializing variables which are a reference. An to
me it seems to be a bug ... !
Example:
session_start();
$_SESSION["A"]=10;
$_SESSION["B"]=&$_SESSION["A"];
is correctly serialized to:
A|i:10;B|R:1;
I am happy ... ;)
But if I call this session again ... maybe the next page PHP seems to
loose the information that B was a reference.
Example:
session_start();
echo "BEFORE: A=".$_SESSION["A"]."<br />";
echo "BEFORE: B=".$_SESSION["B"]."<br />";
$_SESSION["A"]++;
echo "AFTER: A=".$_SESSION["A"]."<br />";
echo "AFTER: B=".$_SESSION["B"]."<br />";
It results to:
BEFORE: A=10
BEFORE: B=10
AFTER: A=11
AFTER: B=10
where I thought of A and B having the same value ... for B beeing a
reference to A ...
@sniper: Please don't answer ... your arrogant (and almost dumb)
answers cause me one heart-attack after the other ... !!!!!!
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22245&edit=1