RE: [PHP] Session cleanup
| From: | John W. Holmes | Date: | Mon, 14 Oct 2002 15:21:11 +0000 |
| Subject: | RE: [PHP] Session cleanup | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-119912@lists.php.net to get a copy of this message | ||
> I was wondering why a session doesn't automatically get cleaned up
after
> the maximum life time? Default to 1440 (24 min) session is still there
> until I start a new session then it disappears. Is there a simple
script
> to run via cron to clean up old sessions?
That's how garbage cleanup works. There has to be a request to the
server in order to trigger the cleanup (someone has to come to one of
your pages). The gc_probability is the percentage chance the garbage
cleanup will be triggered when there is a request. You can write your
own cron script if you want, but I'd just let PHP handle it.
---John Holmes...