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.

Error 500 on all php pages

Discussion in 'General Discussion' started by Chris-777, Mar 22, 2015.

  1. Chris-777

    Chris-777 Member

    Joined:
    Apr 8, 2011
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Hi folks,

    I'm not sure what happened to my webserver - I wasn't doing anything unusual with it, and all of a sudden every php page I bring up throws an error 500 - even phpinfo.php.

    I'm looking at error_log, and I see a lot of this:

    [Sun Mar 22 22:00:38 2015] [error] [client 66.249.67.31] Premature end of script headers: phpinfo.php

    html pages render fine, and I can use WHM without issue. I've been frantically googling, and found some bits about suexec_log reaching 2GB that might cause this. I rotated the log, it's writing to it again, but still no dice. I also restarted apache, restarted my host, and tried enabling and disabling suexec. I'm completely stumped.

    Any insight would really be appreciated, as my clients are all dead in the water and I'm totally out of ideas.

    Edit:
    Server Version: Apache/2.2.29 (Unix) mod_ssl/2.2.29 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
     
    #1 Chris-777, Mar 22, 2015
    Last edited: Mar 22, 2015
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    you must have done something ??

    what are the permissions of your users files
    ls -l /home/user/public_html/
     
  3. 24x7ss

    24x7ss Well-Known Member

    Joined:
    Sep 30, 2014
    Messages:
    271
    Likes Received:
    16
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    As all your PHP sites are giving 500 error it clearly shows that the issue is with PHP handler. Check which PHP handler you are using now from WHM and try chaning it.

    Home >> Service Configuration >> Configure PHP and SuExec

    Also, try disabling SuExec first.
     
  4. Chris-777

    Chris-777 Member

    Joined:
    Apr 8, 2011
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Couldn't tell you what I did - honestly I was just fiddling with a gallery on a vBulletin forum.

    Here's a folder list. I'm 99% sure it's permissions based but I've no idea what they should be. I'm testing two domains. One works now, the other doesn't, so I don't think it's php.ini.

    Here's one that works (with the actual folder name changed)

    -rw-r--r-- 1 user1 user1 168 Mar 22 22:23 /home/user1/public_html/phpinfo.php

    Here's one that doesn't:

    -rwxr-xr-x 1 user2 user2 168 Mar 22 22:27 /home/user2/public_html/phpinfo.php

    I'm going back and forth trying different permissions (755/644/777) but honestly I don't know what these should even be.
     
  5. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    Permissions should be 0750
    /home/user2/public_html/

    Permissions should be 0711
    /home/user2/
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,762
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    You can review /usr/local/apache/logs/error_log to get a better idea of why exactly those error messages are occurring. You can post part of the output here and we can help you determine which file/directory is the source of the permissions issue.

    Thank you.
     
Loading...

Share This Page