SOLVED cPanel & WHM 64 PHP session path errors

Damian

Well-Known Member
Oct 1, 2001
105
6
318
Since upgrading a few servers today to cPanel64 PHP temp paths are default to /var/cpanel/php/sessions/ea-phpXXXX (XXXX being version).

But it has stopped individual sites from being able to write sessions.

PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/cpanel/php/sessions/ea-php56) in Unknown on line 0

I've changed the default via MultiPHP manager to set it to /tmp but that directory does exist. What do I need to do to get PHP to recognise the new default save_path directories?
 
  • Like
Reactions: tnakir and moxie

Legin76

Well-Known Member
Dec 11, 2007
173
2
68
After the server updated last night we are getting quite a few php errors on different sites. From what I can tell php itself has not changed..

Mainly: open_basedir, MCrypt and session errors (Read-only file system)
 

vacancy

Well-Known Member
Sep 20, 2012
308
89
28
cPanel Access Level
Root Administrator
I thought it would be a problem to change the session path.

As expected, after the 11.64 update, the session can not write to the session with the change of the path. Do not update 11.64.

Something is broken every time an update is made.

I'm tired of this. Please do not change anything anymore.
 
Jun 18, 2015
16
4
3
Maarheeze
cPanel Access Level
Root Administrator
Same here.
Since the update today the session path is set to /var/cpanel/php/sessions/ea3

Setting this folder rights to 777 did not help. (chmod 777 -R /var/cpanel/php/sessions/ea3)

---edit---
I have regained control back by setting the session_path back to /tmp

More info on my PHP config

Default PHP Version: 5
PHP 5 Handler: dso
Apache suEXEC: on
Apache Ruid2: on
 
Last edited:

Legin76

Well-Known Member
Dec 11, 2007
173
2
68
I think they relate to the following.
Fatal error: Uncaught PHP Warning: Unknown: open(/var/cpanel/php/sessions/ea3/sess_e9bcb62efbea018a31915d6460, O_RDWR) failed: Read-only file system (30) thrown in Unknown on line 0

var/cpanel/php/sessions/ea3/ is empty
 

fiif

Registered
Mar 29, 2017
3
0
1
ireland
cPanel Access Level
Root Administrator
Just to confirm is it to be set to /tmp or is there a different path? I've honestly never seen this setting prior to the issue today
 
Last edited:

clickright

Registered
Jun 20, 2016
1
0
1
Curitiba PR
cPanel Access Level
Root Administrator
Same here.

I have regained control back by setting the session_path back to /tmp
Worked for me, but I believe that cPanel must investigate why this is happening. We should be able to use the new default save_path.

My current configuration:
Code:
cPanel + Cloudlinux

Apache 2.4

config
config-runtime
mod_asis
mod_authn_dbm
mod_authn_socache
mod_bwlimited
mod_cgi
mod_dbd
mod_deflate
mod_env
mod_expires
mod_headers
mod_hostinglimits
mod_mpm_prefork
mod_proxy
mod_proxy_fcgi
mod_proxy_http
mod_security2
mod_ssl
mod_suexec
mod_suphp
mod_unique_id
mod_version
tools

PHP 5.4

libc-client
pear
php-bcmath
php-calendar
php-cli
php-common
php-curl
php-devel
php-exif
php-fpm
php-ftp
php-gd
php-gettext
php-iconv
php-imap
php-ioncube
php-litespeed
php-mbstring
php-mcrypt
php-mysqlnd
php-pdo
php-posix
php-pspell
php-soap
php-sockets
php-xml
php-xmlrpc
php-zendguard
php-zip
runtime

PHP 5.5

libc-client
pear
php-bcmath
php-calendar
php-cli
php-common
php-curl
php-devel
php-exif
php-fpm
php-ftp
php-gd
php-gettext
php-iconv
php-imap
php-ioncube
php-litespeed
php-mbstring
php-mcrypt
php-mysqlnd
php-pdo
php-posix
php-pspell
php-soap
php-sockets
php-xml
php-xmlrpc
php-zendguard
php-zip
runtime

PHP 5.6

