I have IIS 7.0 on Vista Business and ActivePerl. However I can't get perl to run. The earlier posting http://support.activestate.com/forum-topic/configuring-perl-on-iis-7 was really useful in getting me to where i am. However I still have problems.
When I run a test program I get this
HTTP Error 502.2 - Bad Gateway
Description: The specified CGI application did not return a complete set of HTTP headers.
Error Code: 0x00000000
Notification: ExecuteRequestHandler
Module: CgiModule
Requested URL: http://localhost:80/cgi-bin/hello.pl
Physical Path: C:\inetpub\wwwroot\cgi-bin\hello.pl
However I can run the program from the command line
C:\Users\Bob> C:\inetpub\wwwroot\cgi-bin\hello.pl
Content-Type:text/html
Hello World!
Hello World!
In the default Web Site I have a handler set up - The executable is in C:\Perl\bin\perl.exe. The mapping screen shows this.
Perl *.pl Enabled File CgiModule Local
The file permissions for hello.pl are for the user IIS_IUSRS: Read & Execute and Read
The server log is not much help
2007-05-25 14:55:46 ::1 GET /cgi-bin/hello.pl - 80 - ::1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.0;+SLCC1;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506) 502 2 0
I tried turning offf the (Norton) firewall but no change.
OK I fixed my problem. I switched form Perl.exe to perlis.dll.
Now it magically works.
Bob
Hi Bob,
Well, I took your advice on switching the .exe file to .dll file. Although either way, be it the .exe or .dll - I can sucessfully print out the static "Hello World" script through IIS7. Otherwise, I'm primarely having issues with a much more dynamic .pl file. In this case, the perl.dll file doesn't seem to resolve the error 502 message.
RJD
I kept running into this error when I was writing the documentation for ActivePerl config on IIS 7 (will be in the next ActivePerl release). I had forgotten to restart IIS.
For the record, here are the instructions:
To configure ActivePerl to work with IIS 7 on Windows Vista:
(Control Panel | Administrative Tools | IIS Manager).
Connections tree on the left. For example, if you
want to use .pl scripts in only one website, selet that site under Web Sites.
Modify the path to the Perl executable as necessary.
dialog box.
Your Web Server Configuration.
Use the same process with "Request path: *.cgi" to add a CGI script mapping.