CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
HTTP 500 internal server error



Nov 22, 2000, 9:12 PM

Post #1 of 3 (268 views)
HTTP 500 internal server error Can't Post

 Hi everyone, please help.

I downloaded a script and try to install it onto my school UNIX system.
By UNIX command <<perl test.cgi>> to execute it produced all HTML code(look fine) but on the web browser I always get "HTTP 500 internal server error"

The HTML code is fine and it display a page when I copy them and save as .html .

I also chmod 755 for the file too.

Anyone have any ideas? Please help.

All your helps are very appreciated !!!...


Nov 25, 2000, 2:45 AM

Post #2 of 3 (268 views)
Re: HTTP 500 internal server error [In reply to] Can't Post

A 500 error can be caused for many reasons. Instead of using perl test.cgi on UNIX, try perl -cw test.cgi. This will run it in "strict" mode, pointing out any possible faults. Also, make sure that the shebang line is correct, most probably it should be #!/usr/bin/perl. I have found in the past that if you just use #!usr/bin/perl it looks in the current directory, so you need the previous stroke. If all else fails, could you post a link to the working (or not so) version, and post the code here?

My Little Webring
The Best Of All That Is British
Cult Forums - Cult CGI forum

Linux - Join the revolution!!!

[This message has been edited by chrisabrooks (edited 11-25-2000).]


Nov 25, 2000, 9:03 AM

Post #3 of 3 (268 views)
Re: HTTP 500 internal server error [In reply to] Can't Post

Another possible cause of your problem is that you did not include a header in the output. Before you output the html, be sure to include a line as follows:

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

Erich Musick


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives