SOLVED cPanel & WHM 64 PHP session path errors

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
Hello,

If anyone else on a CentOS system continues to encounter this issue after updating to cPanel 64.0.3 or higher, try running the following commands to see if it clears up the problem:

Code:
/scripts/clear_orphaned_virtfs_mounts --clearall ; /scripts/update_users_jail ; /scripts/restartsrv_httpd
Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
This appears to have fixed sites using php 5.6 but not 7.1.
Hello,

Does running the commands referenced in my previous response help? If not, feel free to open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here and we will update this thread with the outcome.

Thank you.
 

vacancy

Well-Known Member
Sep 20, 2012
575
231
93
Turkey
cPanel Access Level
Root Administrator
I want to ask a question michael.

Would not it be better to implement this session change only on new installations?

On a server using 11.62, the transition to 11.64 seems to cause many different problems that are not anticipated to be automatically changed in the session path.

It should be considered well when implementing such significant changes in working servers.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
Hello @Legin76,

It looks like the /var/cpanel/php/sessions/ea-php71 directory is not automatically created for PHP 7.1. CPANEL-12361 is open to report this issue. I'll update this thread with more information on the status of this case as it becomes available. In the meantime, try manually creating the directory and let us know if that helps:

Code:
mkdir /var/cpanel/php/sessions/ea-php71
chmod 4733 /var/cpanel/php/sessions/ea-php71
Thank you.
 

Legin76

Well-Known Member
Dec 11, 2007
178
4
68
Hello @Legin76,

It looks like the /var/cpanel/php/sessions/ea-php71 directory is not automatically created for PHP 7.1. CPANEL-12361 is open to report this issue. I'll update this thread with more information on the status of this case as it becomes available. In the meantime, try manually creating the directory and let us know if that helps:

Code:
mkdir /var/cpanel/php/sessions/ea-php71
chmod 4733 /var/cpanel/php/sessions/ea-php71
Thank you.
That worked.. Thanks
 

CrazySerb

Active Member
Apr 1, 2015
38
12
58
Canada
cPanel Access Level
Root Administrator
I want to ask a question michael.

Would not it be better to implement this session change only on new installations?

On a server using 11.62, the transition to 11.64 seems to cause many different problems that are not anticipated to be automatically changed in the session path.

It should be considered well when implementing such significant changes in working servers.
You would think that would be the logic developers would use...

But no, someone decided to change things around for the heck of it without proper testing and broke a bunch of our and our clients' sites in the process, having us scrambling to figure out what in the world happened and how to fix it...
 

cPanelNick

Administrator
Staff member
Mar 9, 2015
3,481
35
208
cPanel Access Level
DataCenter Provider
I want to ask a question michael.

Would not it be better to implement this session change only on new installations?

On a server using 11.62, the transition to 11.64 seems to cause many different problems that are not anticipated to be automatically changed in the session path.

It should be considered well when implementing such significant changes in working servers.
Hi vacancy,

The change was done as security hardening measure. By default, PHP saves its session files to /tmp. This allows users on the system to view other users session files.

In general we try not to change paths or file locations unless its for security or compatibility reasons.
 
  • Like
Reactions: vacancy

acolad

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

Yes, the command provided by Michael indeed corrects the issue. After having upgraded we still encountered the problem but after we launched the said command everything's back at it's best. THANKS a lot !
 

Res

Registered
Apr 4, 2017
1
0
1
India
cPanel Access Level
Root Administrator
Hi ,

I am facing a new error with cagefs. When cagefs is disabled there were no errors

```
PHP Warning: SessionHandler::read(): open(/var/cpanel/php/sessions/eaxx/xxxx, O_RDWR) failed: No such file or directory (2) in /home/xxxx/public_html/system/library/session/native.php on line xxx
```
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
I am facing a new error with cagefs. When cagefs is disabled there were no errors
Hello,

In cPanel 64.0.7, the change was reverted for CloudLinux systems:

Fixed case CPANEL-12314: Let cagefs handle management of /var/cpanel/php/sessions.

CloudLinux is planning to handle this differently through a CageFS update. You can follow the CloudLinux blog to see when they publish the update:

CloudLinux Blog

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
Hello,

The issue with PHP 7.1 sessions is addressed with the following case in the most recent EasyApache 4 update:

STS-549: Setup php session directory after install of php.

Running "yum update" will initiate the EA4 package updates once they are published.

Thank you.
 

paijo

Registered
Apr 9, 2017
1
0
1
indonesia
cPanel Access Level
Root Administrator
I am from Indonesia, I want to ask my website- Removed - there is also a paper like this..

Code:
[B]Warning[/B]: Unknown: open(/var/cpanel/php/sessions/ea3/sess_9bc06c591db3747368fc20a20b6b82a2, O_RDWR) failed: No such file or directory (2) in [B]Unknown[/B] on line [B]0[/B]

[B]Warning[/B]: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/cpanel/php/sessions/ea3) in [B]Unknown[/B] on line [B]0[/B]
it was his maksut how yes.
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
Warning: Unknown: open(/var/cpanel/php/sessions/ea3/sess_9bc06c591db3747368fc20a20b6b82a2, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
Hello,

Are you using CageFS? If so, an update to address this issue was released today:

CageFS updated

Thank you.
 

tomfra

Well-Known Member
Sep 30, 2002
68
1
158
Well, this thread is several months old now, but it seems cPanel did it again with Today's update... Half of our website is not working now, I cannot log into our admin panels and affiliate program management, for example.

This is the error we get in many places now:

Unknown: open(/var/cpanel/php/sessions/alt-php52/sess_qh318ot65ouupc28dn1452dvj2, O_RDWR) failed: No such file or directory (2) in line 0 of file Unknown

We use a cpanel management company that should handle it for us, waiting for their response now. But cPanel tech: You seriously need to rethink the way you release updates! This is the second time in the last month where scheduled cPanel update created a serious issue for us.

I will update this thread once the issue is fixed on our web.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
Hi @tomfra,

Feel free to open a support ticket if you'd like us to take a closer look.

Thank you.