IIS 7 & IIS 8
Configuration & Scripting
Host Perl on IIS 7 By CGI , windows serveice 2008 sp1 64x. Get result...
Last post Jul 16, 2011 06:21 PM by HCamper
Jun 07, 2011 03:32 PM|LINK
When you add directories "C:\TextCatIIS\" that are not in IIS Server
you need to manually add the permissions for the IUSR and IIS_USRS or other accounts.
Also do not add the perl script as default document.
For the handlers remove current or duplicate entries.
Currently you need to restore the handler that installer created.
Default or basic mapping of *.pl and point to "C:\Perl\bin\perl.exe" "%s" %s with name "Perl Script"
restrictions of file with verbs Get,HEAD,POST and execution as script.
After the settings have been set go to the Web Site you created TextCatIIS and enable the handler.
Check the ISAPI Restrictions pane and check that there is a single entry with the path and parameters from above.
Check your test script.
If the test script works then you can add addtional ISAPI mapping as shown in the guide.
You can have mappings for Perl to handle file or file & folder each with Unique Name and types of actions or restrictions.
Yes, The steps for creating handlers and mapping's can be confusing at first. You can make this work.
Jun 08, 2011 07:22 AM|LINK
Thanks HCamper for you response me.
I have create a "perltest.pl" file in "C:\inetpub\wwwroot" location
print "Content-type: text/plain\n\n";
print "Hello world!\n\n";
print "Press the Enter key to exit.\n";
My current environment :
After that, I do follow steps:
Base on these step:
What I want is get the result when I use Mechina Name to access IIS
This issue follow me like a ghost almost a week, its very strange I have try all the setting.
Thanks for your help again.
Jun 08, 2011 09:27 AM|LINK
It looks like
if I use CGI, the handle mapping not working when the URL link not use localhost but serverName
if I use ISAPI, its just work in ISAPI Filters, and the perlis.dll can not be access.
Jun 08, 2011 05:44 PM|LINK
You have to check the subtle differences
using the path to Perl as "C:\Perl\bin\perl.exe" "%s" %s
with proper quotes is different than C:\Perl\bin\perl.exe "%s" %s .
Note: The handlers appear in two places in Features View the Machine and Default Web Server.
After you make the handler changes you need to enable the handler in the Default Web Site.
The 500 error is permissions problem for the Default Web Server for Application Pool and or Identity used.
Check the link for Perl and Buzilla there is a picture showing the ISAPI restrictions and the
path to Perl will appear in that location you need to check that there are no un-named duplicates and path is correct.
Jun 09, 2011 02:12 AM|LINK
Thanks for you response Martin,
I have try the path "C:\Perl\bin\perl.exe" "%s" %s
but, give me same result.
and I find in the before, I have not set the machine handle mapping.
after I set the handle mapping in machine part.
it returns same result too.
after them all,
1. I remove the perl script mapping
2. I add module mapping
"C:\Perl\bin\perl.exe" "%s" %s
3. I get 500.0 result
Jun 09, 2011 02:24 AM|LINK
I suggest you check the Jetstat @ dot com web site
they have a free dignostics tool called ASP Diag.
The diag tool can be used to check server variables PHP and perl.
The Asp Diag may help you work out the perl issues.
General Disclaimer: The ASP Diag is not a Microsoft Supported Product.
For a Microsoft Supported note check this
The 500 error is not that usefull look at list
so use this guide
To get more details for the types of errors.
Hope this gets you going.
Jun 09, 2011 03:02 AM|LINK
in the post "Running Perl on IIS 7 "
"Sometimes, though, the right tool for the job is not the newest and flashiest thing. It turns out that this is the case for Perl. For many years,
ActiveState has provided a free version of
ActivePerl that runs great on IIS using ISAPI instead of FastCGI."
So, is there use ISAPI is better than FastCGI in host perl on iis?
Jun 09, 2011 03:39 AM|LINK
If you look later in the post additional notes:
"There are at least two different ISAPI extensions with ActivePerl"
"You should make sure that you use PerlEx30.dll with IIS 7."
"If you use perlis.dll, you may find that response headers sent from your Perl script are added to your response page instead of going back to the client as headers."
His conclusion was the Active state ISAPI runs great in comparision to FastCGI and perl.
You can have both the ISAPI and FastCGI handlers with mappings using different names and types of access.
The current problem is getting at least one of the possible (pl cgi) Handlers and Mappings working for Web Server settings then in Web Sites.
The Perl Script Handler using a *.pl or *.cgi map with path to perl.exe
*.pl path to perl dll then you need to enable in Machine aka IIS Server then enable in Web Site and set the correct permissions.
The Microsoft Support article maybe words the steps better that the post by Wade ?
Jun 09, 2011 05:41 AM|LINK
Now , the helloworld.pl is work correct in windows 7 and IIS 7.5 with CGI.
I remove the Perl, and matnual remove c:\perl folder.
after that I reinstall the perl,
1. not select PPM
2. uncheck all of the options prompted
3. enable all feature under "Internet Infomation Services"
Jun 09, 2011 09:32 AM|LINK
I follow this link
setting my windows server 2008 IIS 7.0
and the perl is work now.
detail setting is below: