Re: Sessions: All those little files
| From: | Chris O'Brien | Date: | Wed, 07 Nov 2001 21:43:14 +0000 |
| Subject: | Re: Sessions: All those little files | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-73809@lists.php.net to get a copy of this message | ||
I believe the directive session.gc_maxlifetime can be used to set the amount
of time those files live in the /tmp directory. We have ours set to 7200. If
a visitor is on for more than 2 hours, they will find themselves
automagically logged out, but no one has complained yet.
> So, my /tmp directory is filled with files:
>
> sess_asdflkje9ja0943jl09jfljef
>
> (or whatever the sessid happens to be)
>
> They are dated back to October 30.
>
> How can I get these to be cleared out? Do I have to write a cron-job to
> clear them?
>
> If so, anyone have any suggestions?
>
> If someone suggests session_destroy() how can I ensure that every person who
> visits my website hits a page that calls this. I mean, I can have a 'logout'
> button or something but there will countless people who don't use that.
* Chris O'Brien (clobrien@excel.net)
* Excel.Net,Inc. - http://www.excel.net/
* (920) 452-0455 - Sheboygan/Plymouth area
* (888) 489-9995 - Other areas, toll-free