|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-06-06 18:32 UTC] tlewis at communitysoft dot net
New sessions are created instead of using current session. Everytime a session_start() is encountered, PHP creates a new session ID thus losing the value(s) from the preferred session. To reproduce: call the session_start() function, register a variable with session_register('foo'), try and access the variable on a succession page using session_start(), go into where ever directory you are storing your session files. There will be multiple files listed. One having data, the other(s) being empty.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 13:00:01 2025 UTC |
I have experienced exactly the same problem. To reproduce this error: // file1 code <? session_start(); session_register("sess1"); $sess1 = "the first session is registered"; ?> // file2 code <? session_start(); echo "Session1 var: $sess1 "; ?> if file2 is called by file1 via a java non html menu then file2 creates a new session without the variables. Thuis one cannot make use of the session variables.