session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5) failed:

3 posts by 2 authors in: Forums > CMS Builder
Last Post: June 28, 2012   (RSS)

By rjbathgate - June 27, 2012

Hi,

On one particular server where I have CMSB installed, I sometimes get this error:

session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5) failed:

I've read all up about it and solutions require editing of server config...
(http://forum.kohanaframework.org/discussion/565/garbage-collector-error-with-sessions-on-debian/p1)

However this particular server I have no access whatsoever to anything configuration-wise.

Reading this:
http://www.interactivetools.com/forum/gforum.cgi?post=82999;search_string=ps_files_cleanup_dir%3A;#82999

Suggests that the bug would have been fixed by now (this was v 2.06)...

Any suggestions on how to fix with v2.15 with no access to php.ini etc?

Thanks

Re: [rjbathgate] session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5) failed:

By Jason - June 28, 2012

Hi,


If you are not using a custom save path for your session files, you can use this:

ini_set('session.gc_probability', 0);

near the top of initi.php. If you are using a custom save path, comment out the lines around line 390:



// ini_set('session.gc_probability', 1 ); // after gc_maxlifetime is met old session are cleaned up randomly every (gc_probability / gc_divisor) requests
// ini_set('session.gc_divisor', 250 ); // after gc_maxlifetime is met old session are cleaned up randomly every (gc_probability / gc_divisor) requests


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/