PHP session cleanup does not work in Plesk on Debian/Ubuntu

Created:

2016-12-12 03:42:40 UTC

Modified:

2017-08-08 13:32:45 UTC

0

Was this article helpful?


Have more questions?

Submit a request

PHP session cleanup does not work in Plesk on Debian/Ubuntu

Applicable to:

  • Plesk for Linux

Symptoms

PHP session cleanup does not work, /var/lib/php5/ directory is full of PHP session files.

Cause

/etc/cron.d/php5 is missing.

For Plesk on Debian-based OS, /etc/cron.d/php5 is used to clean up the stale session files. The file is part of php5-common package shipped with operating system.

Resolution

Reinstall the package or extract the file from a package. Sample commands are:

# dpkg -X php5-common*.deb /some/target/directory/
# cp /some/target/directory/etc/cron.d/php5 /etc/cron.d
# cp /some/target/directory/usr/lib/php5/maxlifetime /usr/lib/php5/
Have more questions? Submit a request
Please sign in to leave a comment.