laziness, impatience, and hubris | |
PerlMonks |
Re: How to Make use of CGI with Perlby l3nz (Friar) |
on Dec 03, 2003 at 10:23 UTC ( [id://311865]=note: print w/replies, xml ) | Need Help?? |
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 :-)
In Section
Seekers of Perl Wisdom
|
|