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.

PHP Errors

Discussion in 'General Discussion' started by cancer10, Nov 19, 2007.

  1. cancer10

    cancer10 Well-Known Member

    Joined:
    Aug 27, 2006
    Messages:
    60
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    Hello,

    We had a hard disk failure issue on our server so we have to get it replaced by a new one. We moved all files to the new hard disk. Everything seems to be working fine on cPanel/WHM except that all php programs including drupal, fantastico, squirrel mail and Horde etc are generating some php errors. This was alright before we got the hard disk replaced. Can someone please guide me how do I resolve this.

    Following is the error generated by squirrel mail

    Code:
    Warning: session_start() [function.session-start]: open(/tmp/sess_37394d8b5a1dd541d59c9f95805df474, O_RDWR) failed: Read-only file system (30) in /usr/local/cpanel/base/3rdparty/squirrelmail/functions/global.php on line 405
    
    Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /usr/local/cpanel/base/3rdparty/squirrelmail/functions/global.php:405) in /usr/local/cpanel/base/3rdparty/squirrelmail/functions/global.php on line 405
    
    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /usr/local/cpanel/base/3rdparty/squirrelmail/functions/global.php:405) in /usr/local/cpanel/base/3rdparty/squirrelmail/functions/global.php on line 405
    
    Warning: Cannot modify header information - headers already sent by (output started at /usr/local/cpanel/base/3rdparty/squirrelmail/functions/global.php:405) in /usr/local/cpanel/base/3rdparty/squirrelmail/functions/i18n.php on line 335
    
    Warning: Cannot modify header information - headers already sent by (output started at /usr/local/cpanel/base/3rdparty/squirrelmail/functions/global.php:405) in /usr/local/cpanel/base/3rdparty/squirrelmail/src/login.php on line 64
    
    Warning: session_start() [function.session-start]: open(/tmp/sess_d241202e363f2bf20d090def5d2e8d75, O_RDWR) failed: Read-only file system (30) in /usr/local/cpanel/base/3rdparty/squirrelmail/functions/global.php on line 405
    
    Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /usr/local/cpanel/base/3rdparty/squirrelmail/functions/global.php:405) in /usr/local/cpanel/base/3rdparty/squirrelmail/functions/global.php on line 405
    
    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /usr/local/cpanel/base/3rdparty/squirrelmail/functions/global.php:405) in /usr/local/cpanel/base/3rdparty/squirrelmail/functions/global.php on line 405
    
    Warning: Cannot modify header information - headers already sent by (output started at /usr/local/cpanel/base/3rdparty/squirrelmail/functions/global.php:405) in /usr/local/cpanel/base/3rdparty/squirrelmail/plugins/login_auth/functions.php on line 53
    
    Warning: Unknown(): open(/tmp/sess_d241202e363f2bf20d090def5d2e8d75, O_RDWR) failed: Read-only file system (30) in Unknown on line 0
    
    Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
     
  2. swapneel

    swapneel Member

    Joined:
    Oct 2, 2006
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    It appears that you have mounted /tmp as read only.

    Code:
    Warning: Unknown(): open(/tmp/sess_d241202e363f2bf20d090def5d2e8d75, O_RDWR) failed: Read-only file system (30) in Unknown on line 0
    What is the output of df -h and mount ?

    mount /tmp as rw to fix this issue.
     
  3. cancer10

    cancer10 Well-Known Member

    Joined:
    Aug 27, 2006
    Messages:
    60
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    Attached is the screenshot of the /tmp settings.
     

    Attached Files:

  4. testlog_4u

    testlog_4u Active Member

    Joined:
    Sep 17, 2007
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Same situation

    Hello,

    Same situation here for me like cancer10. I moved all data on the new disk and having the same issue with Fantastico, Squirrel mail and Horde. Yet I am not getting any fix for this :(. As swapneel's suggestion I check permissions of /tmp directory and it is okay as drwx------.

    I am getting errors like this in Fantastico, Squirrel mail:

    ===============================================================
    Warning: session_start() [function.session-start]: open(/tmp/sess_37394d8b5a1dd541d59c9f95805df474, O_RDWR) failed: Read-only file system (30) in /usr/local/cpanel/base/3rdparty/squirrelmail/functions/global.php on line 405

    Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /usr/local/cpanel/base/3rdparty/squirrelmail/functions/global.php:405) in /usr/local/cpanel/base/3rdparty/squirrelmail/functions/global.php on line 405

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /usr/local/cpanel/base/3rdparty/squirrelmail/functions/global.php:405) in /usr/local/cpanel/base/3rdparty/squirrelmail/functions/global.php on line 405

    Warning: Cannot modify header information - headers already sent by (output started at /usr/local/cpanel/base/3rdparty/squirrelmail/functions/global.php:405) in /usr/local/cpanel/base/3rdparty/squirrelmail/functions/i18n.php on line 335
    ===============================================================


    Thank you,
     
  5. ManojB

    ManojB Well-Known Member

    Joined:
    Mar 25, 2005
    Messages:
    80
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    pune
    Try recompling php with phpsuexe to fix this issue OR you can enable the phpsuexe through WHM > Service Configuration > Enable/Disable SuExec
     
  6. linux-image

    linux-image Well-Known Member

    Joined:
    Jun 8, 2004
    Messages:
    1,192
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    Root Administrator
    before anything, check if /tmp has the "t" bit set.

    It should be:

    drwxrwxrwt 5 root root 4096 Nov 27 00:05 tmp
    ---------------------------------------------------------------------------

    you can also try:

    cd /tmp
    rm -rf sess_*

    as root on shell to see if the error disappears.
     
  7. testlog_4u

    testlog_4u Active Member

    Joined:
    Sep 17, 2007
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Thanks

    Hello Manoj and linux-image,

    Yes, the issue has been resolved now. I found with some docs on net that the issue might because of /tmp directory's permissions and linux-image stated same here.

    Thank you for your help :)
     
Loading...

Share This Page