[thelist] Apache problem: CGI not working
Seb Barre
sebastien at oven.com
Mon Nov 27 15:49:43 CST 2000
At 02:51 PM 11/27/2000 -0600, you wrote:
>I've got a simple "Hello World" in my cgi-bin but the page only displays
>an Internal Server Error. What do I need to do to make sure the page
>works? Does the extension of the file matter (i.e. .cgi, .pl etc)?
I would need more details to really understand what's happening, but the
first things I would check:
1. Is Perl properly installed on the machine?
2. Does the script's first line point to the proper path & file of your
perl binary? (ex: #!/usr/bin/perl or #!C:\perl\bin\perl.exe)
3. Is the web server set up to serve CGIs from that directory? This would
be set up in your config file(s). See the docs for more details, or the
sample config that most likely comes with your server. If you're serving
the script from a traditional cgi-bin directory, then the extension
shouldn't matter (not 100% sure on this for IIS or other Win32 servers, but
Apache and most unix based ones work like this).
4. Is the CGI outputting a proper Content-type header before starting to
print? It should send out "Content-type: text/html\n\n" (two breaks are
needed) before anything else. I'm assuming you're outputting text or HTML
here. The header would change if you're outputting images or other content.
That's it for starters. If you're really having trouble and are by chance
using Apache, email me off-list with more details (or post the details to
the list, I'm sure others can help too), and we'll see what we can do to
help out.
></ml>
>
>---------------------------------------
>For unsubscribe and other options, including
>the Tip Harvester and archive of TheList go to:
>http://lists.evolt.org Workers of the Web, evolt !
--- -- -
Seb Barre - seb at oven.com
OVEN Digital Toronto
Work: 416-595-9750 x 222
Mobile: 416-254-5078
http://www.oven.com/
More information about the thelist
mailing list