sstewart has asked for the wisdom of the Perl Monks concerning the following question:

well, i decided to jump into webserving for myself and i think i am having a problem in the configuration of the server. all the permissions are set correctly at 755 on the scripts and the cgi-bin directory. perl modules are installed but whenever i try to run a script made by anyone i get:

Server error!
The server encountered an internal error and was unable to complete your request.
Error message:
Premature end of script headers: script1.pl
If you think this is a server error, please contact the webmaster Error 500


Even when trying to excecute a simple script such as:
#!perl-w #Script: plaintext.pl use CGI ':standard'; print header('text/plain'), "Nothing to it! Hello World!";
What am i doing wrong? TIA Sly

Replies are listed 'Best First'.
Re: Having problems configuring the server?
by PodMaster (Abbot) on Jun 25, 2003 at 22:31 UTC
Re: Having problems configuring the server?
by Vorlin (Beadle) on Jun 26, 2003 at 01:23 UTC
    I could be reading this wrong, but I see two possible issues:

    1: the #!perl-w should be #!/path/to/perl -w
    2: space the -w so it reads perl -w

    Let me know if this is completely mis-read, however.
Re: Having problems configuring the server?
by CukiMnstr (Deacon) on Jun 25, 2003 at 22:23 UTC
    The script looks fine, so check the webserver's error log to find out what is wrong in your setup.

    hope this helps,

Re: Having problems configuring the server?
by jsprat (Curate) on Jun 26, 2003 at 00:50 UTC
    Does your shebang say "perl-w" or "perl -w"?