#34862 [NEW]: Variable's session data cannot be modified

From: Date: Thu, 13 Oct 2005 21:12:00 +0000
Subject: #34862 [NEW]: Variable's session data cannot be modified
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-86560@lists.php.net to get a copy of this message
From: Lhunath at Pandora dot Be Operating system: Linux Gentoo PHP version: 5.0.5 PHP Bug Type: Session related Bug description: Variable's session data cannot be modified Description: ------------ After a variable has been stored in the session file, it's content is available and visible in the file. However, when later the variable's content is altered; the file's content is not. It remains the same initial value. Because of this, the modification is lost. (the session file can be altered in this way: new variables can be added with their value. the session file cannot be altered in this way: existing variables in the file cannot have their value changed) Reproduce code: --------------- Avaria tmp # cat page1.php <?php session_start(); $_SESSION["test"] = "1"; ?> <a href="page2.php?t=2">go to page 2</a> Avaria tmp # cat page2.php <?php session_start(); if($t) $_SESSION["test"] = $_REQUEST["t"]; echo $_REQUEST["t"]; echo $_SESSION["test"]; ?> <a href="page3.php">go to page 3</a> Avaria tmp # cat page3.php <?php session_start(); echo $_SESSION["test"]; ?> Expected result: ---------------- go to page 2 22go to page 3 2 Actual result: -------------- go to page 2 21go to page 3 1 -- Edit bug report at http://bugs.php.net/?id=34862&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34862&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34862&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34862&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34862&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34862&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34862&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34862&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34862&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34862&r=support Expected behavior: http://bugs.php.net/fix.php?id=34862&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34862&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34862&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34862&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34862&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34862&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34862&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34862&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34862&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34862&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34862&r=mysqlcfg

« previous php.bugs (#86560) next »