From: [EMAIL PROTECTED] Operating system: LINUX PHP version: 4CVS-2003-02-16 (stable) PHP Bug Type: Session related Bug description: Unserialize Problem with References:
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 bug report at http://bugs.php.net/?id=22245&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22245&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22245&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22245&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22245&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22245&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22245&r=support Expected behavior: http://bugs.php.net/fix.php?id=22245&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22245&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22245&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22245&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22245&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22245&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22245&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22245&r=gnused