Connecting Tech Pros Worldwide Forums | Help | Site Map

Newbi - Perl and IIS

Newbie
 
Join Date: Apr 2006
Posts: 2
#1: Apr 4 '06
I am trying to work thru the book “Sams Teach Yourself CGI” and am having trouble running the first sample script.

+++++++++++++++++++++++++++
#!C:\ProgramFiles\Perl\bin\perl

use CGI;

$query = new CGI;

print $query->header;

print "<html><head><title>A test</title></head>\n";
print "<body>The test was successful.</body></html>";
+++++++++++++++++++++++++++

I download and installed Active Perl and installed and started IIS on Windows XP. The script runs fine from the command prompt but, when running from IE (url: http://localhost/CGI_Bin/test.cgi) it just displays all the script in the browser window, on one line, i.e.

#!C:\ProgramFiles\Perl\bin\perl use CGI; $query = new CGI; print $query->header; print "\n"; print "The test was successful.";

Thanks

Newbie
 
Join Date: Apr 2006
Posts: 2
#2: Apr 6 '06

re: Newbi - Perl and IIS


I finally figured out how to get my Perl scripts running on IIS. Here is what I had to do.

First, I had to modify a ScriptMap Registry setting:
http://support.microsoft.com/kb/q150629/

Then I had to change the execution permissions on the CGI-Bin folder to allow scripts and executables to be run:
Control Pane->Admin Tools->Internet Information Services


Hope this helps someone else.
Reply