Tuesday, May 20, 2008

How to run .cgi .pm and .pl (perl scripts) in IIS

After struggling for hours I finally managed to run .cgi, .pm and .pl scripts in IIS. I needed this to test Trouble Ticket Express (ttx224) Helpdesk software available from http://www.unitedwebcoders.com

First you need to install Active perl.

Second you need to setup the scripts virtual directory. It will not be available by default if you did not customize IIS installation. You will find it under IIS -> World Wide Web Service -> Scripts Virtual Directory.

Do not confuse the physical directory c:\Inetpub\scripts with the virtual directory that is visible in the Inetmgr. Although the virtual directory points to the same physical directory however internally IIS modifies/creates some pointers to make this setup work correctly. Also dont try to add a virtual directory scripts and point it to the physical directory as this will not help.

3[2]

Once you have done that, Copy all the scripts in the c:\Inetpub\scripts folder.

Now open Inetmgr and register .pl, .pm and .cgi as extensions that would parsed using perl processor. To do so

1. Open inermgr and choose properties of the Default Website

2. Go to Home Directory tab and choose configuration

4[2]

3. Click Add to add and application extension.

4. Fill in the details as shown in the following screenshot.

5[2]

Do the same for all the three extensions, namely .pl, .pm and .cgi

5. Remember to fill in the details for each extension exactly the way it is shown above.

6. Restart the World Wide Web Publishing Service.

bingo you are all set to go.

----------------------End of Document --------------------------

Tags: CGI, Helpdesk, IIS, Perl

Published Date: 20080520

No comments: