PMP Computer Solutions Menu Map

Support

Search our FrontPage Support Area
FrontPage Support Area Site Map


The following are answers to common questions in the Microsoft FrontPage Client Newsgroup:

Setting up M.S. PWS to run Perl

Prerequisites:

The Microsoft Personal Web Server (MS PWS) must be install on the system. This installation is in regard to installing perl.exe not the perliis.dll though the procedure is the same for both. If you don't know the difference then install the exe.

A PERL interrupter - I recommend the ActiveWare - Perl for Win32 version

The steps:

1. To have PERL function on the MS PWS httpd server the registry will need to be modified so that MS PWS knows which program to invoke based upon the file extension. This is the same process used to invoke httpdodbc.dll which processes IDC files.

Do the following:

---------------- Caution --- Caution -- Caution --------------------------

Modifying the registry can cause your system to become inoperable if the wrong values are changed. If you don't know what a key does then don't change it. Insure that you have a back up of your registry and an emergency boot disk. If you don't know how to do this, use the help menu item in regedit. Search for backup.

---------------- Caution --- Caution -- Caution --------------------------

click Start on the task bar | Run | regedit.exe | click the plus next to:

HKEY_LOCAL_MACHINE
System
CurrentControlSet
Services
W3Svc
Parameters

click on the folder Script Map | right click in the right frame | New -> string value | enter the extension i.e. .pl | right click on the .pl just created | Modify | enter the full path to the perl program exe.

Note from David Ryan: you need to add "%s" to the end of the "<path name>\perl.exe" portion of the string

Exit Regedit.

2. If MS PWS is running then -- Click the globe and computer icon in the icon tray on the task bar (the bar with the start button). | Click properties | startup tab | stop | then start. Note: it is possible that the icon is not displayed yet the MS PWS is running. This may be checked using the control panel.

3. In an open FP Explorer web. Create a new folder (view | folder view | file | new | folder | change the name to cgi-bin or cgi or cgi-local etc.

Repeat the next two steps for each web that PERL scripts will be ran from.

4. Allow scripts to run from this directory i.e. create a virtual directory with execute permissions. Right click the folder just created in step 3 | properties | check the Allow script or programs to be ran

5. Import, copy or drag and drop your PERL script into this new directory.


To test a PERL script before uploading to your WPP / ISP

This example assumes that a method of POST is being used.

1. Place the script into your local webs cgi executable directory.
2. Open a console box (start | MS DOS Prompt)
3. Change directory to the location of the cgi directory in step 1. e.g.

     cd \webshare\wwwroot\test\cgi-bin

4. Open the editor and create a batch file to set the parameter for the script. The following are required:

SET REQUEST_METHOD=POST
SET CONTENT_TYPE=application/x-www-form-urlencoded
SET CONTENT_LENGTH=50

save as httpd.bat or some other name.

5. Execute the httpd.bat file
6. If the input is long you may wish to create an input file to feed to the

PERL script otherwise bypass this step. Open the editor and create the url-encoded string for the script. i.e. the name value pairs passed to the program. e.g.

   name=MD&Address=3615+North+113+Court&City=Omaha

While you are here count the number of character used. e.g.

   name=MD&Address=3615+North+113+Court&City=Omaha

   12345678901234567890123456789012345678901234567890

47 character will be passed.

Delete the count characters then save to a file e.g. test.dat

7. Set the content_length environment variable to match the length of the url-encoded string to be passed. i.e. set Content_length=47
8. run the perl script supplying the test url data perl your.pl <test.dat

If the output is long then suffix the command line with perl your.pl <test.dat | more or if you wish to preview the results in the browser then send it to a file e.g.

  perl your.pl <test.dat >test.htm.

Make sure the headers are well formed that the html produced is what you wish.

Resources:
  PWS Perl Solutions Page
  Perl FAQ
  The Idiot's Guide to Solving Perl CGI Problems
  Configuring and Testing a PERL Script with IIS

MD - MVP - FP
http://WebsUnlimited.com
[email protected]


Send mail to [email protected] with questions or comments about this web site.
Copyright © 1996, 1997 PMP Computer Solutions, 211 South 5th Street, Womelsdorf, PA 19567-1426. All rights reserved.
Art work by
Carl Jagt of Restore THIS!
Last updated: Sunday May 11, 1997 11:54 -0400