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 Problems

Discussion in 'General Discussion' started by bleerigsby, Aug 14, 2002.

  1. bleerigsby

    bleerigsby Member

    Joined:
    Aug 14, 2002
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    When I try and runn my test.cgi script I get an internl server error! Everything else seems to be working fine. Any idea of what could cause this?
     
  2. ehsan

    ehsan Well-Known Member

    Joined:
    Dec 11, 2001
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    16
    make sure you upload the script as ASCII NOT binary
    and then give it a run permission

    sometimes thats what every one forgets, maybe yours is the same thing:)
     
  3. bleerigsby

    bleerigsby Member

    Joined:
    Aug 14, 2002
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    I tried what you said and still getting error. I also tried /scripts/fixsuexeccgiscripts. But still get the 500 internal server error
     
  4. parag

    parag Well-Known Member

    Joined:
    Aug 16, 2001
    Messages:
    115
    Likes Received:
    0
    Trophy Points:
    16
    [quote:06cc85b02f][i:06cc85b02f]Originally posted by bleerigsby[/i:06cc85b02f]

    I tried what you said and still getting error. I also tried /scripts/fixsuexeccgiscripts. But still get the 500 internal server error[/quote:06cc85b02f]

    can you give us the url - and what script is it?

    best regards
    Parag
     
  5. bleerigsby

    bleerigsby Member

    Joined:
    Aug 14, 2002
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    http://www.groupffa.com/cgi-bin/test.cgi

    It is just a test script that puts welcome in big letters if it works
     
  6. ehsan

    ehsan Well-Known Member

    Joined:
    Dec 11, 2001
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    16
    Thats what I would do:

    I will first delete the file from server,
    then I will make sure script is correct,
    include path is correct in script

    then I will upload the script using wsftp(or ..) mode ASCII.
    then will give it a 755 perm.

    If you still had a problem shoot me a pm containing your script.
     
  7. SHSaeed

    SHSaeed Well-Known Member

    Joined:
    May 9, 2002
    Messages:
    245
    Likes Received:
    0
    Trophy Points:
    16
    If you have suExec enabled, even the directory the script is in needs to be chmod 755. If it still doesn't work, run the script and then do 'tail /usr/local/apache/logs/suexec_log' to see if there are any errors there. Also, I would double check the path to perl (first line of your script).
     
  8. shaun

    shaun Well-Known Member

    Joined:
    Nov 9, 2001
    Messages:
    698
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    San Clemente, Ca
    #!/usr/bin/perl

    print &content-type: text/html\n\n&;
    print &Welcome&;


    Done forget the print &content-type: text/html\n\n&; or it wont work.... if you wanted to make the text larger you could just do like....

    #!/usr/bin/perl

    print &content-type: text/html\n\n&;
    print &&p&&font size=\&7\&&Welcome&/font&&/p&&;


    or

    #!/usr/bin/perl

    print &content-type: text/html\n\n&;
    print '&p&&font size=&7&&Welcome&/font&&/p&';


    Make sure the script is owned by the correct user and has the perms of 750 (755 will work but i dont like 755 because of security reasons).
     
  9. Annette

    Annette Well-Known Member
    PartnerNOC

    Joined:
    Aug 12, 2001
    Messages:
    445
    Likes Received:
    0
    Trophy Points:
    16
    The first place to look is at your error log. What does it say? It's better to start there than to have everybody take guesses at what the issue might be.
     
Loading...

Share This Page