Re: Destroying session data
| From: | John Holmes | Date: | Thu, 23 Dec 2004 20:56:53 +0000 |
| Subject: | Re: Destroying session data | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-205100@lists.php.net to get a copy of this message | ||
> From: Philip Thompson <prthomp@uark.edu>
> My question is: when the session is "logged out" or ended (via closing
> the browser or however), should these data files (which look like
> sess_fd983aedf93ceeioa8332890bcd, etc) not be destroyed? If not, is
> there a way to automatically destroy them because I don't want to have
> to go in each day/week/month and delete these session data files
> manually? Are these data files considered to be cookies?
They are not cookies and they should be deleted automatically by the garbage collection process.
However, by default, there is only a 1% chance that the garbage collection process is triggered when
a session is started. So, if this is a low traffic server, you may not have triggered garbage
collection at all. They are not deleted automatically when the session is ended.
You can up the probability, if you want, but I wouldn't worry too much about it. Or you can
write your own session handler to handle deleting the files.
---John Holmes...
UCCASS - PHP Survey System
http://www.bigredspark.com/survey.html