Obscure error with PHP5 on Debian/Ubuntu
With Debian's or Ubuntu's php5 package, you might receive this error when you call session_start():
But, other php5 packages (like php5-cli) don't have garbage collection disabled. If you're seeing this error, it's most likely you've just mixed up your php.ini files (or copy pasted one from somewhere). To fix things, find where your php.ini file is (phpinfo() is handy). This is usually /etc/php5/apache2/php.ini. Then edit it, and change session.gc_probability from whatever it is (most likely 1) to 0. Save, and restart Apache.
ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied (13) in /your/file/here on line 30Frustratingly, if you do receive this error, you'll only get it once every hundred page loads on average. Which points to the cause of the problem: automatic session garbage collection. In Debian and Ubuntu, /var/lib/php5, where the session data is stored, has permissions of drwx-wx-wt and should only be cleaned by a cron script. So, the package maintainers disable automatic session garbage collection.
But, other php5 packages (like php5-cli) don't have garbage collection disabled. If you're seeing this error, it's most likely you've just mixed up your php.ini files (or copy pasted one from somewhere). To fix things, find where your php.ini file is (phpinfo() is handy). This is usually /etc/php5/apache2/php.ini. Then edit it, and change session.gc_probability from whatever it is (most likely 1) to 0. Save, and restart Apache.