Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: How to Make use of CGI with Perl

by l3nz (Friar)
on Dec 03, 2003 at 10:23 UTC ( [id://311865]=note: print w/replies, xml ) Need Help??


in reply to How to Make use of CGI with Perl

Of course IIS does support Perl, and does so in a number of ways.

What you have to do is to tell IIS that when it encounters a file ending in '.cgi' it has to invoke Perl, pass the file to it and send the results to the client that made the request. Invoking Perl can be made in a number of ways, most notably using the 'true' CGI interface or by using a filter. The 'true' CGI interface is much slower because a new process is created for each request, but you won't notice much of a slowdown unless you have tens or hundreds of clients accessin your script. So you can go fo the 'true' CGI if installing for developement purpouses on your own box. IIS of course offers a wealth of configuration options, but you should not probbaly care much about them at this point.

I don't want to write a full tutorial on this subject (there is plenty on the net). More or less, you should launch the Internet Information Services manager, then "Your_machine/Default Web Site/Home Directory/Configuration/Mappings" and then add ".cgi", select the ececutable path for Perl, add "%s %s" to its end, map it on every request type (at least GET and POST).

Another thing: make sure you have logging enabled. On home boxes, IIS runs often with no logs or reduced logs. A full log - one that offers execution times and referrers - will be very useful. Make sure you activate it (see "Your_machine/Default Web Site/Home Directory" and click on Log Visits - see also "Your_machine/Default Web Site/Enable logging" and put it to on, then "Your_machine/Default Web Site/Enable logging/Properties/Extended properties" and select everything).

My .02 euro :-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://311865]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2024-04-19 15:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found