In CGI or FastCGI modes PHP runs with permissions of the domains FTP user.
FTP user is not allowed to write in the sessions directory. This means that customer who run php in cgi can not use sessions.
PHP support mode can be configured for each domain on page Web Hosting Settings at Domains -> domain.tld -> Web Hosting Settings:
PHP configuration php.ini states default session path:
~# grep session.save_path /etc/php.ini
session.save_path = “/var/lib/php/session”
Default permissions for the directory is 770:
~# ls -ld /var/lib/php/session
drwxrwx— 2 root apache 65536 Dec 16 07:48 /var/lib/php/session
~#
This states that only root/apache members are allowed to write in the sessions directory. This means that customer who run php in cgi cannot use sessions.
Resolution
The problem will be fixed in future update of Parallels Plesk Panel that will be released after 9.2.3.
As a workaround for Parallels Panel 9.2 it is recommended that you change permissions for directory /var/lib/php/session to 777:
~# chmod 777 /var/lib/php/session
or use session_save_path() PHP function to specify own session dir.
Original Article taken from here
[…] This post was mentioned on Twitter by Marios Maravelias. Marios Maravelias said: New blog post: PHP on domain running via CGI/FastCGI and sessions problem http://bit.ly/bB6iXS […]