[Solar-talk] Adapter-aware session package

Rodrigo Moraes rodrigo.moraes at gmail.com
Sat Nov 10 11:12:38 CST 2007


This solved an old mystery for me today:

"Note that for security reasons the Debian and Ubuntu distributions of
php do not call _gc to remove old sessions, but instead run
/etc/cron.d/php*, which check the value of session.gc_maxlifetime in
php.ini and delete the session files in /var/lib/php*." [1]

I never thought that debian/ubuntu were cleaning up the session dir
based on a cron job, and of course this explained why I never got
persistent sessions working on local/online servers. It is very simple
and perhaps obvious, but intrigued me for such a long time. :(

So, now with session adapters I can override the debian/ubuntu
behaviour and forget about the cron job cleaning up sessions, right?
Do you recommend memcache to store, for example, user login sessions?
Or...?

-- rodrigo

[1] http://php.net/manual/en/function.session-set-save-handler.php#69763


More information about the Solar-talk mailing list