Re: [PHP4BETA] Session vars in /tmp/sess_*: how long? how removed?
| From: | Chris Shenton | Date: | Wed, 15 Mar 2000 22:56:02 +0000 |
| Subject: | Re: [PHP4BETA] Session vars in /tmp/sess_*: how long? how removed? | ||
| References: | 1 2 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-12185@lists.php.net to get a copy of this message | ||
On Wed, 15 Mar 2000 20:43:42 +0100, Sascha Schumann <sascha@schumann.cx> said:
Sascha> Do you mean application variables? If you really mean session
Sascha> variables, the following paragraphs apply:
Sascha> Session: The period of time a user interacts with a web site
Sascha> incessantly.
When a user connects, if they have no session variable $Userid I have
them authenticate then session_register(Userid). I check this each
time they return to the application to ensure it's instantiated so
folks can't steal identies and such.
The application tends to be long duration, as it is used to upload
large files (e.g. 50MB) sometimes from users on 28.8 modem lines.
What I'm noticing is that after authenticating, session_register()ing,
they do the upload but by the time the upload completes the PHP can no
longer find their session variable. It appears PHP or Apache has blown
away the /tmp/sess_* file which maintains the session variables.
Sascha> A session object is automatically deleted, when the session
Sascha> ends. The assumption that a session object should last
Sascha> forever is wrong.
How does it know when a session ends? I do have a "logout" feature
which removes the session variables and such, but if they don't run
this, presumably their session state should stay on the server as
/tmp/sess_* files forever.
But they're not: there are a finite number of such files so something
is removing them periodically. I don't know what does this and I guess
that's the beast I'm looking for.
Thanks for any pointers!