in reply to Serious newbie needs some help with a cgi script on a windows platform

Thanks all. Now I know what the shebang line should look like! All this information is very helpful! Here is my code. It's a simple enough script. The problem is that when I bring up the script in a browser, I see a brief glimpse of a dos window and then it does nothing. I am not seeing any HTML generated.

#!C:\perl\bin\perl.exe -w
print "Content-type: text/html\n\n";
print "<HTML>\n";
print " <HEAD>\n";
print " <TITLE>CGI Output</TITLE>\n";
print " </HEAD>\n";
print " <BODY>\n"; print " This is a response to your HTTP request
\n";
print " </BODY>\n";
print "</HTML>";

  • Comment on Re: Serious newbie needs some help with a cgi script on a windows platform

Replies are listed 'Best First'.
Re^2: Serious newbie needs some help with a cgi script on a windows platform
by kiat (Vicar) on Jun 14, 2005 at 10:04 UTC
    Hi elbee,

    I copied and pasted your code and saved it in a file name "cgitest.pl" and ran it as:

    http://127.0.0.1/cgitest.pl

    On Windows XP, Apache 2.0.53

    No problem, the page was displayed.

    Did you set up the Apache config file correctly?