Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED cPanel & WHM 64 PHP session path errors

Discussion in 'General Discussion' started by Damian, Mar 29, 2017.

Tags:
  1. Damian

    Damian Well-Known Member

    Joined:
    Oct 1, 2001
    Messages:
    96
    Likes Received:
    3
    Trophy Points:
    308
    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?
     
    tnakir and moxie like this.
  2. tnakir

    tnakir Registered

    Joined:
    Mar 29, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Croatia
    cPanel Access Level:
    Root Administrator
    I am having the same problem with some account,s did something go wrong with the update?
     
  3. Legin76

    Legin76 Well-Known Member

    Joined:
    Dec 11, 2007
    Messages:
    164
    Likes Received:
    2
    Trophy Points:
    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)
     
  4. vacancy

    vacancy Well-Known Member

    Joined:
    Sep 20, 2012
    Messages:
    140
    Likes Received:
    14
    Trophy Points:
    18
    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.
     
  5. Sea Dragon

    Sea Dragon Registered

    Joined:
    Sep 6, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Hythe, Folkestone, Kent, UK
    cPanel Access Level:
    Root Administrator
    Can confirm also having issues with permissions on folders/session paths
     
  6. Jan-Paul Kleijn

    Joined:
    Jun 18, 2015
    Messages:
    14
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    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
     
    #6 Jan-Paul Kleijn, Mar 29, 2017
    Last edited: Mar 29, 2017
  7. Legin76

    Legin76 Well-Known Member

    Joined:
    Dec 11, 2007
    Messages:
    164
    Likes Received:
    2
    Trophy Points:
    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
     
  8. Legin76

    Legin76 Well-Known Member

    Joined:
    Dec 11, 2007
    Messages:
    164
    Likes Received:
    2
    Trophy Points:
    68
    This worked for me too
     
  9. Legin76

    Legin76 Well-Known Member

    Joined:
    Dec 11, 2007
    Messages:
    164
    Likes Received:
    2
    Trophy Points:
    68
  10. fiif

    fiif Registered

    Joined:
    Mar 29, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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
     
    #10 fiif, Mar 29, 2017
    Last edited: Mar 29, 2017
  11. clickright

    clickright Registered

    Joined:
    Jun 20, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Curitiba PR
    cPanel Access Level:
    Root Administrator
    Same here.

    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
     
    #11 clickright, Mar 29, 2017
    Last edited by a moderator: Mar 31, 2017
  12. Legin76

    Legin76 Well-Known Member

    Joined:
    Dec 11, 2007
    Messages:
    164
    Likes Received:
    2
    Trophy Points:
    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.
     
  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    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.
     
  14. Jan-Paul Kleijn

    Joined:
    Jun 18, 2015
    Messages:
    14
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    Maarheeze
    cPanel Access Level:
    Root Administrator
    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.
     
    #14 Jan-Paul Kleijn, Mar 29, 2017
    Last edited: Mar 29, 2017
  15. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
  16. Legin76

    Legin76 Well-Known Member

    Joined:
    Dec 11, 2007
    Messages:
    164
    Likes Received:
    2
    Trophy Points:
    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
     
  17. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  18. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    To update, this is fixed in cPanel version 64.0.3:

    Fixed case CPANEL-12279: Ensure PHP session paths are added to jail configuration.

    Thank you.
     
    Jan-Paul Kleijn likes this.
  19. acolad

    acolad Registered

    Joined:
    Dec 12, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    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
     
  20. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page