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.

suPHP Causes 500 Error on info.php files

Discussion in 'General Discussion' started by drewrowland, Oct 22, 2013.

  1. drewrowland

    drewrowland Member

    Joined:
    Oct 19, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I am using suPHP as my handler, however when I create a file with:

    PHP:
    <?php phpinfo(); ?>
    I always get a 500 error. If I use FCGI it works fine, however i'd prefer to use suPHP. Any ideas?
     
  2. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    Do you create that file as root?
    If so, do you change the owner of the file?

    Also you could check Apache's error log:
    /usr/local/apache/logs/error_log
    to see the actual error.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    651
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    It's always a good idea to check the Apache error log (/usr/local/apache/logs/error_log) when you receive a "500" error message on your website. It's likely the file is not owned by the account username, or is not using 0644 permissions.

    Thank you.
     
  4. drewrowland

    drewrowland Member

    Joined:
    Oct 19, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    This is what I am getting:
    Code:
    [Tue Oct 22 16:04:16 2013] [notice] Graceful restart requested, doing restart
    [Tue Oct 22 16:04:16 2013] [notice] Apache/2.2.25 (Unix) mod_ssl/2.2.25 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 configured -- resuming normal operations
    [Tue Oct 22 16:06:23 2013] [error] [client 174.70.101.172] SoftException in Application.cpp:357: UID of script "/home/puresimp/public_html/info.php" is smaller than min_uid
    [Tue Oct 22 16:06:23 2013] [error] [client 174.70.101.172] Premature end of script headers: info.php
    [Tue Oct 22 16:06:23 2013] [error] [client 174.70.101.172] File does not exist: /home/puresimp/public_html/500.shtml
    [Tue Oct 22 16:06:27 2013] [error] [client 174.70.101.172] SoftException in Application.cpp:357: UID of script "/home/puresimp/public_html/info.php" is smaller than min_uid
    [Tue Oct 22 16:06:27 2013] [error] [client 174.70.101.172] Premature end of script headers: info.php
    [Tue Oct 22 16:06:27 2013] [error] [client 174.70.101.172] File does not exist: /home/puresimp/public_html/500.shtml
     
  5. drewrowland

    drewrowland Member

    Joined:
    Oct 19, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    So I ran this:

    Code:
    chown puresimp:puresimp -R /home/puresimp/public_html
    now i'm getting a 403 instead of a 500. Checked permissions and that seems to be okay.
     
  6. drewrowland

    drewrowland Member

    Joined:
    Oct 19, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Just chmod to 755 instead of 750 and it works.
     
  7. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    chmod what?


    This:
    tells that info.php was owned by root.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    651
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    It's not a good idea to recursively change ownership on all files in the public_html directory. You should have simply adjusted ownership on the individual file. You will likely need to correct ownership of the public_html directory to:

    user:nobody

    Thank you.
     
Loading...

Share This Page