|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-10-13 23:21 UTC] tony2001@php.net
[2005-10-13 23:41 UTC] Lhunath at Pandora dot Be
[2005-10-13 23:44 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 14:00:02 2025 UTC |
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