"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?
"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
or
*.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 ?
Martin
Windows and Linux work Together IT-Pros
Community Member Award 2011
HCamper
8048 Posts
Re: Host Perl on IIS 7 By CGI , windows serveice 2008 sp1 64x. Get result not expected.
Jun 07, 2011 03:32 PM|LINK
Hello,
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.
Martin
Community Member Award 2011
felixz
21 Posts
Re: Host Perl on IIS 7 By CGI , windows serveice 2008 sp1 64x. Get result not expected.
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
====================================perltest.pl=========================================
#!/usr/bin/perl
print "Content-type: text/plain\n\n";
print "Hello world!\n\n";
print "Press the Enter key to exit.\n";
<>; #pause
=====================================================================================
My current environment :
After that, I do follow steps:
*.pl
C:\Perl\bin\perl.exe "%s" %s
set "Managed Pipeline Mode" = Classic
set "Enable 32-Bit Applications" = True
return
Show a download box, click "Yes" the perl file will be download.
Base on these step:
*.pl
c:\perl\bin\perlis.dll
Show 500.0
HTTP Error 500.0 - Internal Server Error
Calling GetProcAddress on ISAPI filter "C:\Perl\bin\perlis.dll" failed
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.
felixz
21 Posts
Re: Host Perl on IIS 7 By CGI , windows serveice 2008 sp1 64x. Get result not expected.
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.
HCamper
8048 Posts
Re: Host Perl on IIS 7 By CGI , windows serveice 2008 sp1 64x. Get result not expected.
Jun 08, 2011 05:44 PM|LINK
Hello,
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.
Martin
Community Member Award 2011
felixz
21 Posts
Re: Host Perl on IIS 7 By CGI , windows serveice 2008 sp1 64x. Get result not expected.
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
*.pl
FastCgiModule
"C:\Perl\bin\perl.exe" "%s" %s
3. I get 500.0 result
HCamper
8048 Posts
Re: Host Perl on IIS 7 By CGI , windows serveice 2008 sp1 64x. Get result not expected.
Jun 09, 2011 02:24 AM|LINK
Hello,
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 http://support.microsoft.com/kb/245225 .
The 500 error is not that usefull look at list http://support.microsoft.com/kb/943891
so use this guide http://learn.iis.net/page.aspx/267/how-to-use-http-detailed-errors-in-iis-70/ .
To get more details for the types of errors.
Hope this gets you going.
Martin
Community Member Award 2011
felixz
21 Posts
Re: Host Perl on IIS 7 By CGI , windows serveice 2008 sp1 64x. Get result not expected.
Jun 09, 2011 03:02 AM|LINK
in the post "Running Perl on IIS 7 "
http://blogs.iis.net/wadeh/archive/2009/04/13/running-perl-on-iis-7.aspx
author said
"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?
HCamper
8048 Posts
Re: Host Perl on IIS 7 By CGI , windows serveice 2008 sp1 64x. Get result not expected.
Jun 09, 2011 03:39 AM|LINK
Hello,
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
or
*.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 ?
Martin
Community Member Award 2011
felixz
21 Posts
Re: Host Perl on IIS 7 By CGI , windows serveice 2008 sp1 64x. Get result not expected.
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"
felixz
21 Posts
Re: Host Perl on IIS 7 By CGI , windows serveice 2008 sp1 64x. Get result not expected.
Jun 09, 2011 09:32 AM|LINK
I follow this link
http://www.websitepanel.net/kb/installing-and-running-active-perl-runtime-as-isapi-on-microsoft-iis-7.0
setting my windows server 2008 IIS 7.0
and the perl is work now.
detail setting is below:
*.pl
c:\perl\bin\perl.exe %s %s
ps. here no need "%s" just %s is ok