[thelist] perl scripts causing server error

Anthony Baratta Anthony at Baratta.com
Tue Apr 16 11:43:00 CDT 2002


At 09:32 AM 4/16/2002, BT Bigpant wrote:
>work) and put the following script into the same directory. I CHMOD'd it
>577, as per the functioning scripts, and checked the first line correctly
>points to Perl.
>
>#!/usr/bin/perl
>print "Hi there!";
>
>I get "Internal Server Error". I can't figure out what is going wrong. Any
>suggestions ?

As someone else said: chmod 755 is the correct format, but that is not
causing your problem.

I'm assuming you are activating the script via a web browser, instead of
the command line. You need to pass the content type along with the script
output in order for Apache work with the script correctly.

e.g.

# First line before tossing output to the browser
# the two returns are required.
print "content-type: text/html \n\n";
---
Anthony Baratta
President
Keyboard Jockeys

"Conformity is the refuge of the unimaginative."




More information about the thelist mailing list