Updating session variables
Thus, once the user arrives at the member's only page, PHP won't be able to identify the user.
Their session variable is still there, but PHP won't give it to a stranger.
The symptom was that every page or refresh of the same page generated a new session, and obviously no variables were passed from page to page. scid=kb; EN-US;316112 I'm working on PHP 4.2.3 with Apache 1.3.9 and I've got the problem mentioned above.
After logging in I do the simple session_start() $_SESSION['user'] = $_POST['login'] and as for that everythings fine.
However, if I reboot my machine, I must send the debug output again.
Note to self: Perhaps there is a way of sending some data to the browser that will instantiate the session but clear the buffer before sending the 'real' data? I thought it was a coding mistake, but it turns out to be a problem with PHP / IIS. If your symptoms are that the first time it does not work and then hit the back button in the browser and try again and it works, then it is probably this.
But when changing from test.php, where above code is stored, into another page during the same session the variable appears to be empty!
After checking session_is_registered() I redirect to a url using header().
When I moved the file to my hosting provider, the SESSION variables were lost.