Problems with first-time CGI !

Dag Wieers (dag@dds.nl)
Fri, 23 Aug 1996 23:34:42 +0200 (MET DST)


I've got some serieous problems while running a simple CGI-file !

This is the error from the server :
--------------------------------------------------------------------------------
500 Server Error

The server encountered an internal error or misconfiguration and was unable
to complete your request.

Message: CGI output from C:/WebSite/cgi-shl/prg2.pl contained no blank line
separating header and data

Please contact the server administrator at webmaster@unicall.be and inform
them of the time the error occured, plus anything you know of that may have
caused the error.
--------------------------------------------------------------------------------
And this was what caused (?) it:
--------------------------------------------------------------------------------
#!/usr/local/bin/perl

require 'cgi-lib.pl';
#require 'decode.pl';

@months =
("january","february","march","april","may","june","july","august","septembe
r","october","november","december");
@dotws =
("sunday","monday","tuesday","wednesday","thursday","friday","saturday");

print "Content-type: text/html\n\n";
print "<html><head><title>PERL url-search-string</title></head>\n";
print "<body bgcolor=#ffffff text=#0000ff link=#000000>\n";
print "<div align=center><font size=5><tt><b>\n";
print "PERL url-search-string\n";
print "</b></tt></font></div>\n";
print "<hr width=50% size=1>\n";
if (&ReadParse) {
 foreach $key (sort(keys(%in))) {
  print "$key = ".$in {$key}."<br>\n";
 }
};
print "<hr width=50% size=1>\n";
($sec,$min,$hou,$day,$mon,$yea,$dotw) = localtime(time);
print "By the way it is now ".$dotws[$dotw]." ".$months[$mon]." ".$day."th
".$yea."<br>\n";
print "To be precisly ".$hou."h ".$min."min ".$sec."sec<br>\n";
print "And you're using ".$ENV{"HTTP_USER_AGENT"}.".<br>\n";
print "<hr width=50% size=1>\n";
print "<div align=right>\n";
print "Dag Wieers (<a href=\"mailto:dag\@dds.nl\">dag\@dds.nl</a>)\n";
print "</div>\n";
--------------------------------------------------------------------------------
Everything works fine if I just run it, but if it's ran from outisde, it won't !
Please help me, cause I'm very stuck, all my scripts give this error !

Thanks in advance,

DAG
----------------------------------------------------------------
email:      dag@dds.nl
dagmenu:    http://www.luc.ac.be/~9410917/
madness:    http://huizen.dds.nl/~dag/madness/
javascript: http://www.luc.ac.be/~9410917/zone/
websearch:  http://www.luc.ac.be/~9410917/home/search.html
-----------------------------------------------------------------