I am trying to configure Perl on IIS 7.0, and all the documentation I can find on configuring IIS is for 6.0 and lower. And 7.0 is different, so I can't figure out how to configure this correctly.
Can anyone tell me how to do this?
I, too was stumped by this and could find nothing useful on the net - so figured it out by trial and error and by poring through pages of info on the internet.
print "Hello world!\n\n";
print "Press the Enter key to exit.\n";
1st Rate Articles
I'm sorta newbie to all this stuff: i have just installed activeperl for Win vista, and have installed/enabled all components for iis7 on my window vista ultimate editin. when i try to run any *.cgi scripts, i keep on getting the "file save" dialogue from my ie...do you know what may be wrong? would really appreciate your help on this issue...i would be willing to elaborate further if required.
I am receiving the error shown below. The code is a simple login form with a "method=post" command in the form. I tried all the above, and still can't make it work. The code worked in IIS 5, and also works up on our linux servers. Any ideas would definitely be appreciated.
Server Error in Application "Default Web Site"
HTTP Error 405.0 - Method Not Allowed
Description: The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.
Error Code: 0x80070001
Requested URL: http://127.0.0.1:80/caboodle/pos/adminindex.cgi
Physical Path: C:\sites\caboodle\pos\adminindex.cgi
Logon User: Anonymous
Logon Method: Anonymous
Most likely causes:
The request sent to the Web server used an HTTP verb that is not allowed by the module configured to handle the request.
A request was sent to the server that contained an invalid HTTP verb.
The request is for static content and contains an HTTP verb other than GET or HEAD.
A request was sent to a virtual directory using the HTTP verb POST and the default document is a static file that does not support HTTP verbs other than GET or HEAD.
What you can try:
Verify the list of verbs enabled for the module handler this request was sent to, and ensure that this verb should be allowed for the Web site.
Check the IIS log file to see which verb is not allowed for the request.
Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click here.
More Information... This error means that the request sent to the Web server contained an HTTP verb that is not allowed by the configured module handler for the request.
Server Version Information: Internet Information Services 7.0.
Very clear and useful. This has saved me hours of time.
However I still can't get perl to work and have posted a new question
OK I fixed my problem. I switched form Perl.exe to perlis.dll.
Now it magically works.
Here are some things I have discovered in porting a Perl Content management System from Unix to IIS which other may find useful:
At step 7:
1. Perl.exe didn't work for me at all.
2. perlex30.dll worked better but only some things were OK (I think it is like Mod_perl)
3. perlis.dll worked and programs developed for Unix originally seem to pretty much work out of the box.
The information in the manual about turning the headers on or off using the registry entry EnableCGIHeaders doesn't seem to be correct.
You have to output ALL the mime headers you need. e.g.
print "HTTP/1.0 200 OK\nContent-type:text/html\n\n";
The perl error log including anything you print to STDERR is at c:\Perl\bin\PerlIs-Err.log
The shebang line is ignored but any switches in it are not. A program with -T in the shebang line failed to run and ran when I took it out. The error log wasn't very useful. -W stopped it running as well.
Hi, On trying these guides under 64 the system will not allow the arguements "%s" %s in the path name. It claims invalid path. Have tried wrapping whole lot in quotes but it doesn't work. Am I missing something obvious?
Perl is in and running as it executes from command line fine, it's adding the modules to IIS7 64 that I'm stuck on.
Well... I followed the steps but couldn't get the script to run. Then (just for sake of experimentation) I clicked 'Yes' to the ISAPI message and that's it... It just started working!
Should I be concerned regarding this setting? Can I possibly have some issues with this?
I think the part of saying no is incorrect. I have the perl.exe working on vista ultimate 32bit. The configuration requiremnets for vista IIS is similar to 2003 IIS. You must allow the module in the restrictions part of IIS.
Look at my two screenshots of my system. They should help you
Of course change perl path to where you installed perl on your system.
I think it is IIS 6.0. Sorry, I am more of a developer than a network/system admin but I have to jump into this right now. I got IIS running on a Windows Server 2003 and for the life of me, I can't get Perl to work. I tried everything suggested but the last little part is always different for me than what's suggested and shown. For example, in that detailed step-by-step on setting up Perl in IIS Manager, what's Handler Mappings? I was able to set up the path and everything in IIS Manager -> domain (local computer) -> Web Sites -> virtual directory (Properties) and when the Properties windows, tab "Virtual Directory" and under "Application Settings", under "Starting Point" when you click on the "Configuration" button on the right.
Is that it? Or I shouldn't do this under Virtual directories?
Help please! I really don't want to develop this using ASP! This is why I am trying to get Perl to work on IIS!
I cannot begin to express my anger at Microsoft. IIS is horrible! Absolutely horrible!! And it gets worse each release!!
I used this document to help with my IIS 7.00 system on Windows 2008 Server. It was a great help, thank you.
Oddly enough the DLLs using IsapiModule would only load the page, but would not run my scripting logic. I spent several hours trying to debug the script logic before figuring out that the problem was with the IIS 7.0 configuration.
I tried this change and my scripting logic started to work! I could actually code a web page that could call external commands which (by design) the asp web page I was originally coding could not. Thank you again for the simple tutorial.
At the end of step 6, whether I answer 'Yes' or 'No' to the ISAPI message, I am getting the following message back:
" [red X] The specified module required by this handler is not in the modules list. If you are adding a script map handler mapping, the IsapiModule or the CgiModule must be in the modules list. "
This is a IIS7.5 on a Window 2008 server.
The IIS itself functions - I can see static HTML pages OK.
Just cannot implement the mappings for *.cgi and *.pl, because this Isapi message blocks me either way, with Yes and with No in answer.
Which means that you haven't installed all the necessary modules inside of IIS 7.5.
By default IIS 7.5 will only install a minimal set.
You need to re-run the IIS installer, and add all the development tools.
I have completed all the steps above but keep getting the error below?
Can you help?
HTTP Error 502.2 - Bad Gateway
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are "Can't open perl script
The Komodo forums have moved to a new home at forum.komodoide.com, please head over
there to post your topics!
Note that the new forums are a fresh start - you will have to
register a new account.
| Contact Us
© 2016 ActiveState Software Inc. All rights reserved.
ActiveState®, Komodo®, ActiveState Perl Dev Kit®,
ActiveState Tcl Dev Kit®, ActivePerl®, ActivePython®,
and ActiveTcl® are registered trademarks of ActiveState.
All other marks are property of their respective owners.