CGI problem

Posted by abrayshaw on 2008-05-20 06:51

This is probably a server problem, but .....
I've installed ActivePerl on my company's Windows 2003 server without problems, and I can test the perl install from the command line, also without problems.
I've written a perl test script, which passes the syntax test from the command line. But, when I try to execute it from a browser window, I get the error "The specified CGI application misbehaved by not returning a complete set of HTTP headers"
Can anyone point me in the right direction to solve this?

sang33ta | Sat, 2008-06-07 03:20

Did you print a HTML header to say the output was a web page? Something like..

print "Content-type: text/html\r\n\r\n";

abrayshaw | Wed, 2008-06-11 10:45

Here's my perl script:
#!C:\Perl\bin\perl.exe -wT
use strict;

print "Content-type: text/html\n\n";

print <

Perl Test

Perl Test 1

Show me the monkey with my new server!


I got this test script from a tutorial book. I'd greatly appreciate it if you could tell me if there's something wrong here. Thanks!