Re: sessions and garbage collection
| From: | Charles Killian | Date: | Wed, 13 Sep 2000 06:50:55 +0000 |
| Subject: | Re: sessions and garbage collection | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-16508@lists.php.net to get a copy of this message | ||
You don't need to manually invoke the gc process. It is invoked
automatically but only a percentage of the time.
Right now your session.gc_probability is probably set to 1, which means out
of ever 100 times you use sessions the gc routine is only called once. Or
actually the probability of gc being called is 1% each time sessions are
invoked.
Set
session.gc_probability = 100
and
session.gc_maxlifetime = 10
and you'll see your session disappear.
Also, call
error_reporting(E_ALL);
in your script to see the gc warnings.
Charles
----- Original Message -----
Sent: Tuesday, September 12, 2000 11:18 PM
Subject: [PHP] sessions and garbage collection
I think I'm not understanding the garbage collection concept with sessions.
When a session is created, a session file is stored in my /tmp directory.
What I want to know is, does this gc process delete these files once they
are older than the session.gc_maxlifetime? What do I have to do to invoke
the gc process?
Is this a manual process that I must take to delete these session files?
I've set the session.gc_maxlifetime to 10 seconds just to see what might
happen.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net