• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issues with /var/lib/php/session after plesk update

Rif Raf SRL

New Pleskian
Hello,
suddenly the php session stopped working after plesk updated itself and I started getting the following error:
mod_fcgid: stderr: PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0

I fixed the issue with the following commands that I've found googleing around:
chown apache:psacln /var/lib/php/session
chmod -R 770 /var/lib/php/session
chcon -R system_u:eek:bject_r:httpd_sys_content_t:s0 /var/lib/php/session

The server is running CentOS 6.3.
Is this something that will happen after each update? Because if it's so, it will be an issue to fix multiple servers everytime.
 
Same problem here - Parallels should fix this asap because alle CMS and other things using PHP sessions will not work right now.

The quickfix is ok, but not really nice to apply on hundrets of machines.
 
same problem here ... happened through PHP RPM update ... they should check dir perm after update ...
 
Parallels,


a reply or eta for a new hotfix would be in order here..



This issue has been encountered before, so it should already be logged somewhere.
 
I tried the fix given in the below mentioned KB, but it still doesnt work for me, any suggestions???
My box runs CentOS 6.2(final), 64 bit

samir

Try this:

Code:
chown apache:psacln /var/lib/php/session

IMHO the KB article is wrong.
 
Thnx RonHost....i tried oyur fix too and it still doesnt work...anything wrong that i am doing??? this is what i do after SSHing into the server as root:
chmod 1733 /var/lib/php/session
and then chown apache:psacln /var/lib/php/session, is this correct???
 
Thnx RonHost....i tried oyur fix too and it still doesnt work...anything wrong that i am doing??? this is what i do after SSHing into the server as root:
chmod 1733 /var/lib/php/session
and then chown apache:psacln /var/lib/php/session, is this correct???

Thats what we've done on our machines to fix it:

Code:
chown apache:psacln /var/lib/php/session
chmod -R 770 /var/lib/php/session
 
Same problem here... CentOS 6 64bit with Plesk 11
Thank you for the fix here... hope that Parallels would resolve that problem
 
After I updated from Plesk v11.0 to v11.5.30 I had the same problem. (CentOS 6.4 64bit with Plesk v11.5.30_build115130808.11)
Above fix didn't worked, neither the one from http://kb.parallels.com/en/115704.

I found that the errors
Code:
mod_fcgid: stderr: PHP Warning:  Unknown: Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/tmp/) in Unknown on line 0, referer: http://...
disappeared after I removed php-suhosin (x86_64 0.9.33-2.git1fba865.el6.art).

If I install php-suhosin again, the above errors appears again.

Any solution to install php-suhosin and avoid these session.save_path errors?
 
ionuts71 -- that's very interesting and great debugging.

Any anybody else who was not able to resolve the problem via chown/chmod comment on whether they had suhosin installed or not?

ionuts71 - can you check your suhosin.ini to see if it has any particular settings related to session paths please?
 
ionuts71 - can you check your suhosin.ini to see if it has any particular settings related to session paths please?

I have removed php-suhosin... The settings were the default ones, after installing it using yum install php-suhosin command.
I've reinstalled php-suhosin module for a few minutes (the sessions errors appeared immediately => the shop carts can't be updated, can't login in admin backend etc.) and I found only one suhosin.ini file in /etc/php.d/suhosin.ini:
Code:
; Enable suhosin extension module
extension=suhosin.so
 
Sorry I am new to all of this. I have this problem and want to apply the fix but whre do I go to input these commands?


Hello,
suddenly the php session stopped working after plesk updated itself and I started getting the following error:


I fixed the issue with the following commands that I've found googleing around:


The server is running CentOS 6.3.
Is this something that will happen after each update? Because if it's so, it will be an issue to fix multiple servers everytime.
 
Sorry I am new to all of this. I have what I think is this problem and want to try this fix. So where do I go to enter these commands?

Also this happened once before and was fixed but is now back again. Will it happen ever time our server is auto updated?
 
Back
Top