You are here: Re: When do session files get erased? « PHP Programming Language « IT news, forums, messages
Re: When do session files get erased?

Posted by Alvaro G. Vicario on 07/07/06 18:22

*** ImOk escribió/wrote (7 Jul 2006 10:45:07 -0700):
> I have cookies enabled. I clear the cookies, but when to the session
> files eventually get erased?
>
> Does PHP check the sessions folder everytime for expired sessions and
> erase them?

Not every time, just randomly.

The behaviour is defined by these directives:

session.gc_probability
session.gc_divisor
session.gc_maxlifetime

From manual:

"session.gc_divisor coupled with session.gc_probability defines the
probability that the gc (garbage collection) process is started on every
session initialization. The probability is calculated by using
gc_probability/gc_divisor, e.g. 1/100 means there is a 1% chance that the
GC process starts on each request. session.gc_divisor defaults to 100."


--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация