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 server error 500 testing my server admin skill (terrible BTW) to the max

Discussion in 'General Discussion' started by Roy@ENHOST, Oct 23, 2004.

  1. Roy@ENHOST

    Roy@ENHOST Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    495
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Los Angeles California
    Hi guys,

    I have been pretty confused about a server prenomenon lately.
    When I request my URL from my browser, everything is OK.
    But when I try to request my URL from a PHP script, it will give me an error 500.

    When I tail my error_log, this is what I get.

    [Sat Oct 23 18:28:22 2004] [error] [client 66.235.180.123] File does not exist: /home/cpanelsd/public_html/500.shtml
    [Sat Oct 23 18:28:35 2004] [error] [client 66.235.180.123] File does not exist: /home/cpanelsd/public_html/500.shtml
    [Sat Oct 23 18:28:40 2004] [error] [client 66.235.180.123] File does not exist: /home/cpanelsd/public_html/500.shtml
    [Sat Oct 23 18:28:53 2004] [error] [client 66.235.180.123] File does not exist: /home/cpanelsd/public_html/500.shtml
    [Sat Oct 23 18:29:00 2004] [error] [client 66.235.180.123] File does not exist: /home/cpanelsd/public_html/500.shtml
    [Sat Oct 23 18:29:05 2004] [error] [client 66.235.180.123] File does not exist: /home/cpanelsd/public_html/500.shtml


    Can any veteran server admins out there tell me what I should look out for?
    I tried HTTPD.conf, reboot apache, change some php.ini , you name it I tried it.
    But there is a limit to my poor server admin skill.
    That is why I need to get some enlightenment from you guys.
     
  2. Aric1

    Aric1 Well-Known Member

    Joined:
    Oct 15, 2003
    Messages:
    324
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    It is looking for a custom #500 error message file for the cpanelsd account.

    The error you note itself isn't a big deal, you can create a 500.shtml custom error document in CPANEL to rid yourself of that particular error.

    However, a 500 error itself is an Internal Server Error which can be caused by many things... incorrect permissions on CGI-BIN files, an incorrect directive in a user's .htaccess file, etc.
     
  3. Roy@ENHOST

    Roy@ENHOST Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    495
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Los Angeles California
    Well I am actually concerned about the internal server error itself.
    This whole thing started after I installed phpsuexec I think.
    After I uninstalled it, the errors persists.

    One thing I noticed is that my public_html kept chmodding to 750 no matter how many times I chmodded it 755. I suspect they are related to phpsuexec.

     
  4. Aric1

    Aric1 Well-Known Member

    Joined:
    Oct 15, 2003
    Messages:
    324
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    Your public_html should be 750, especially with phpsuexec installed since PHP runs as the user, "nobody" should not have to access your files.

    With phpsuexec you can't put PHP directives in .htaccess like you normally would. They have to go into a php.ini file in that directory instead.

    Any files or directories chmodded over 755 will produce errors with phpsuexec.
     
  5. Roy@ENHOST

    Roy@ENHOST Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    495
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Los Angeles California
    I am aware of that.
    But public_html kept getting chmodded 750 even after I uninstalled phpsuexec.
    I suspect Cpanel CRONned a process to do that, maybe Im just paranoid. :mad:

    And the funny thing is that when I access the site from the browser, it displays OK.
    The error only appears when I used PHP script to access/import the page from that site.
    A DNS error maybe? :cool:

     
  6. Aric1

    Aric1 Well-Known Member

    Joined:
    Oct 15, 2003
    Messages:
    324
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    public_html is drwxr-x--- regardless of phpsuexec.
     
  7. Roy@ENHOST

    Roy@ENHOST Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    495
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Los Angeles California
    I think my best bet would be to check out some error logs.
    Is there any way that I can find a more detailed error log?

    The apache error_log doesn't say anything.
     
  8. arcane

    arcane Member

    Joined:
    Oct 25, 2004
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I suggest downgrading to PHP 4.3.8 as I have, and the 500 Internal Server Error for one of my php scripts works fine now.
     
  9. Roy@ENHOST

    Roy@ENHOST Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    495
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Los Angeles California
    Guys,

    I have solved the problem.
    It was due to overhardening of server.

    The mod_security prevents PHP scripts from getting contents from the sites on my server.
     
  10. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    This Planet
  11. Roy@ENHOST

    Roy@ENHOST Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    495
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Los Angeles California
    Its a very good article although it's not going to help in my situation because it was due to Mod_security.

    The first sentence:
    I will have to disagree with that. :D
     
Loading...

Share This Page