session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied (13)


#1

Hi,

I’m running DreamFactory on Debian and regularly face this error. Not only is it annoying, it also terminates active sessions.
This is something that should not happen unless the PHP-application overrides the “session.gc_probability = 0” setting from the php.ini.

What exactly does DF do here?


#2

On what version of PHP are you running DSP 1.9.1 when you get this error?


#3

This is a common issue on Debian and its derivatives, because Debian uses a cron job for session cleanup rather than leaving it to Apache/PHP like other environments typically do. Typically this error is seen because the default permissions of the sessions directory aren’t configured for this, and eventually there is a garbage collection conflict.

A quick Google search provides two possible ways of resolving this. (There may be more.)

  1. Change permissions on the directory in question.
  2. Edit garbage collection probability setting in php.ini.