I'm currently working on a new Application using (among other things) Zend_Auth but, for whatever reason, this Error Message is showing up at any location totally randomly (or so it seams)
Zend_Session::start()
- /home/hannes/workspace/develop/library/Zend/Session.php(Line:480): Error #8session_start()
[function.session-start]: ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied (13) Array
Apparently this issue is affecting mostly (only?) debian/ubuntu based systems and has to do with automatic session garbage collection.
The variable session.gc_probability was set to 1 in the php.ini which means there is a 1% probability for the garbage collector to run and clean up the directory /var/lib/php5 where the php sessions are stored.
Apparently this folder is not writable by www-data resulting in the mentioned error and throwing the Zend exception. Setting session.gc_probability to 0 solved the problem. The session folder is cleaned up by a cron job anyway, so no need for the php garbage collector to even run.
From http://somethingemporium.com/2007/06/obscure-error-with-php5-on-debian-ubuntu-session-phpini-garbage
A solution is to set the session.save_path in the php.ini file to a writable directory. for example: session.save_path = "/tmp". Switching the session garbage collection off in the first example is not a good idea. The second example does not work on Ubuntu 10.04
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With