RE: [PHP] How do I prevent a session from rebuilding itself?
| From: | Daevid Vincent | Date: | Wed, 12 Jul 2006 23:20:08 +0000 |
| Subject: | RE: [PHP] How do I prevent a session from rebuilding itself? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-239398@lists.php.net to get a copy of this message | ||
> Sequence of events:
> script starts
> you rm -rf /tmp/sess_*
> script writes out data
> script ends
>
> Exactly WHAT do you think "should" happen in this case?...
I expect this to work like it USED TO WORK! Bug or not.
I expect:
Script starts
Calls session_start(1234)
No existing sess_1234 file.
Creates a new EMPTY sess_1234
I make $_SESSION['authorized'] = true and PHP writes at that time
I rm /tmp/sess_1234
Script ends
Page load again.
Calls session_start(1234).
No existing sess_1234 file.
Creates a new EMPTY sess_1234
Therefore $_SESSION['authorized'] doesn't exist == false
But what happens is that PHP actually is writing a new sess_1234
WITH ALL THE SHIT IT HAD IN RAM
*sigh*
Why is this so complicated for anyone to understand?