Dear community,
on my (virtual) Ubuntu Server (12.04.5 LTS), I am running the latest Plesk version (12.0.18 Update #35). For "normal" web use, I am running Apache (2.2.22) and PHP (5.3.10-1ubuntu3.16) as a FastCGI module.
Since I was just checking a couple of other servers regarding PHP session management, I also checked this server. What I found out is that on this server probably no session file garbage collection takes place:
The basic PHP configuration (I didn't touch it so far) is done through files located /etc/php5/cgi with its basic PHP configuration file php.ini. Running phpinfo() confirmed the session settings done in php.ini:
[Session]
session.save_handler = files
session.save_path = /var/lib/php5
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.gc_probability = 0
With these settings (gc_probability = 0), I assume that no automatic garbage collection is started from within PHP (see also http://serverfault.com/questions/51...s-with-a-cron-job-instead-of-using-phps-built). As posted in the link before, Debian and Ubuntu normally have their own scripts in /etc/cron.d/php5 to do this garbage collection.
On my Plesk server with no personal modifications towards PHP however, neither the automated garbage collection (in php.ini) is activated, nor does the (standard) Ubuntu/Debian cron job exists to delete outdated session files in /var/lib/php5. This results in many outdated files filling up that directory on my server.
My questions now are:
1) Is the removal of the cron job /etc/cron.d/php5 something specific that happened during the installation of Plesk? Why?
2) Is there another (Plesk-specific) script that should do the work?
Thanks in advance for your help!
Bastian
on my (virtual) Ubuntu Server (12.04.5 LTS), I am running the latest Plesk version (12.0.18 Update #35). For "normal" web use, I am running Apache (2.2.22) and PHP (5.3.10-1ubuntu3.16) as a FastCGI module.
Since I was just checking a couple of other servers regarding PHP session management, I also checked this server. What I found out is that on this server probably no session file garbage collection takes place:
The basic PHP configuration (I didn't touch it so far) is done through files located /etc/php5/cgi with its basic PHP configuration file php.ini. Running phpinfo() confirmed the session settings done in php.ini:
[Session]
session.save_handler = files
session.save_path = /var/lib/php5
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.gc_probability = 0
With these settings (gc_probability = 0), I assume that no automatic garbage collection is started from within PHP (see also http://serverfault.com/questions/51...s-with-a-cron-job-instead-of-using-phps-built). As posted in the link before, Debian and Ubuntu normally have their own scripts in /etc/cron.d/php5 to do this garbage collection.
On my Plesk server with no personal modifications towards PHP however, neither the automated garbage collection (in php.ini) is activated, nor does the (standard) Ubuntu/Debian cron job exists to delete outdated session files in /var/lib/php5. This results in many outdated files filling up that directory on my server.
My questions now are:
1) Is the removal of the cron job /etc/cron.d/php5 something specific that happened during the installation of Plesk? Why?
2) Is there another (Plesk-specific) script that should do the work?
Thanks in advance for your help!
Bastian