1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

CGI - 500 server error

Discussion in 'Web Design & Development' started by bymars, Aug 2, 2006.

Thread Status:
Not open for further replies.
  1. bymars

    bymars Thread Starter

    Joined:
    Mar 28, 2005
    Messages:
    7
    Hello,

    I am receiving this error message "500 server error" when I am trying to run a test cgi script that use to work on my server but does not work any more??

    Now I tried it this way "#!/usr/local/bin/perl" and also "#!/usr/bin/perl" and it still has this problem?
    I also have the permissions set to 755.

    I then called tech support for the hosting co. and they put their own test script in the "cgi-bin" folder and got it to work.

    Here is the test script that I cant get to work anymore:

    ------------------------------------------------

    #!/usr/local/bin/perl

    print "Content-type: text/html\n\n";
    print "<html><head><title>Success!</title></head>\n";
    print "<body bgcolor=\"#dddddd\"><div style=\"text-align:center;font- family:verdana;font-size:11px;\"><br><br><br><h5>Hello world!</h5>\n";
    print "<br>Your server allows you to run CGI scripts.</div></body></html>";

    exit;

    -------------------------------------------------

    I am trying to run another script that is more complex but it wont work just like this test script wont work anymore?

    any help would be great, thanks in advance!
    bymars.
     
  2. sono

    sono

    Joined:
    Aug 2, 2006
    Messages:
    1
    Try the following:



    #!/usr/bin/perl

    print "Content-type: text/html\n\n";
    print "<HTML><HEAD>";
    print "<TITLE>CGI Test</TITLE>";
    print "</HEAD>";
    print "<BODY><H2>Hello world!</H2>";
    print "</BODY></HTML>";
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/488875

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice