Perl Scripting with ActivePerl

Overview

OmniHTTPd Professional supports the use of Perl for developing scripts. Perl has become a very popular scripting tool for extending web servers because it is extremely flexible and easy to learn. OmniHTTPd comes with an excellent Perl library to make CGI scripting even easier. Output from Perl scripts are treated the same as regular CGI scripts. This means that the script should read its input from the standard input stream and send its output to the standard output stream just like any other CGI script.

Operation

We recommend that you use ActivePerl from ActiveState for your Perl scripting needs. ActivePerl includes Perl for ISAPI, an extension that can speed up web script launching tremendously by using the ISAPI interface. The OmniHTTPd configuration defaults contain all the necessary settings to run Perl right out of the box. By default:

Installation

Step 1: Obtain and Install ActivePerl

OmniHTTPd does not come bundled with a Perl interpreter. Download ActivePerl from ActiveState. If you are a first time user, we recommend using the default, C:\Perl. When prompted for the installation components, we also recommend installing Perl for ISAPI, which is not selected by default. If you are using the default settings for OmniHTTPd, Perl should be immediately operational. If you are having problems or did not use default settings, continue down the checklist.

Step 2: Enable external script processing

External script processing should be enabled by default. You can check this setting in the Advanced section of the Global Server Properties. Make sure that Enable External Script Support is checked.

Step 3: Check the MIME types

In the Global properties, check the MIME list that these associations are present:

Virtual Actual
wwwserver/stdcgi .pl
wwwserver/isapi .plx
wwwserver/stdcgi .cgi

Step 4: Check the entries in the External tab

There should already be an entry in the External section of the Global Server Properties. The virtual section should be the extension, .pl and .cgi in this case, and the actual should be the full path of the Perl interpretor. You should also see the .plx and PerlIS.DLL association. If you did not install Perl to the default directory, you will have to modify these settings. If you do not use the .cgi extension, you can remove that entry.

Virtual Actual
.pl C:\PERL\BIN\PERL.EXE
.plx C:\PERL\BIN\PERLIS.DLL
.cgi C:\PERL\BIN\PERL.EXE

Note for SSI users: You cannot use SSI to process Perl scripts using the Perl for ISAPI extension, .plx. You must use the standard Perl extension, .pl

Copyright © 1997-2000 Omnicron Technologies Corporation