libc-client
pear
php-bcmath
php-calendar
php-cli
php-common
php-curl
php-devel
php-exif
php-fpm
php-ftp
php-gd
php-gettext
php-iconv
php-imap
php-ioncube
php-litespeed
php-mbstring
php-mcrypt
php-mysqlnd
php-pdo
php-posix
php-pspell
php-soap
php-sockets
php-xml
php-xmlrpc
php-zendguard
php-zip
runtime

Others

apr
apr-util
cpanel-tools
documentroot
libcurl
libmcrypt
modsec-sdbm-util
php-cli
profiles-cpanel
 
Last edited by a moderator:

Legin76

Well-Known Member
Dec 11, 2007
173
2
68
Just set it to /tmp.. To do this go to the PHP Configuration Editor and change session.save_path to /tmp. I'm not sure if this is a long term fix but it stoped all the errors that I'm getting.
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,234
363
cPanel Access Level
DataCenter Provider
Twitter
Hello,

Internal case CPANEL-12279 is open to address the issue where the updated PHP session paths on systems running cPanel version 64 are not working when CageFS is enabled. I'll update this thread with more information on the status of this case as it becomes available. In the meantime, the temporary workaround is to add the following entry to the /etc/cagefs/cagefs.mp file:

Code:
/var/cpanel/php/sessions
Then, remount CageFS via the following command:

Code:
cagefsctl --remount-all
Thank you.
 
Jun 18, 2015
16
4
3
Maarheeze
cPanel Access Level
Root Administrator
Hello,

Internal case CPANEL-12279 is open to address the issue where the updated PHP session paths on systems running cPanel version 64 are not working when CageFS is enabled. I'll update this thread with more information on the status of this case as it becomes available. In the meantime, the temporary workaround is to add the following entry to the /etc/cagefs/cagefs.mp file:

Code:
/var/cpanel/php/sessions
Then, remount CageFS via the following command:

Code:
cagefsctl --remount-all
Thank you.
Hi Michael,
I do not think the above solution you provided applies for my system.
the cagefs.mp file does not exist
the cagefsctl command is not found

My system:
- CentOS 6.8 (Final) X86-64 KVM
- WHM/cPanel 64.0
- Default PHP Version: 5
- PHP 5 Handler: dso
- Apache suEXEC: on
- Apache Ruid2: on

Also, could this problem have anything to do with this update being done while some sessions were still open? It is namely only the domain that I am currently working on that has this issue. And my sessions are cleaned only on closing the browser which does not happen when my PC goes in stand-by mode. Next day I start up and my session is still valid.
 
Last edited:

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,234
363
cPanel Access Level
DataCenter Provider
Twitter
Hello @Jan-Paul Kleijn,

For non-CloudLinux systems, you can temporarily change the value for "session.save_path" to /tmp via "WHM >> Software >> MultiPHP INI Editor >> Basic Mode" for each version of PHP installed on the system. However, ensure to revert this value back to "/var/cpanel/php/sessions/ea-php$$" once we publish a resolution.

Thank you.
 

Legin76

Well-Known Member
Dec 11, 2007
173
2
68
I don't have a /etc/cagefs/ folder.. I have a similar setup to Jan-Paul above.

- CENTOS 6.7 x86_64 xen pv
- WHM/cPanel 64.0
- Default PHP Version: 5
- PHP 5 Handler: dso
- Apache suEXEC: on
- Apache Ruid2: on
 

acolad

Registered
Dec 12, 2012
2
0
1
cPanel Access Level
Root Administrator
Hi Michael,

Thanks for your update ! Is this definitely considered as fixed in 64.0.3 ? Also for non-CloudLinux systems ? Because we somehow still experience it today (having 64.0.3). I still put in "/tmp" for the time being...

Kind regards
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,234
363
cPanel Access Level
DataCenter Provider
Twitter
Thanks for your update ! Is this definitely considered as fixed in 64.0.3 ? Also for non-CloudLinux systems ? Because we somehow still experience it today (having 64.0.3). I still put in "/tmp" for the time being...
Hello @acolad,

Yes, the issue should have been addressed with case CPANEL-12279. Could you open a support ticket using the link in my signature so we can take a closer look at your system? You can post the ticket number here so we can update this thread with the outcome.

Thank you.