Currently, after 10 days or so after cleaning up my /tmp/cook directory, there are 3657 session files
vm645:/tmp/cook# ls | wc -l
3657
so I assumed they're not cleaned up itself.
Snippet of my php.ini
session.save_path = "/tmp/cook"
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
so I assume it should be cleaned automatically. I think this one is also related with cleaning up
; After this number of seconds, stored data will be seen as 'garbage' and
; cleaned up by the garbage collection process.
; http://php.net/session.gc-maxlifetime
session.gc_maxlifetime = 1440
session.gc_probability = 0
session.gc_divisor = 1000
am I missing something? What do I need set in order to force PHP clean up that directory after a while (but not to kill live sessions?)
My PHP version is PHP 5.3.3-7+squeeze3 with Suhosin-Patch (cli) (built: Jun 28 2011 08:24:40)
atimeupdates, which may not happen. – David Schwartz Sep 20 '11 at 13:14session.gc_probabilityandsession.gc_divisor? – quanta Sep 20 '11 at 13:23