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.

CGI > Error 500

Discussion in 'General Discussion' started by DjMiX, Dec 8, 2004.

  1. DjMiX

    DjMiX Well-Known Member

    Joined:
    Nov 2, 2004
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    Hello :)
    I've got a little problem, but it's really annoying. Everytime I run a CGI script, I get an error 500, any idea were this could come from ?

    Thanks in advance
     
  2. linux-image

    linux-image Well-Known Member

    Joined:
    Jun 8, 2004
    Messages:
    1,192
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    Root Administrator
    have u tested upon the script locally; are there any errors on this script ? and also u will need tocheck on the permissions on this script.
     
  3. kctalker

    kctalker Member

    Joined:
    Dec 7, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Try chmod to 755 instead of 777 - worked for me.
     
  4. DjMiX

    DjMiX Well-Known Member

    Joined:
    Nov 2, 2004
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    It does that for all the scripts.
    I tried chmodding, doesn't arrange.
     
  5. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    What permissions do you have on your cgi-bin directory itself? That needs to be 755. You could also try:

    /scripts/enablefileprotect

    You should also be checking for errors in:

    /etc/httpd/logs/error_log
    /etc/httpd/logs/suexec_log
     
  6. OCX

    OCX Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    232
    Likes Received:
    0
    Trophy Points:
    16

    in your script open it and look at the very top line
    make sure your path to perl is correct

    #!/usr/bin/perl OR /usr/local/bin/perl

    to find out what path for sure..open up ssh and type
    "which perl" (without the quotes of coarse)
     
  7. sleddog

    sleddog Active Member

    Joined:
    Jun 13, 2004
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Labrador, Canada
    If you're uploading these scripts from a Windows box, make sure they are uploaded in ASCII mode, not binary. The line endings are different between Windows & Linux and will cause errors when a script is executed.
     
Loading...

Share This Page