Session.save_path error

Posted by Clayton | Posted in Linux, Php.ini, SSH, Tutorial | Posted on 12-01-2009

0

So…I came across this error on a clients site which he was receiving when trying to install a 3rd party script.

The session.save_path setting in your php configuration file (php.ini) is not set or is set to a folder which did not exist. You might need to set the save_path setting in php.ini or verify that the folder sets in save_path exist.

It’s a pretty simple fix in the servers php.ini. First thing you need to do is locate your servers copy of the php.ini by running the following command via SSH.

root@lolwut [~]# php -i | grep php.ini
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini
root@lolwut [~]#

Once you’ve found the php.ini, use your favorite editor and locate the following line.

root@lolwut [~]# grep ‘session.save_path’ /usr/local/lib/php.ini
; session.save_path = “N;/path”
;session.save_path = /tmp
; (see session.save_path above), then garbage collection does *not*
root@lolwut [~]#

In this case, simply remove “;” which will uncomment the line. If you are missing the “/tmp” part of the line, you will need to add it. Make these changes and save the file, then restart apache and you’re good to go.

Post a comment

Spam Protection by WP-SpamFree