ActiveBlog

Setting up IIS for ActivePerl
by Graham Stuart

Graham Stuart, June 21, 2010

In the good old days, you could turn on IIS 5, install ActivePerl, and get a working integrated setup for your Windows systems right out of the box. However, policy changes released with IIS 7, IIS 7.5, and recent service packs for IIS 5 and 6 have prevented the existing ActivePerl installers from automatically setting up all the configuration needed to use ActivePerl inside your IIS server. A number of additional manual steps have been required before Perl-driven web pages would work. What needed to be changed, and how you changed it, was different for each version of IIS. If you didn't know much about IIS, the whole thing could be quite frustrating to get right.

Of course things were never perfect. Even in the good old days, if you decided to turn on IIS after you installed ActivePerl, you had to set things up manually or put yourself through a re-install.

ActiveState has created something to help you out. With ActivePerl 5.10.1.1007 and higher we have been including a new tool called "ap-iis-config". 1007 and higher installers will call this tool automatically, restoring their ability to configure the current generation of IIS products. Since this is a stand-alone tool, you can also use it if you switch on IIS after ActivePerl has been installed, or if you just want to tweak your server configuration. "ap-iis-config add all" will add all applicable script mappings to both the root configuration and to the default website. Here's an example for doing something more specific:

  ap-iis-config add all --site 1 --cgi --isapi

The --site option specifies that the changes will only apply to site 1 (you can find the site ID's with ap-iis-config list sites). The --cgi and --isapi options adds a *.pl mapping for perl.exe and the --isapi option adds a *.plx mapping for perlis.dll, the Perl for ISAPI plugin. There's also a --perlex option which will add both *.plex and *.aspl mappings for the PerlEx plugin. If no --site is specified, then the script mappings will be added to both the root configuration and to the default web site (sites 0 and 1). In that case, ap-iis-config will also add a virtual PerlEx directory to the default web site that will point to the PerlEx samples directory (if installed).

To make things even easier if you are on Windows Vista or later, 'ap-iis-config add all' will install IIS 7 or 7.5, including the optional CGI and ISAPI modules as required. On older versions of Windows, IIS must still be installed manually.

ap-iis-config can do other IIS management actions related to ActivePerl setup. For the full story, you can read the man page here:

http://docs.activestate.com/activeperl/5.10/bin/ap-iis-config.html

Subscribe to ActiveState Blogs by Email

Share this post:

About the Author: RSS

Graham Stuart is a technical support rep for our enterprise dynamic language distributions for ActivePerl, ActivePython, and ActiveTcl. Before joining ActiveState, Graham worked in telecommunications with Tekmark Global Solutions, Nortel Networks, and Prism Systems. Graham holds a B.Sc. in Physics from the University of Alberta.

Comments

9 comments for Setting up IIS for ActivePerl
Permalink

activerperl 5.12.2 with Server 2008R2 and IIS 7.5 does not install examples properly

ap-iis-config does not autorun
and when I run manually it fails
uninitialized value $path in -f at c:\Perl64\bin/ap-iis-config Line 357

Permalink

Though it's not off-topic, the ActivePerl Support forum is the best place to figure out issues like this.

Permalink

I've read elsewhere (e.g. http://blogs.iis.net/wadeh/archive/2009/04/13/running-perl-on-iis-7.aspx) that IIS will not work with 64-bit ActivePerl, only with 32-bit ActivePerl. Is that still the case?

Permalink

I have tried the functions specified on Windows 7 Professional 64 bit, and have discovered the following:

1) Add All does NOT add anything but the mapping information for .pl files
2) the --isapi option does nothing
3) the --perlex option does nothing and gives an error

I have still been unsuccessful in getting my applications set up. I CAN run scripts directly, but I cannot call a script from an HTML page

Permalink

Contact support [at] activestate [dot] com and we'll look into this.

Permalink

This is BS and doesn't work!

I used [quote]ap-iis-config add all [--cgi][/quote]

I still just get [quote]405 - HTTP verb used to access this page is not allowed.[/quote]

I used to love perl, but I'm going off it real fast!

Permalink

Where does it show the steps to configure this manually?