CGI Not Working

Discussion in 'Site & Server Administration' started by Kalyse, Dec 16, 2006.

  1. #1
    Hello,

    I have CGI scripts that I am trying to run but I just get 500 Internel Server Error on them.

    I have them in the cgi-bin directory and I call them correctly.

    I run Plesk 8.0.1

    Can anyone suggest the problem?
     
    Kalyse, Dec 16, 2006 IP
  2. ub3r

    ub3r Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Have you made sure they are chmod 755? You should check your server's error_log as well.

    Just about any error, whether it be bad permissions, or bad code will return a 500 error.
     
    ub3r, Dec 17, 2006 IP
  3. Kalyse

    Kalyse Peon

    Messages:
    1,221
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yeah I did CHMOD 755
     
    Kalyse, Dec 17, 2006 IP
  4. ub3r

    ub3r Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    have you checked your error_log ?
     
    ub3r, Dec 17, 2006 IP
  5. JEET

    JEET Notable Member

    Messages:
    3,832
    Likes Received:
    502
    Best Answers:
    19
    Trophy Points:
    265
    #5
    Are you giving out proper header? Like:

    print "Content-type: text/html\n\n";

    You can also try:
    Open the script in your text editor, and under the path to Perl on the
    first line, place this:

    use CGI::Carp qw(fatalsToBrowser);

    This should show you the reason for the error, and it will be easier to fix.

    Then upload the script again, set it to executable and point your browser

    Make sure to remove that line once you have the error known.
    Bye :)
     
    JEET, Dec 18, 2006 IP