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.

Internal System Error 500 - VPS - Clean install

Discussion in 'General Discussion' started by Neoburner, Sep 20, 2010.

  1. Neoburner

    Neoburner Member

    Joined:
    Sep 20, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Internal System Error 500

    Hi all

    Seen this post on here a few times about this, i get this on a clean fresh install of cPanel, the install completes, i go and setup the welcome page, then i goto add a new account.

    When i do this the account add's ok, and as a test i just make a phpinfo file to see if it loads.

    This is when i get the 500 error, the logs says a 13 permission issue with suphp and that it cannot access the file, how and do i need to change the files permissions to something else? If so does any one know what i need to change it too?

    Again a clean install on CentOS5.5 on a VPS.

    Cheers!

    Neo
     
  2. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Check ownerships and permissions

    You can see the exact cause of an internal server error by viewing error_log and suphp_log, both in the /usr/local/apache/logs/ directory. You will need to log into the shell as root in order to view the files. Once logged in, use the following commands:

    Code:
    # tail -f /usr/local/apache/logs/error_log
    and:

    Code:
    # tail -f /usr/local/apache/logs/suphp_log
    to view the log files while you try to load the page in question in the browser. Use the Ctrl+C key combination to stop the tail command.

    When you made the test file with the phpinfo() function, did you do it as root or as the account user? If you created the file as root, then it will have the wrong ownerships. Files and directories used with suPHP need to be owned by the account user and group. Files need to have 644 permissions or lower, and directories need to have 755 permissions or lower.

    The exact cause of the internal server error will be logged to one of the two logs I mentioned above.
     
  3. Neoburner

    Neoburner Member

    Joined:
    Sep 20, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hi Jarad

    Thanks for the quick response, got some info out of the log files:

    (13) Permission Denied: /opt/suphp/sbin/suphp

    The file i made was just uploaded from the users ftp login details, no permissions changed at all, i guess it is a permissions issue as above, altho im not quite sure what i can do or what to change!

    Again this is just from a fresh install of Cpanel with nothing touched, exept the account added via whm.

    Thanks
     
  4. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    That is actually a very different error from what I initially expected. What are the permissions of the file mentioned? Here is the directory listing of /opt/suphp/sbin on a known-working server:

    Code:
    # ls -alh /opt/suphp/sbin/
    total 1.7M
    drwxr-xr-x 2 root root 4.0K Apr 15 11:00 ./
    drwxr-xr-x 4 root root 4.0K Jun 10  2008 ../
    -rwsr-xr-x 1 root root 1.7M Apr 15 11:00 suphp*
    Note that the permissions on the suphp binary file are 4755; the 4 is signified by the "s" for "sticky" for the user's execute permission.

    It is unusual to encounter that type of permissions issue on a freshly built Apache on a new installation, so you may want to submit a ticket so that we can log in and investigate directly.
     
  5. Neoburner

    Neoburner Member

    Joined:
    Sep 20, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Ok i will post that soon, i am just reinstalling the system a fresh and doing it again so i know the files i played with are back to normal.

    Should be complete in about 15 minutes.

    Cheers
     
  6. Neoburner

    Neoburner Member

    Joined:
    Sep 20, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Also just for extra info:

    root@vps1 [~]# tail -f /usr/local/apache/logs/error_log
    [Mon Sep 20 07:18:28 2010] [crit] [client 127.0.0.1] (13)Permission denied: /usr/local/apache/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
    [Mon Sep 20 07:18:28 2010] [crit] [client 127.0.0.1] (13)Permission denied: /usr/local/apache/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
    [Mon Sep 20 07:18:53 2010] [crit] [client 81.130.56.34] (13)Permission denied: /usr/local/apache/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, referer: Index of /
    [Mon Sep 20 07:18:53 2010] [error] [client 81.130.56.34] File does not exist: /home/xrealm/public_html/403.shtml, referer: Index of /
    [Mon Sep 20 07:18:53 2010] [crit] [client 81.130.56.34] (13)Permission denied: /usr/local/apache/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, referer: Index of /
    [Mon Sep 20 07:18:53 2010] [error] [client 81.130.56.34] File does not exist: /home/xrealm/public_html/403.shtml, referer: Index of /
    [Mon Sep 20 07:18:53 2010] [crit] [client 81.130.56.34] (13)Permission denied: /usr/local/apache/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, referer: Index of /
    [Mon Sep 20 07:18:53 2010] [error] [client 81.130.56.34] File does not exist: /home/xrealm/public_html/403.shtml, referer: Index of /
    [Mon Sep 20 07:18:54 2010] [error] [client 81.130.56.34] (13)Permission denied: couldn't create child process: /opt/suphp/sbin/suphp for /home/xrealm/public_html/phpinfo.php, referer: Index of /
    [Mon Sep 20 07:18:54 2010] [error] [client 81.130.56.34] File does not exist: /home/xrealm/public_html/500.shtml, referer: Index of /
     
  7. Neoburner

    Neoburner Member

    Joined:
    Sep 20, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Ok here is my output


    root@vps1 [~]# ls -alh /opt/suphp/sbin/

    total 316K
    drwx------ 2 root root 4.0K Sep 20 06:42 ./
    drwx------ 4 root root 4.0K Sep 20 06:42 ../
    -rwsr-xr-x 1 root root 303K Sep 20 06:42 suphp*

    Log errors:

    root@vps1 [~]# tail -f /usr/local/apache/logs/error_log
    [Mon Sep 20 07:18:28 2010] [crit] [client 127.0.0.1] (13)Permission denied: /usr/local/apache/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
    [Mon Sep 20 07:18:28 2010] [crit] [client 127.0.0.1] (13)Permission denied: /usr/local/apache/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
    [Mon Sep 20 07:18:53 2010] [crit] [client 81.130.56.34] (13)Permission denied: /usr/local/apache/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, referer: http://www.x-realm.co.uk/
    [Mon Sep 20 07:18:53 2010] [error] [client 81.130.56.34] File does not exist: /home/xrealm/public_html/403.shtml, referer: http://www.x-realm.co.uk/
    [Mon Sep 20 07:18:53 2010] [crit] [client 81.130.56.34] (13)Permission denied: /usr/local/apache/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, referer: http://www.x-realm.co.uk/
    [Mon Sep 20 07:18:53 2010] [error] [client 81.130.56.34] File does not exist: /home/xrealm/public_html/403.shtml, referer: http://www.x-realm.co.uk/
    [Mon Sep 20 07:18:53 2010] [crit] [client 81.130.56.34] (13)Permission denied: /usr/local/apache/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, referer: http://www.x-realm.co.uk/
    [Mon Sep 20 07:18:53 2010] [error] [client 81.130.56.34] File does not exist: /home/xrealm/public_html/403.shtml, referer: http://www.x-realm.co.uk/
    [Mon Sep 20 07:18:54 2010] [error] [client 81.130.56.34] (13)Permission denied: couldn't create child process: /opt/suphp/sbin/suphp for /home/xrealm/public_html/phpinfo.php, referer: http://www.x-realm.co.uk/
    [Mon Sep 20 07:18:54 2010] [error] [client 81.130.56.34] File does not exist: /home/xrealm/public_html/500.shtml, referer: http://www.x-realm.co.uk/
     
    #7 Neoburner, Sep 20, 2010
    Last edited: Sep 20, 2010
  8. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Just to rule this out, do you happen to have Apache RPM packages installed? Is any output given by the following commands?

    Code:
    # rpm -qa|grep -i httpd
    # rpm -qa|grep -i apache
    # rpm -qa|grep -i php
    If any Apache or PHP RPM packages are installed, they will need to be removed, and EasyApache run to make sure a good Apache and PHP build are present. Note that I do not necessarily suspect that RPM packages are installed, and they should be removed by the cPanel installer, but I wanted to rule out this possibility.

    If the same problem is happening after reinstalling the operating system and cPanel, please submit a ticket so that we may investigate directly. This is an unusual situation and it would be best if we could have direct access to the server, since this appears to be a more in-depth issue than one that can normally be solved via forum posts.
     
  9. Neoburner

    Neoburner Member

    Joined:
    Sep 20, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    No output from the commands so will post a ticket now.

    Thanks
     
  10. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Permissions in /opt/curlssl

    I looked at this server via a ticket and I wanted to update the forum thread to explain the problem and its resolution.

    An entry in /usr/local/apache/logs/error_log led me to look carefully at the curlssl library file, in /opt/curlssl. That is how I spotted the problem:

    Code:
    # ls -alh /opt/
    total 28K
    drwxr-xr-x  7 root root 4.0K Sep 20 08:48 ./
    drwxr-xr-x 24 root root 4.0K Sep 20 11:51 ../
    drwx------  6 root root 4.0K Sep 20 06:44 curlssl/
    drwx------  6 root root 4.0K Sep 20 06:39 pcre/
    drwx------  4 root root 4.0K Sep 20 06:44 php_with_imap_client/
    drwxr-xr-x  4 root root 4.0K Sep 20 08:48 suphp/
    drwx------  6 root root 4.0K Sep 20 06:45 xml2/
    root@vps1 [/usr/local]# ls -alh /opt/curlssl/
    total 24K
    drwx------ 6 root root 4.0K Sep 20 06:44 ./
    drwxr-xr-x 7 root root 4.0K Sep 20 08:48 ../
    drwx------ 2 root root 4.0K Sep 20 06:44 bin/
    drwx------ 3 root root 4.0K Sep 20 06:44 include/
    drwx------ 3 root root 4.0K Sep 20 06:44 lib/
    drwx------ 3 root root 4.0K Sep 20 06:44 share/
    By looking at a known-working server, I found that the permissions on /opt/curlssl and its contents should be 755. I changed the permissions, and PHP files now work correctly on the server using suPHP.

    /opt/curlssl will only be present if "CurlSSL" is selected in EasyApache.
     
Loading...

Share This Page