Sadmachine has asked for the wisdom of the Perl Monks concerning the following question:

I'm currently trying to install Perl on an NT server. I've downloaded ActivePerl-5.6.1.628-MSWin32-x86-multi-thread from ActiveState and I've run the install.bat. It seemed to have completed installing but when I've tried running a simple Perl script to test it under IE5 instead of executing the script it opens the script for editing in Notepad.

Where did I go wrong and what can I do to fix it?

Replies are listed 'Best First'.
Re: Help installing Perl
by bwana147 (Pilgrim) on Jul 27, 2001 at 18:08 UTC

    Two things need be checked separately:

    • is Perl installed?
    • Is you webserver configured to run Perl when a CGI script is invoked?
    You say that the install procedure went on fine. Now, you need to check that the Perl interpreter is in your %PATH%. From the command-line, type 'perl -v' and you should get a welcome message stating the version you're using.

    As for the webserver config, well, it depends on the webserver... Apache? IIS? Zeus?

    --bwana147

    UPDATE: you didn't explicitly say so, but because you write "IE5", I suppose you're using Perl for CGI programming. It might be worth mentionning, for Perl can do an awful lot more...

      You might wish to check out this node if running IIS. The file extension config under this web server is found on the 'Home Directory' tab of the server properties -> Configuration.

      ybiC, thanks for setting me straight on the linking syntax. Apologies to anyone I may have unintentionally logged out.

Re: Help installing Perl
by Beatnik (Parson) on Jul 27, 2001 at 18:30 UTC
    I think the important thing here is actually the webserver (as bwana147 mentioned above). Perl can be used stand alone too, but for web purposes (as in opening a simple script in a browser), you do need a webserver. The Perl docs come with sections on installing it with several webservers (check this page at ActiveState)

    Greetz
    Beatnik
    ... Quidquid perl dictum sit, altum viditur.
Re: Help installing Perl
by jlongino (Parson) on Jul 27, 2001 at 20:56 UTC
    Sadmachine,

    I might misunderstand the question, but it appears to me that you are double-clicking a perl script with the expectation that Windows will run the script for you.

    If this is the case, there is apparently a file association already setup for the extension you are using, e.g., "*.pl" that tells Windows to open the file in Notepad and not run the file (perl xxxx.pl).

    You could change the file association (which I don't have time to address here since I'm at work) or, you could open a DOS window (assuming the perl binary is in your path), change to the directory where you program is located, and issue the command: perl xxxx.pl.

    Good luck.

Re: Help installing Perl
by aquacade (Scribe) on Jul 28, 2001 at 16:15 UTC
    From the ActiveState, Perl, Download, MSI link did you:

    1) Review and meet the Windows System Requirements?
    2) Have a recent install of InstMsi.exe (linked from there)
    3) Make sure your NT Server 4.0 has SP5 or later applied?
    4) You must uninstall all previous Perl versions from Settings, Control Panel, Add/Remove Programs first
    5) I'd also suggest deleteing the c:\Perl (or whereever) directory from Explorer by hand as well before reinstalling.
    6) During install select "create file associations" and the other three check boxes (to integrate with IIS) properly

    I just install that very release yesterday on my NT 4.0 (SP6) Server and it worked just fine!