How to change default path to save php session files in Plesk

Created:

2016-11-16 12:58:15 UTC

Modified:

2017-04-24 12:01:42 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to change default path to save php session files in Plesk

Applicable to:

  • Plesk 12.5 for Linux

Question

How to change default path to save php session files in Plesk?

Answer

  1. Make sure no domains are using custom configuration for session.save_path :

    MariaDB [psa]> SELECT id FROM `PhpSettingsParameters` WHERE (`name` = 'session.save_path');
    Empty set (0.00 sec)
  2. Change configuration for each of php version installed:

    # grep -ir session.save_path /opt/plesk/php/*/etc/php.ini | grep -v ";"
    /opt/plesk/php/5.3/etc/php.ini:session.save_path = "/var/lib/php/session"
    /opt/plesk/php/5.4/etc/php.ini:session.save_path = "/var/lib/php/session"
    /opt/plesk/php/5.5/etc/php.ini:session.save_path = "/var/lib/php/session"
    /opt/plesk/php/5.6/etc/php.ini:session.save_path = "/var/lib/php/session"
    /opt/plesk/php/7.0/etc/php.ini:session.save_path = "/var/lib/php/session"
Have more questions? Submit a request
Please sign in to leave a comment.