| 
               
   
 
 
  
   
  Home 
      
FrontPage Hosting 
        
mySQL Hosting 
      
Dedicated Servers 
      
Managed Services 
        
Domain Parking 
                | 
               
               
 
 
 
  
    
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 installed on the system. 
               Steps: 
               
                    - Download
                    
                    Perl for Windows 95/NT
 
                    - Create a Perl5 folder on 
                    your hard drive and extract the contents of the 
                    self-extracting .exe to that directory; remember to preserve 
                    the folder names and file names.
 
                
               
                    Your directory layout should 
                    look like the following after the extract: 
                    \Perl5\bin 
                    \Perl5\docs 
                    \Perl5\eg 
                    \Perl5\lib 
                
               
                    - Run the perlw32-install.bat 
                    batch file from the \Perl5\bin directory.
 
                    - Make sure that the 
                    installation updated your path in your c:\autoexec.bat file 
                    to include x:\Perl5\bin (where x: is the drive letter you 
                    installed Perl).
 
                
               The above steps will install Perl 
               5 on your Windows 95/NT PC.  The steps below will configure 
               the Microsoft Personal Web Server to run Perl5. 
               
                    - Click on Start, Run, 
                    regedit.exe
 
                    - Expand HKEY_LOCAL_MACHINE
 
                    - Expand System
 
                    - Expand CurrentControlSet
 
                    - Expand Services
 
                    - Expand W3Svc
 
                    - Expand Parameters
 
                    - Expand Script Map
 
                    - Right click within the right 
                    pane/frame (of Script Map) and select New, string value.
 
                    - Enter .pl
 
                    - Modify .pl and enter the 
                    full path to the perl.exe program along with "%s %s"
 
                
               
                    example:  e:\Perl5\bin\perl.exe 
                    %s %s 
                
               
                    - Create additional entries 
                    for ".cgi" and ".plx"
 
                    - Exit Regedit.
 
                    - If MS PWS is running then, 
                    then start and stop http services.
 
                
               See
               
               Configuring and Testing a PERL Script with IIS if you have 
               any questions concerning the above steps. 
               The steps below will set up a cgi-bin 
               or cgi-local (your choice) folder for use to contain your Perl 
               scripts: 
               
                    - Start FrontPage Explorer, 
                    and change to Folder View.
 
                    - If you don't currently have 
                    a cgi-bin or cgi-local folder, create a new folder and name 
                    it cgi-bin or cgi-local within FrontPage Explorer.
 
                    - Within FrontPage Explorer, 
                    right click on the cgi-bin (or cgi-local) folder and select 
                    properties.
 
                    - Check the box to allow 
                    scripts and folders to be run.
 
                
               Do the following to test your set 
               up: 
               
                    - Using notepad (or any text 
                    editor), enter the Perl script below, save it to your cgi-bin 
                    (or cgi-local) directory and name it "env.cgi"
 
                
               
                    #!/usr/bin/perl 
                    print "content-type: text/html\n\n"; 
                    print "<HTML><BODY><PRE>"; 
                    print "<ul>"; 
                    foreach (sort keys %ENV) 
                    { 
     print "<li> Env Var key: $_ value $ENV{$_}"; 
                    } 
                    print "</ul>"; 
                    print "<br>"; 
                    print "</PRE></BODY></HTML>"; 
                    exit 0; 
                
               
                    - Now browse http://YOURLOCALHOST/cgi-bin/env.cgi
                    
 
                
               Remember to substitute the name of 
               your local PWS/host above.  Also replace "cgi-bin" with "cgi-local" 
               if you are using a "cgi-local" directory. 
               The above script should display 
               all of the environment variables the server (PWS) can see. 
               PROBLEM 
               SOLVING 
               If you do the above and it does 
               not work, then check the following: 
               
                    - MIME types are set up 
                    for .cgi and .pl (to check / remove MIME types, start 
                    Windows Explorer, click on view, options, file types).
 
                    - Folder where you placed the 
                    CGI script is not marked execute (run).
 
                    - Registry settings are not 
                    correct.
 
                    - You are using the FrontPage 
                    Personal Web Server instead of the Microsoft Personal Web 
                    Server.
 
                    - You are browsing the .cgi or 
                    .pl as a file instead of a web address such as 
                    http://default/cgi-bin/env.cgi
 
                    - The script you are using has 
                    syntax errors, logic errors, or does not output proper HTML.
 
                
               Resources: 
                 Perl 
               FAQ 
                 The 
               Idiot's Guide to Solving Perl CGI Problems 
               --
               Peter Abraham  |