PDA

View Full Version : Agrivating error message (script included)



DaveP
February 10th, 2001, 17:41
OK, i recieved an error "500" i believe it was, saying that I had a script error and the reason was "premature end of script". What does this mean and what do I have to modify or add to get my script up and running. The simple script that i'm tring to make work is below:


#!/usr/bin/perl
print "Content-type:text/html";
print "<meta http-equiv=refresh value=next.htm>";
print "<html><head><title>Test Page</title></head>\n";
print "<body>\n";
print "<h2></h2>\n";
print "</body></html>";

Nick
February 10th, 2001, 18:58
It should be:

#!/usr/bin/perl
print "Content-type:text/html\n\n";
print "<meta http-equiv=refresh value=next.htm>";
print "<html><head><title>Test Page</title></head>\n";
print "<body>\n";
print "<h2></h2>\n";
print "</body></html>";

DaveP
February 10th, 2001, 19:19
I still recieved the same error:
The exact error reads:

"Premature end of script headers: /data1/hm/djapnet/hello-world.pl"

keith
February 11th, 2001, 02:02
since it's a perl script, just make it read like this:

#!/usr/bin/perl
print "Location: http://www.url.com/path/to/next.htm\n\n";

it'll do the same thing, only faster. like instantaneously.

[Edited by keith on 02-11-2001 at 02:05 AM]