Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Running Perl on IIS

by Bill McBride (Initiate)
on Oct 01, 2003 at 20:28 UTC ( #295752=perlquestion: print w/ replies, xml ) Need Help??
Bill McBride has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to set up Microsoft's IIS on my machine, running XP Pro., to run perl scipts. I have it set to execute perl5.8.0.exe for all .pl extensions. The problem I am having is that when I go to access a .pl file, perl seems to be called but it never completes its execution. This is with a script I know runs because I am running it on another system. Am I calling the right execution file? Or do I need to do something further to set up IIS properly? Thanks, Bill

Comment on Running Perl on IIS
Re: Running Perl on IIS
by hardburn (Abbot) on Oct 01, 2003 at 20:42 UTC

    It's possible that the environment on your new server is different enough that the program fails. Try running this:

    #! perl print "Content-type: text/plain\n\n"; $, = "\n"; print map { "$_: $ENV{$_}" } keys %ENV;

    That ought to print out all the environment variables and should run anywhere (after modifying the shebang). If the above works, you know your installation is fine and you need to start looking into the script itself for the problem. If the above doesn't work, its almost certainly a configuration problem.

    ----
    I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
    -- Schemer

    Note: All code is untested, unless otherwise stated

Re: Running Perl on IIS
by PodMaster (Abbot) on Oct 01, 2003 at 21:09 UTC
    Read the "Web Server Information/Config" part of ActivePerl's documentation (ActivePerl-Winfaq6.html).

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

Re: Running Perl on IIS
by tachyon (Chancellor) on Oct 01, 2003 at 23:31 UTC

    Why IIS? Apache is far more suitable for Perl Hacking, has a free port for Win32, .....

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

      But there are a few large global companies I know about that absolutely renounced Apache and swear by Perl asp on IIS instead. Yes you are right that Apache is more suitable for Perl CGI programming, but some people just don't seem to get it.
Re: Running Perl on IIS
by inman (Curate) on Oct 02, 2003 at 12:09 UTC
    Unless you have another version of perl installed, you can use perl.exe as the command to execute. The ActiveState documentation contains all of the information that you need to associate .pl scripts with perl.exe. This should have been set up when you did your perl install.

    One problem to look out for is permissions. You need to make sure that the IIS virtual directory that contains your perl script has read / execute script access.

    If you are running on a locked down machine (where the NTFS file permissions have been set to limit access) then you also need to make sure that the perl executable and any modules data files etc. can be read and executed by the IIS_Server user account. Typically the Users group can be granted read / execute access.

    Inman

Re: Running Perl on IIS
by Discipulus (Curate) on Oct 03, 2003 at 07:18 UTC
    here my snipp-experience:

    in the properties of the virtual web you arre intended to run pl or cgi script go to homedirectory->apllication->configuration ADD .pl c:\path\to\perlis.dll all verbs(or path\to\perle.exe %s %s)

    THEN i have found that iis need, if you want to exit with html output from cgi, use CGI (-nph); this is the option no parsed headers that I don't know so well but it run.

    plz share your win32/IIS code ;)
    greetings lor*

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://295752]
Approved by Thelonius
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2014-09-21 13:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (169 votes), past polls