home *** CD-ROM | disk | FTP | other *** search
/ Chip: Windows 2000 Professional Resource Kit / W2KPRK.iso / apps / perl / ActivePerl.exe / data.z / perlwin32faq6.html < prev    next >
Encoding:
Extensible Markup Language  |  1999-10-15  |  44.2 KB  |  1,291 lines

  1. <?xml version="1.0"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3.     "http://www.w3.org/TR/xhtml1/DTD/transitional.dtd">
  4. <html xmlns="http://www.w3.org/TR/xhtml1">
  5.   <head>
  6.     <title>perlwin32faq6 - web server info</title>
  7.     <link rev="made" href="mailto:bjepson@debian.ids.net" />
  8.     <meta name="GENERATOR" charset="iso-8859-1" />
  9.     <link rel="STYLESHEET" href="../win32prk.css" type="text/css"
  10.     media="screen" />
  11.   </head>
  12.  
  13.   <body bgcolor="#ffffff">
  14.     <!-- beginning of leaf header-->
  15.  
  16.     <table width="100%">
  17.       <tr>
  18.         <td bgcolor="000000" width="70" height="31"><a href= 
  19.         "http://www.activestate.com/"><img src="ASbutton.gif" alt= 
  20.         "ActiveState Home Page" border="0" width="68" height=
  21.         "30" /></a></td>
  22.  
  23.         <td width="10" bgcolor="#ffffff"> </td>
  24.  
  25.         <td valign="middle" bgcolor="#cc0066"><font face=
  26.         "sans-serif" size="+1" color="#ff99cc">   
  27.         Win32 FAQ</font></td>
  28.       </tr>
  29.     </table>
  30.     <!-- end of leaf content--><!-- INDEX BEGIN -->
  31.  
  32.     <ul>
  33.       <li><a href="#NAME">NAME</a></li>
  34.  
  35.       <li>
  36.         <a href="#DESCRIPTION">DESCRIPTION</a> 
  37.  
  38.         <ul>
  39.           <li><a href="#What_HTTP_servers_support_Perl_f">What HTTP
  40.           servers support Perl for Win32?</a></li>
  41.  
  42.           <li><a href="#How_do_I_use_Perl_for_Win32_unde">How do I
  43.           use Perl for Win32 under Apache?</a></li>
  44.  
  45.           <li><a href="#How_do_I_configure_the_EMWAC_htt">How do I
  46.           configure the EMWAC https server to support Perl for
  47.           Win32?</a></li>
  48.  
  49.           <li><a href="#How_do_I_configure_IIS_3_0_or_lo">How do I
  50.           configure IIS 3.0 or lower to support Perl</a></li>
  51.  
  52.           <li><a href="#How_do_I_configure_Microsoft_IIS">How do I
  53.           configure Microsoft IIS 4.0 to support Perl</a></li>
  54.  
  55.           <li><a href="#How_do_I_configure_Netscape_web_">How do I
  56.           configure Netscape web servers to support Perl for
  57.           Win32?</a></li>
  58.  
  59.           <li><a href="#How_do_I_configure_WebSite_1_0_t">How do I
  60.           configure WebSite 1.0 to support Perl for Win32?</a></li>
  61.  
  62.           <li><a href="#How_do_I_configure_WebSite_Profe">How do I
  63.           configure WebSite Professional to support Perl for
  64.           Win32?</a></li>
  65.  
  66.           <li><a href="#How_do_I_configure_Purveyor_to_s">How do I
  67.           configure Purveyor to support Perl for Win32?</a></li>
  68.  
  69.           <li><a href="#How_do_I_configure_Microsoft_Per">How do I
  70.           configure Microsoft Personal Web Server 1.0x for Windows
  71.           95 to</a></li>
  72.  
  73.           <li><a href="#How_do_I_configure_other_web_ser">How do I
  74.           configure other web servers to support Perl for
  75.           Win32?</a></li>
  76.  
  77.           <li><a href="#My_program_runs_fine_from_the_co">My
  78.           program runs fine from the command line, but bombs out
  79.           when</a></li>
  80.  
  81.           <li><a href="#This_is_all_such_a_hassle_why_c">This is
  82.           all such a hassle; why can't I just put perl.exe in my
  83.           CGI</a></li>
  84.         </ul>
  85.       </li>
  86.  
  87.       <li><a href="#AUTHOR_AND_COPYRIGHT">AUTHOR AND
  88.       COPYRIGHT</a></li>
  89.     </ul>
  90.     <!-- INDEX END -->
  91.     <hr />
  92.     <br />
  93.  
  94.     <h1><a name="NAME">NAME</a></h1>
  95.  
  96.     <p>perlwin32faq6 - web server info</p>
  97.     <br />
  98.     <hr />
  99.  
  100.     <h1><a name="DESCRIPTION">DESCRIPTION</a></h1>
  101.  
  102.     <p>Perl for Win32 Web Server Configuration and
  103.     Troubleshooting</p>
  104.     <br />
  105.     <hr />
  106.  
  107.     <h2><a name="What_HTTP_servers_support_Perl_f">What HTTP
  108.     servers support Perl for Win32?</a></h2>
  109.  
  110.     <p>Most Windows <font size="-1">NT</font> and Windows 95
  111.     servers that use the <font size="-1">CGI</font> standard or
  112.     <font size="-1">ISAPI</font> will run Perl for Win32 scripts.
  113.     The following servers are known to work with Perl for Win32
  114.     (known protocols in brackets):</p>
  115.  
  116.     <dl>
  117.       <dt><strong><a name="item_Alibaba">Alibaba from Computer
  118.       Software Manufaktur [CGI, ISAPI]</a></strong></dt>
  119.  
  120.       <dd>
  121.         <br />
  122. <pre>
  123.     <a href=
  124. "http://alibaba.austria.eu.net/">http://alibaba.austria.eu.net/</a>
  125. </pre>
  126.       </dd>
  127.  
  128.       <dt><strong><a name="item_Apache">Apache for Win32 [CGI,
  129.       mod_perl]</a></strong></dt>
  130.  
  131.       <dd>
  132.         <p>NOTE: mod_perl currently only works when Perl is built
  133.         <em>without</em> PERL_OBJECT support on win32. Since
  134.         ActivePerl is built under the PERL_OBJECT regime, mod_perl
  135.         users will need to build Perl from the sources.</p>
  136.         <br />
  137. <pre>
  138.     <a href="http://www.apache.org">http://www.apache.org</a>
  139.     mod_perl home page: <a href=
  140. "http://perl.apache.org">http://perl.apache.org</a>
  141. </pre>
  142.       </dd>
  143.  
  144.       <dt><strong><a name="item_EMWAC">EMWAC Web Server
  145.       [CGI]</a></strong></dt>
  146.  
  147.       <dd>
  148.         <br />
  149. <pre>
  150.     <a href= 
  151. "http://emwac.ed.ac.uk/html/internet_toolchest/https/contents.htm">http://emwac.ed.ac.uk/html/internet_toolchest/https/contents.htm</a>
  152. </pre>
  153.       </dd>
  154.  
  155.       <dt><strong><a name="item_Microsoft">Microsoft Internet
  156.       Information Server [CGI, ISAPI]</a></strong></dt>
  157.  
  158.       <dd>
  159.         <br />
  160. <pre>
  161.     <a href=
  162. "http://www.microsoft.com/iis/">http://www.microsoft.com/iis/</a>
  163. </pre>
  164.       </dd>
  165.  
  166.       <dt><strong><a name="item_Netscape">Netscape Enterprise and
  167.       FastTrack Server [CGI, nsapi_perl]</a></strong></dt>
  168.  
  169.       <dd>
  170.         <br />
  171. <pre>
  172.     <a href=
  173. "http://home.netscape.com/">http://home.netscape.com/</a>
  174.     mod_nsapi home page: <a href= 
  175. "http://interact.canoe.ca/~bsugars/nsapi_perl.html">http://interact.canoe.ca/~bsugars/nsapi_perl.html</a>
  176. </pre>
  177.       </dd>
  178.  
  179.       <dt><strong><a name="item_O">O'Reilly WebSite Professional
  180.       [CGI, ISAPI, WSAPI]</a></strong></dt>
  181.  
  182.       <dd>
  183.         <br />
  184. <pre>
  185.     <a href="http://software.ora.com/">http://software.ora.com/</a>
  186. </pre>
  187.       </dd>
  188.  
  189.       <dt><strong><a name="item_Purveyor">Purveyor by Process
  190.       Software [CGI, ISAPI]</a></strong></dt>
  191.  
  192.       <dd>
  193.         <br />
  194. <pre>
  195.     <a href="http://www.process.com/">http://www.process.com/</a>
  196. </pre>
  197.       </dd>
  198.     </dl>
  199.  
  200.     <p>There's a list of web servers for Windows, Windows 95, and
  201.     Windows <font size="-1">NT</font> on this Yahoo Page:</p>
  202.     <br />
  203. <pre>
  204.     <a href= 
  205. "http://www.yahoo.com/Computers_and_Internet/Software/Internet/World_Wide_Web/Servers/Microsoft_Windows_Windows_95/">http://www.yahoo.com/Computers_and_Internet/Software/Internet/World_Wide_Web/Servers/Microsoft_Windows_Windows_95/</a> 
  206. </pre>
  207.  
  208.     <p>(That's all one <font size="-1">URL.)</font></p>
  209.     <br />
  210.     <hr />
  211.  
  212.     <h2><a name="How_do_I_use_Perl_for_Win32_unde">How do I use
  213.     Perl for Win32 under Apache?</a></h2>
  214.  
  215.     <p>NOTE: mod_perl currently only works when Perl is built <em>
  216.     without</em> PERL_OBJECT support on win32. Since ActivePerl is
  217.     built under the PERL_OBJECT regime, mod_perl users will need to
  218.     build Perl from the sources.</p>
  219.  
  220.     <p>If you want to put all of your <font size="-1">CGI</font>
  221.     scripts into one directory, add the following line to your <em>
  222.     srm.conf</em> file (You can choose any directory you'd like,
  223.     but make sure it exists):</p>
  224.     <br />
  225. <pre>
  226.     ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache/cgi-bin/"
  227. </pre>
  228.  
  229.     <p>After you have made this change, stop and restart the Apache
  230.     service.</p>
  231.  
  232.     <p>Apache provides an emulation of the <font size="-1">
  233.     UNIX</font> shebang (#!/path/to/perl) syntax, so the next step
  234.     is easy. You can put you Perl scripts into your <em>
  235.     cgi-bin</em> directory, as long as you have a path to a valid
  236.     interpreter at the top. For example:</p>
  237.     <br />
  238. <pre>
  239.     #!C:\PERL\5.00464\bin\MSWin32-x86\perl.exe
  240.      
  241.     use CGI qw(:standard) ;
  242.     print header();
  243.     print "Hello, world";
  244. </pre>
  245.  
  246.     <p>If you want to enable <font size="-1">CGI</font> scripts
  247.     based on an extension, such as <em>.pl</em>, you need to add
  248.     the following line to <em>srm.conf</em>:</p>
  249.     <br />
  250. <pre>
  251.     AddHandler cgi-script .pl
  252. </pre>
  253.  
  254.     <p>By default, <font size="-1">CGI</font> scripts are not
  255.     allowed in your DocumentRoot directory, but they are allowed in
  256.     other document directories. Document directories are created
  257.     with the Alias command in <em>srm.conf</em>:</p>
  258.     <br />
  259. <pre>
  260.     Alias /ResourceKit/ "E:/utilsamp/"
  261. </pre>
  262.  
  263.     <p>You can then include files that end in <em>.pl</em> within a
  264.     document directory. You will still need to include the #! line
  265.     with the full path to the <em>perl.exe</em> interpreter, as
  266.     shown earlier.</p>
  267.  
  268.     <p>If you want to allow <font size="-1">CGI</font> scripts in
  269.     the DocumentRoot directory, add the ExecCGI option to the
  270.     Options directive between the <Directory> and
  271.     </Directory> entry for your DocumentRoot in <em>
  272.     access.conf</em> (these appear directly after the comment
  273.     titled:</p>
  274.     <br />
  275. <pre>
  276.     # This should be changed to whatever you set DocumentRoot to.
  277.     
  278. After you have updated it, your Options directive may look something like:
  279. </pre>
  280.     <br />
  281. <pre>
  282.     Options Indexes FollowSymLinks ExecCGI
  283. </pre>
  284.     <br />
  285.     <hr />
  286.  
  287.     <h2><a name="How_do_I_configure_the_EMWAC_htt">How do I
  288.     configure the EMWAC https server to support Perl for
  289.     Win32?</a></h2>
  290.  
  291.     <p>First, read the <font size="-1">EMWAC</font>
  292.     documentation:</p>
  293.     <br />
  294. <pre>
  295.     <a href= 
  296. "http://emwac.ed.ac.uk/html/internet_toolchest/https/scripts.htm">http://emwac.ed.ac.uk/html/internet_toolchest/https/scripts.htm</a>
  297. </pre>
  298.  
  299.     <p>You need to follow these steps:</p>
  300.  
  301.     <ol>
  302.       <li>
  303.         <strong><a name="item_"></a></strong> 
  304.  
  305.         <p>Install Perl for Win32.</p>
  306.       </li>
  307.  
  308.       <li>
  309.          
  310.  
  311.         <p>Install the <font size="-1">EMWAC</font> server. Ensure
  312.         that <font size="-1">EMWAC</font> can serve <font size=
  313.         "-1">HTML</font> files correctly.</p>
  314.       </li>
  315.  
  316.       <li>
  317.          
  318.  
  319.         <p>Make sure that the bin subdirectory of your Perl
  320.         directory is in the system <code>PATH</code> variable. This
  321.         should be the subdirectory where perl.exe is located, such
  322.         as <em>C:\Perl\5.00500\bin\MSWin32-x86</em>. Note that this
  323.         must be set in the Control Panel, not on the command line,
  324.         and it must be a system environment variable, not a user
  325.         environment variable.</p>
  326.       </li>
  327.  
  328.       <li>
  329.          
  330.  
  331.         <p>Make sure that your script has the extension <code>
  332.         .pl</code>. This is the only way that the https service
  333.         recognizes the file as a Perl script.</p>
  334.       </li>
  335.  
  336.       <li>
  337.          
  338.  
  339.         <p>Ensure that the script is readable by the account used
  340.         by the <font size="-1">EMWAC</font> server. Generally, this
  341.         means you should make the script readable by the Everyone
  342.         group.</p>
  343.       </li>
  344.  
  345.       <li>
  346.          
  347.  
  348.         <p>Ensure that all supporting files, like the perl binary
  349.         files, the perl library files, and the modules that you
  350.         use, are all readable by the account used by the <font
  351.         size="-1">EMWAC</font> server (i.e., the Everyone
  352.         group).</p>
  353.       </li>
  354.     </ol>
  355.  
  356.     <p>When the <font size="-1">EMWAC</font> server gets an <font
  357.     size="-1">HTTP</font> request for a file with a <em>.pl</em>
  358.     extension, it tries to execute <code>perl [filename]</code>.
  359.     This is the only way you can get Perl scripts to work on the
  360.     <font size="-1">EMWAC</font> server, so you need to follow the
  361.     above directions.</p>
  362.  
  363.     <p>By default, the Perl for Win32 installation puts the path to
  364.     <em>perl.exe</em> in <code>@INC</code>.</p>
  365.  
  366.     <p>Because the <font size="-1">EMWAC</font> server runs as a
  367.     service (see <a href= 
  368.     "perlwin32faq4.html#What_is_a_Windows_NT_service_">What is a
  369.     Windows NT service?</a>), you need to take special steps to
  370.     make files and environment variables like <code>PATH</code>
  371.     accessible. Just because you can read a script and run it from
  372.     the command line doesn't mean that the server can.</p>
  373.     <br />
  374.     <hr />
  375.  
  376.     <h2><a name="How_do_I_configure_IIS_3_0_or_lo">How do I
  377.     configure IIS 3.0 or lower to support Perl for Win32?</a></h2>
  378.  
  379.     <p>By default, the Perl for Win32 installation maps the <em>
  380.     .plx</em> extension to Perl for <font size="-1">ISAPI.</font>
  381.     You can override the extension used during installation.
  382.     Because the installation does this only when <font size="-1">
  383.     IIS</font> is already installed, you must install <font size=
  384.     "-1">IIS</font> first, then install Perl for Win32. If you need
  385.     to reconfigure these settings, or if you must set these by
  386.     hand, the instructions in this section will prove useful.</p>
  387.  
  388.     <p>Microsoft Internet Information Server <font size="-1">
  389.     (IIS)</font> ships with Windows <font size="-1">NT</font>
  390.     Server. Peer Web Services <font size="-1">(PWS)</font> ships
  391.     with Windows <font size="-1">NT</font> Workstation. Configuring
  392.     the products is essentially the same. First, you should consult
  393.     Chapter 8, Publishing Information and Applications, in the
  394.     <font size="-1">IIS</font> documentation.</p>
  395.  
  396.     <p>You need to follow these steps to get Perl for Win32 scripts
  397.     to run under <font size="-1">IIS:</font></p>
  398.  
  399.     <ol>
  400.       <li>
  401.          
  402.  
  403.         <p>Associate the extension for your scripts with the
  404.         appropriate interpreter in the script map for <font size=
  405.         "-1">IIS.</font> This is under the Registry key <font size= 
  406.         "-1">HKEY_LOCAL_SYSTEM,</font> with the sub-key
  407.         ``System\CurrentControlSet\Services\W3SVC\Parameters\Script
  408.         Map''. Many people map two extensions: one to <em>
  409.         perl.exe</em> (for example, <em>.pl</em>) and another to
  410.         <em>PerlIS.dll</em> (for example, <em>.plx</em>). Note that
  411.         mapping an extension in the script map is <em>not</em> the
  412.         same as associating the extension in Explorer. Use the full
  413.         paths to the executable files in the script map.</p>
  414.       </li>
  415.  
  416.       <li>
  417.          
  418.  
  419.         <p>Put your scripts in a virtual directory on the server
  420.         that has Execute access but not Read access. You can add
  421.         virtual directories or view their access with the Internet
  422.         Service Manager. Remember that the URLs for your virtual
  423.         directories can't overlap with URLs to directories in the
  424.         <font size="-1">WWW</font> root directory. For example, You
  425.         can't have a <em>cgi-bin</em> virtual directory and a real
  426.         <em>cgi-bin</em> subdirectory of the <font size="-1">
  427.         WWW</font> root.</p>
  428.       </li>
  429.  
  430.       <li>
  431.          
  432.  
  433.         <p>Ensure that your scripts are readable by the account
  434.         used by the <font size="-1">IIS</font> server. You set this
  435.         account in Internet Service Manager; it is set to
  436.         IUSR_[your server name] by default. See also <a href= 
  437.         "perlwin32faq4.html#What_is_a_Windows_NT_service_">What is
  438.         a Windows NT service?</a> and <a href= 
  439.         "perlwin32faq4.html#How_do_I_set_permissions_on_a_fi">How
  440.         do I set permissions on a file?</a>.</p>
  441.       </li>
  442.  
  443.       <li>
  444.          
  445.  
  446.         <p>Ensure that all supporting files, like the perl binary
  447.         files, the perl library files, and the modules that you
  448.         use, are all readable by the account used by the <font
  449.         size="-1">IIS</font> server. See also <a href= 
  450.         "perlwin32faq4.html#What_is_a_Windows_NT_service_">What is
  451.         a Windows NT service?</a> and <a href= 
  452.         "perlwin32faq4.html#How_do_I_set_permissions_on_a_fi">How
  453.         do I set permissions on a file?</a>.</p>
  454.       </li>
  455.     </ol>
  456.  
  457.     <p>You need to restart the web service after making the
  458.     Registry changes or installing Perl.</p>
  459.  
  460.     <p>Because <font size="-1">IIS</font> runs as a service (see <a
  461.     href="perlwin32faq4.html#What_is_a_Windows_NT_service_">What is
  462.     a Windows NT service?</a>), you need to take special steps to
  463.     make sure that files and environment variables are available to
  464.     it.</p>
  465.     <br />
  466.     <hr />
  467.  
  468.     <h2><a name="How_do_I_configure_Microsoft_IIS">How do I
  469.     configure Microsoft IIS 4.0 to support Perl for Win32?</a></h2>
  470.  
  471.     <p>Microsoft <font size="-1">IIS</font> 4.0 ships with Windows
  472.     <font size="-1">NT</font> Server 5.0, and <font size="-1">
  473.     PWS</font> 4.0 ships with Windows <font size="-1">NT</font>
  474.     Workstation 5.0. Both <font size="-1">IIS</font> and <font
  475.     size="-1">PWS</font> are available as part of the Microsoft
  476.     Windows <font size="-1">NT</font> 4.0 Option Pack. You can find
  477.     a link to the Option Pack at <a href= 
  478.     "http://www.microsoft.com/iis/">
  479.     http://www.microsoft.com/iis/</a></p>
  480.  
  481.     <p>To configure <font size="-1">IIS</font> or <font size="-1">
  482.     PWS</font> 4.0 to run Perl scripts:</p>
  483.  
  484.     <ol>
  485.       <li>
  486.          
  487.  
  488.         <p>Open the <font size="-1">IIS</font> 4.0 Internet Service
  489.         Manager. This will bring up the Microsoft Management
  490.         Console with the Internet Service Manager snap-in
  491.         selected.</p>
  492.       </li>
  493.  
  494.       <li>
  495.          
  496.  
  497.         <p>From the tree display on the left, select the level at
  498.         which to apply the mappings. You can choose an entire
  499.         server, web site, or a given virtual directory.</p>
  500.       </li>
  501.  
  502.       <li>
  503.          
  504.  
  505.         <p>Select Properties from the Action menu.</p>
  506.       </li>
  507.  
  508.       <li>
  509.          
  510.  
  511.         <p>If you chose to administer the properties for the entire
  512.         server, the Server Properties dialog will appear. Select
  513.         <font size="-1">WWW</font> Service from the Master
  514.         Properties pull-down menu and click the Edit button under
  515.         Master Properties. This opens <font size="-1">WWW</font>
  516.         Service Master Properties. Select the Home Directory tab
  517.         and proceed to step 7.</p>
  518.       </li>
  519.  
  520.       <li>
  521.          
  522.  
  523.         <p>If you chose to administer the properties for an entire
  524.         web site, the Web Site Properties sheet appears. Select the
  525.         Home Directory tab and proceed to step 7.</p>
  526.       </li>
  527.  
  528.       <li>
  529.          
  530.  
  531.         <p>If you chose to administer the properties for a virtual
  532.         directory, the Virtual Directory Properties sheet appears.
  533.         Select the Virtual Directory tab and proceed to step 7.</p>
  534.       </li>
  535.  
  536.       <li>
  537.          
  538.  
  539.         <p>Click the Configuration button. This opens the
  540.         Application Configuration dialog.</p>
  541.       </li>
  542.  
  543.       <li>
  544.          
  545.  
  546.         <p>Select the App Mappings tab and click the Add button.
  547.         You see the Add/Edit Application Extension Mapping
  548.         dialog.</p>
  549.       </li>
  550.  
  551.       <li>
  552.          
  553.  
  554.         <p>To run Perl as a <font size="-1">CGI</font> application,
  555.         type the full path to <em>Perl.EXE</em> followed by <code>
  556.         %s %s</code>. When a script is executed, the first <code>
  557.         %s</code> will be replaced by the full path to the script,
  558.         and the second <code>%s</code> will be replaced by the
  559.         script parameters.</p>
  560.       </li>
  561.  
  562.       <li>
  563.          
  564.  
  565.         <p>To run Perl for <font size="-1">ISAPI,</font> type the
  566.         full path to <em>PerlIS.DLL</em>. The <code>%s %s</code> is
  567.         not required for <font size="-1">ISAPI</font> DLLs.</p>
  568.       </li>
  569.  
  570.       <li>
  571.          
  572.  
  573.         <p>In the Extension field, type <em>.pl</em> or <em>
  574.         .plx</em> (or whatever extension you want to use).</p>
  575.       </li>
  576.  
  577.       <li>
  578.          
  579.  
  580.         <p>The application mapping is now complete. Click the <font
  581.         size="-1">OK</font> button and click <font size="-1">
  582.         OK</font> to dismiss any remaining dialogs/property
  583.         sheets.</p>
  584.       </li>
  585.  
  586.       <li>
  587.          
  588.  
  589.         <p>Close the <font size="-1">IIS</font> 4.0 Internet
  590.         Service Manager.</p>
  591.       </li>
  592.     </ol>
  593.  
  594.     <p>Because <font size="-1">IIS</font> runs as a service (see <a
  595.     href="perlwin32faq4.html#What_is_a_Windows_NT_service_">What is
  596.     a Windows NT service?</a>), you need to take special steps to
  597.     make sure that files and environment variables are available to
  598.     it.</p>
  599.     <br />
  600.     <hr />
  601.  
  602.     <h2><a name="How_do_I_configure_Netscape_web_">How do I
  603.     configure Netscape web servers to support Perl for
  604.     Win32?</a></h2>
  605.  
  606.     <p>If you're using Netscape 1.x servers, you must wrap your
  607.     Perl scripts in batch files. Refer to these Netscape tech
  608.     notes:</p>
  609.     <br />
  610. <pre>
  611.     <a href=
  612. "http://help.netscape.com/kb/server/960513-3.html">http://help.netscape.com/kb/server/960513-3.html</a>
  613.     <a href=
  614. "http://help.netscape.com/kb/server/960513-125.html">http://help.netscape.com/kb/server/960513-125.html</a> 
  615. </pre>
  616.  
  617.     <p>The following information is for Netscape FastTrack Server
  618.     2.0. Other 2.0 and 3.0 Netscape Servers (Communications,
  619.     Enterprise) should be similar.</p>
  620.  
  621.     <p>To set up Perl for Win32 to run on FastTrack Server, follow
  622.     these steps:</p>
  623.  
  624.     <ol>
  625.       <li>
  626.          
  627.  
  628.         <p>Install FastTrack Server, and make sure you can retrieve
  629.         <font size="-1">HTML</font> pages.</p>
  630.       </li>
  631.  
  632.       <li>
  633.          
  634.  
  635.         <p>Associate Perl scripts with the perl interpreter, if you
  636.         haven't already. See <a href= 
  637.         "perlwin32faq4.html#How_do_I_associate_Perl_scripts_">How
  638.         do I associate Perl scripts with perl?</a> for how to do
  639.         this. You may need to re-start the server after making the
  640.         association.</p>
  641.       </li>
  642.  
  643.       <li>
  644.          
  645.  
  646.         <p>Set up a Shell <font size="-1">CGI</font> directory to
  647.         run Perl scripts. <font size="-1">A</font> regular <font
  648.         size="-1">CGI</font> directory will not work -- that is
  649.         only for executable files. You set this up with the
  650.         FastTrack Administrator; see the documentation for
  651.         details.</p>
  652.       </li>
  653.     </ol>
  654.  
  655.     <p>If you would like to access Perl <font size="-1">CGI</font>
  656.     scripts in other directories, you need to associate an
  657.     extension, such as <em>.pl</em>, with the shellcgi <font size= 
  658.     "-1">MIME</font> type. Before you follow these steps, you must
  659.     add at least one Shell <font size="-1">CGI</font> directory -
  660.     this will enable shellcgi on your server (you can delete this
  661.     directory, and shellcgi will remain enabled). Follow these
  662.     steps to associate <em>.pl</em> with the shellcgi <font size=
  663.     "-1">MIME</font> type:</p>
  664.  
  665.     <ol>
  666.       <li>
  667.          
  668.  
  669.         <p>In the Server Administrator, click Server Preferences,
  670.         then select <font size="-1">MIME</font> Types from the
  671.         frame on the left.</p>
  672.       </li>
  673.  
  674.       <li>
  675.          
  676.  
  677.         <p>If you want to use <em>.pl</em> as the extension for
  678.         Perl scripts, find and remove the application/x-perl <font
  679.         size="-1">MIME</font> type (this is mapped to <em>.pl</em>
  680.         by default).</p>
  681.       </li>
  682.  
  683.       <li>
  684.          
  685.  
  686.         <p>Add a new <font size="-1">MIME</font> Type with
  687.         magnus-internal/shellcgi as the Content Type, and pl as the
  688.         File Suffix. If a type for magnus-internal/shellcgi already
  689.         exists, simply add pl to the list of File Suffixes. Don't
  690.         include the leading dot on the file suffix.</p>
  691.       </li>
  692.  
  693.       <li>
  694.          
  695.  
  696.         <p>Save and apply these changes. You should be able to put
  697.         a Perl <font size="-1">CGI</font> script in any directory,
  698.         provided the script ends with the <em>.pl</em> suffix.</p>
  699.       </li>
  700.     </ol>
  701.  
  702.     <p>If you are having trouble running Perl scripts on your
  703.     Netscape server, check the following:</p>
  704.  
  705.     <ul>
  706.       <li>
  707.         <p>Ensure that the script is readable by the account used
  708.         by the Netscape service. Generally, this means you should
  709.         make the script readable by the Everyone group.</p>
  710.       </li>
  711.  
  712.       <li>
  713.         <p>Ensure that all supporting files, like the perl binary
  714.         files, the perl library files, and the modules that you
  715.         use, are all readable by the account used by the Netscape
  716.         service (i.e., the Everyone group).</p>
  717.       </li>
  718.     </ul>
  719.  
  720.     <p>One nice thing about FastTrack server is that the Error Log
  721.     will give detailed reasons why your <font size="-1">CGI</font>
  722.     script isn't running, so this is a good thing to check first
  723.     when you are having configuration problems.</p>
  724.  
  725.     <p>Because Netscape servers run as services (see <a href= 
  726.     "perlwin32faq4.html#What_is_a_Windows_NT_service_">What is a
  727.     Windows NT service?</a>), you need to take special steps to
  728.     make sure that files and environment variables are available to
  729.     them.</p>
  730.  
  731.     <p>Some people have reported problems with handling POST'ed
  732.     data with Perl programs with Netscape servers. Since Netscape
  733.     apparently uses associations to run scripts, and POST'ed data
  734.     is sent on <font size="-1">STDIN</font> to a program. This may
  735.     be related to the problems with redirection.</p>
  736.     <br />
  737.     <hr />
  738.  
  739.     <h2><a name="How_do_I_configure_WebSite_1_0_t">How do I
  740.     configure WebSite 1.0 to support Perl for Win32?</a></h2>
  741.  
  742.     <p>The following information is for setting up O'Reilly WebSite
  743.     to use Perl for Win32 for standard <font size="-1">CGI</font>
  744.     (not PerlIS).</p>
  745.  
  746.     <ol>
  747.       <li>
  748.          
  749.  
  750.         <p>Install WebSite. Make sure you can retrieve <font size= 
  751.         "-1">HTML</font> pages before continuing.</p>
  752.       </li>
  753.  
  754.       <li>
  755.          
  756.  
  757.         <p>Associate Perl scripts with the perl interpreter, if you
  758.         haven't already. See <a href= 
  759.         "perlwin32faq4.html#How_do_I_associate_Perl_scripts_">How
  760.         do I associate Perl scripts with perl?</a> for how to do
  761.         this. You may need to re-start the server after making the
  762.         association.</p>
  763.       </li>
  764.  
  765.       <li>
  766.          
  767.  
  768.         <p>Set up a Standard <font size="-1">CGI</font> directory
  769.         to hold your Perl scripts. You can use the Server
  770.         Properties dialog box do to this.</p>
  771.       </li>
  772.  
  773.       <li>
  774.          
  775.  
  776.         <p>Ensure that the script is readable by the account used
  777.         by the WebSite service. Generally, this means you should
  778.         make the script readable by the Everyone group.</p>
  779.       </li>
  780.  
  781.       <li>
  782.          
  783.  
  784.         <p>Ensure that all supporting files, like the perl binary
  785.         files, the perl library files, and the modules that you
  786.         use, are all readable by the account used by the WebSite
  787.         service (i.e., the Everyone group).</p>
  788.       </li>
  789.     </ol>
  790.  
  791.     <p>Because WebSite servers run as services (see <a href= 
  792.     "perlwin32faq4.html#What_is_a_Windows_NT_service_">What is a
  793.     Windows NT service?</a>), you need to take special steps to
  794.     make sure that files and environment variables are available to
  795.     them.</p>
  796.     <br />
  797.     <hr />
  798.  
  799.     <h2><a name="How_do_I_configure_WebSite_Profe">How do I
  800.     configure WebSite Professional to support Perl for
  801.     Win32?</a></h2>
  802.  
  803.     <p>The following information is for setting up O'Reilly WebSite
  804.     Professional to use Perl for Win32 for standard <font size=
  805.     "-1">CGI</font> (not PerlIS).</p>
  806.  
  807.     <ol>
  808.       <li>
  809.          
  810.  
  811.         <p>Install WebSite Professional. Make sure you can retrieve
  812.         <font size="-1">HTML</font> pages before continuing.</p>
  813.       </li>
  814.  
  815.       <li>
  816.          
  817.  
  818.         <p>Open Server Properties and click the Mapping tab. Server
  819.         Properties is in the WebSite Professional folder on the
  820.         Start menu.</p>
  821.       </li>
  822.  
  823.       <li>
  824.          
  825.  
  826.         <p>From the List Selector on the Mapping tab, choose
  827.         Content Types.</p>
  828.       </li>
  829.  
  830.       <li>
  831.          
  832.  
  833.         <p>If there is an existing mapping for the extension you
  834.         want to use (such as <em>.pl</em>), highlight the mapping
  835.         and click Delete. Click Apply to immediately apply the
  836.         change.</p>
  837.       </li>
  838.  
  839.       <li>
  840.          
  841.  
  842.         <p>Choose a file extension for Perl, such as <em>.pl</em>,
  843.         and type it into the File Extension field. Make sure you
  844.         include the leading period/full stop (.) in the file
  845.         extension.</p>
  846.       </li>
  847.  
  848.       <li>
  849.          
  850.  
  851.         <p>Type wwwserver/shellcgi in the Media or Server-Side
  852.         Content Type field.</p>
  853.       </li>
  854.  
  855.       <li>
  856.          
  857.  
  858.         <p>Click Add. Click Apply to immediately apply the
  859.         change.</p>
  860.       </li>
  861.  
  862.       <li>
  863.          
  864.  
  865.         <p>Change the List Selector to Associations.</p>
  866.       </li>
  867.  
  868.       <li>
  869.          
  870.  
  871.         <p>If there is an existing mapping for the extension you
  872.         want to use (such as <em>.pl</em>), highlight the mapping
  873.         and click Delete. Click Apply to immediately apply the
  874.         change.</p>
  875.       </li>
  876.  
  877.       <li>
  878.          
  879.  
  880.         <p>Type the file extension you chose in step 5 in the File
  881.         Extension field. Make sure you include the leading
  882.         period/full stop (.) in the file extension.</p>
  883.       </li>
  884.  
  885.       <li>
  886.          
  887.  
  888.         <p>Type the full path to Perl.exe, such as <em>
  889.         C:\Perl\5.00500\bin\MSWin32-x86\Perl.exe</em>, in the
  890.         Associated <font size="-1">EXE</font> or <font size="-1">
  891.         DLL</font> field.</p>
  892.       </li>
  893.  
  894.       <li>
  895.          
  896.  
  897.         <p>Click Add. Click Apply to immediately apply the
  898.         change.</p>
  899.       </li>
  900.  
  901.       <li>
  902.          
  903.  
  904.         <p>Close Server Properties. Reply appropriately to
  905.         ``Terminate active connections and update the server
  906.         settings?''. The server is now configured to execute Perl
  907.         <font size="-1">CGI</font> scripts in directories marked as
  908.         cgi-bin as well as document directories.</p>
  909.       </li>
  910.     </ol>
  911.  
  912.     <p>If you have trouble running scripts, ensure that the script
  913.     is readable by the account used by the WebSite service.
  914.     Generally, this means you should make the script readable by
  915.     the Everyone group. Also, ensure that all supporting files,
  916.     like the perl binary files, the perl library files, and the
  917.     modules that you use, are all readable by the account used by
  918.     the WebSite service (i.e., the Everyone group).</p>
  919.  
  920.     <p>Because WebSite servers run as services (see <a href= 
  921.     "perlwin32faq4.html#What_is_a_Windows_NT_service_">What is a
  922.     Windows NT service?</a>), you need to take special steps to
  923.     make sure that files and environment variables are available to
  924.     them.</p>
  925.     <br />
  926.     <hr />
  927.  
  928.     <h2><a name="How_do_I_configure_Purveyor_to_s">How do I
  929.     configure Purveyor to support Perl for Win32?</a></h2>
  930.  
  931.     <p>The following instructions are for Purveyor 1.2 for Windows
  932.     <font size="-1">NT.</font> Other Purveyor products should be
  933.     similar.</p>
  934.  
  935.     <ol>
  936.       <li>
  937.          
  938.  
  939.         <p>In the Purveyor Control Panel, use the <font size="-1">
  940.         CGI</font> Mapping tab to map the <em>.pl</em> extension to
  941.         <em>perl.exe</em>. Make sure that you use the full path to
  942.         the executable.</p>
  943.       </li>
  944.  
  945.       <li>
  946.          
  947.  
  948.         <p>Also in the Purveyor Control Panel, use the Virtual
  949.         Servers section to set your <font size="-1">CGI</font>
  950.         Scripts directory. You need one scripts directory for each
  951.         virtual server you support. The scripts directory must be
  952.         in the data path for the server. Also, make sure that the
  953.         Disable <font size="-1">CGI</font> Extension checkbox is
  954.         unchecked.</p>
  955.       </li>
  956.  
  957.       <li>
  958.          
  959.  
  960.         <p>Ensure that the script is readable by the account used
  961.         by the Purveyor service. Generally, this means you should
  962.         make the script readable by the Everyone group.</p>
  963.       </li>
  964.  
  965.       <li>
  966.          
  967.  
  968.         <p>Ensure that all supporting files, like the perl binary
  969.         files, the perl library files, and the modules that you
  970.         use, are all readable by the account used by the Purveyor
  971.         service (i.e., the Everyone group).</p>
  972.       </li>
  973.     </ol>
  974.  
  975.     <p>If you have problems while configuring Purveyor to use Perl
  976.     for Win32, you can use the Enable Tracing checkbox in the
  977.     Logging tab of the Purveyor Control Panel applet to trace <font
  978.     size="-1">HTTP</font> requests and responses.</p>
  979.  
  980.     <p>Because Purveyor runs as a service (see <a href= 
  981.     "perlwin32faq4.html#What_is_a_Windows_NT_service_">What is a
  982.     Windows NT service?</a>), you need to take special steps to
  983.     make sure that files and environment variables are available to
  984.     it.</p>
  985.     <br />
  986.     <hr />
  987.  
  988.     <h2><a name="How_do_I_configure_Microsoft_Per">How do I
  989.     configure Microsoft Personal Web Server 1.0x for Windows 95 to
  990.     support Perl for Win32?</a></h2>
  991.  
  992.     <p>Microsoft Personal Web Server for Windows 95 is a
  993.     scaled-down version of Microsoft Internet Information Server.
  994.     Although it is not documented, it appears that the method used
  995.     to support Perl for Win32 with <font size="-1">IIS</font> will
  996.     also work with Personal Web Server. See <a href= 
  997.     "#How_do_I_configure_IIS_3_0_or_lo">How do I configure IIS 3.0
  998.     or lower to support Perl for Win32?</a>.</p>
  999.     <br />
  1000.     <hr />
  1001.  
  1002.     <h2><a name="How_do_I_configure_other_web_ser">How do I
  1003.     configure other web servers to support Perl for Win32?</a></h2>
  1004.  
  1005.     <p>If your web server isn't listed, check the server's
  1006.     documentation on how to set up a <font size="-1">CGI</font>
  1007.     interpreter. In general the process is as follows:</p>
  1008.  
  1009.     <ul>
  1010.       <li>
  1011.         <p>Associate a file extension like <em>.pl</em> with the
  1012.         perl binary, and let the server know where the binary is.
  1013.         This may be a shell association, (see <a href= 
  1014.         "perlwin32faq4.html#How_do_I_associate_Perl_scripts_">How
  1015.         do I associate Perl scripts with perl?</a>), or a custom
  1016.         association.</p>
  1017.       </li>
  1018.  
  1019.       <li>
  1020.         <p>Set up a directory where executable scripts go, and put
  1021.         your Perl script there.</p>
  1022.       </li>
  1023.  
  1024.       <li>
  1025.         <p>Ensure that the user account that the web server uses
  1026.         can read the script as well as any ancillary files (perl
  1027.         binary files, library files, modules, etc.). This usually
  1028.         means making the files available to the Everyone group.</p>
  1029.       </li>
  1030.     </ul>
  1031.  
  1032.     <p>Because most web servers run as services (see <a href= 
  1033.     "perlwin32faq6.html#How_do_I_configure_IIS_3_0_or_lo">How do I
  1034.     configure IIS 3.0 or lower to support Perl for Win32?</a>), you
  1035.     need to take special steps to make sure that files and
  1036.     environment variables are available to them.</p>
  1037.     <br />
  1038.     <hr />
  1039.  
  1040.     <h2><a name="My_program_runs_fine_from_the_co">My program runs
  1041.     fine from the command line, but bombs out when run as a CGI
  1042.     script.</a></h2>
  1043.  
  1044.     <p>Usually, this means one of two things: either you have
  1045.     misconfigured your system, or your script does not output the
  1046.     right stuff to be a <font size="-1">CGI</font> script.</p>
  1047.  
  1048.     <p>Before you do anything else, check this list:</p>
  1049.  
  1050.     <ul>
  1051.       <li>
  1052.         <p>Make sure you have correctly configured your server for
  1053.         <em>perl.exe</em> or <em>perlis.dll</em>. This is often
  1054.         accomplished by mapping a specific extension, such as <em>
  1055.         .pl</em> or <em>.plx</em>, to <em>perl.exe</em> or <em>
  1056.         perlis.dll</em>. Usually, web servers rely on their own
  1057.         mappings, rather than the Windows command-line
  1058.         mappings.</p>
  1059.       </li>
  1060.  
  1061.       <li>
  1062.         <p>If your web server depends on the <code>PATH</code>
  1063.         variable to find <em>perl.exe</em>, make sure that you put
  1064.         <em>perl.exe</em> in your system <code>PATH</code>, not
  1065.         just your user <code>PATH</code>. This only applies to
  1066.         Windows <font size="-1">NT.</font></p>
  1067.       </li>
  1068.  
  1069.       <li>
  1070.         <p>If your web server requires directories to be marked as
  1071.         executable, make sure the directory that contains the
  1072.         script is marked as such.</p>
  1073.       </li>
  1074.  
  1075.       <li>
  1076.         <p>Since the web server can be configured to run as a local
  1077.         user, be sure that the user has access to the script file
  1078.         and the Perl binaries and libraries. Many web servers run
  1079.         as the ``Local System'' account, which generally has
  1080.         sufficient permissions.</p>
  1081.       </li>
  1082.  
  1083.       <li>
  1084.         <p>If <em>Perl.exe</em> or Perl for <font size="-1">
  1085.         ISAPI</font> fail to work as expected check your event logs
  1086.         for clues.</p>
  1087.       </li>
  1088.     </ul>
  1089.  
  1090.     <p>Check the information above with a script that you know
  1091.     produces the right output for the <font size="-1">CGI</font>
  1092.     protocol (scripts in this <font size="-1">FAQ</font> are a good
  1093.     first choice). Try it with your own script after you're sure
  1094.     the test script will work.</p>
  1095.  
  1096.     <p>If you are sure the server is running the script, but it
  1097.     only generates error messages in your browser, there are some
  1098.     tools that may help you out. CGI::Carp is used to send
  1099.     debugging information to the browser or log file. Even if your
  1100.     script has a compilation error, it can usually intercept and
  1101.     report errors. To use CGI::Carp, include the following lines in
  1102.     your program:</p>
  1103.     <br />
  1104. <pre>
  1105.     # The stuff in the BEGIN block will be executed very early
  1106.     # on, even before the rest of this script is parsed.
  1107.     #
  1108.     BEGIN {
  1109.         
  1110.         # Use the CGI::Carp module and import the carpout() function.
  1111.         #
  1112.         use CGI::Carp qw(carpout);
  1113.         
  1114.         # Send warnings and die messages to the browser.
  1115.         #
  1116.         carpout(STDOUT);
  1117.         
  1118.     }
  1119. </pre>
  1120.  
  1121.     <p>If your script has an error, you may see something like this
  1122.     in the browser:</p>
  1123.     <br />
  1124. <pre>
  1125.     [Wed Jun 3 09:32:28 1998] C:\inetpub\scripts\test.pl: Error message! at
  1126.     C:\inetpub\scripts\test.pl line 38. 
  1127. </pre>
  1128.  
  1129.     <p>Sometimes, it can be helpful to put yourself in somebody
  1130.     else's position. The libwww-perl bundle <font size="-1">
  1131.     (LWP)</font> is available from <font size="-1">CPAN,</font> but
  1132.     you can install it using the Perl Package Manager <font size=
  1133.     "-1">(PPM).</font> <font size="-1">LWP</font> may be included
  1134.     with future releases of Perl for Win32.</p>
  1135.  
  1136.     <p> <font size="-1">LWP</font> includes the powerful <em>
  1137.     lwp-request</em> script, which lets you see things from the
  1138.     browser's perspective. Invoke <em>lwp-request</em> with the
  1139.     name of a <font size="-1">URL</font> to see the content of the
  1140.     response, as in <code>lwp-request http://localhost</code>. To
  1141.     inspect the headers of an <font size="-1">HTTP</font> response,
  1142.     invoke <em>lwp-request</em> with the <code>-de</code>
  1143.     switch:</p>
  1144.     <br />
  1145. <pre>
  1146.     C:\>lwp-request -de <a href=
  1147. "http://localhost">http://localhost</a>
  1148.     Date: Wed, 03 Jun 1998 13:37:31 GMT
  1149.     Accept-Ranges: bytes
  1150.     Server: Microsoft-IIS/4.0
  1151.     Content-Length: 4325
  1152.     Content-Location: <a href=
  1153. "http://localhost/Default.htm">http://localhost/Default.htm</a>
  1154.     Content-Type: text/html
  1155.     ETag: "0c1e58b063bd1:1237"
  1156.     Last-Modified: Thu, 09 Apr 1998 12:09:28 GMT
  1157.     Client-Date: Wed, 03 Jun 1998 13:37:31 GMT
  1158.     Client-Peer: 127.0.0.1:0
  1159. </pre>
  1160.  
  1161.     <p>This tool can be very helpful in figuring out exactly what
  1162.     your scripts are doing. Whatever you do, don't give up hope. It
  1163.     is, in fact, possible to get a Perl script running on your web
  1164.     server. Really.</p>
  1165.     <br />
  1166.     <hr />
  1167.  
  1168.     <h2><a name="This_is_all_such_a_hassle_why_c">This is all such
  1169.     a hassle; why can't I just put perl.exe in my CGI directory and
  1170.     use it in my URL?</a></h2>
  1171.  
  1172.     <p>First, the warning: <font size="-1">DON'T</font> <font size= 
  1173.     "-1">DO</font> <font size="-1">THIS.</font> <font size="-1">
  1174.     REALLY.</font> <font size="-1">EVEN</font> <font size="-1">
  1175.     IF</font> <font size="-1">YOU</font> <font size="-1">
  1176.     DON'T</font> <font size="-1">UNDERSTAND</font> <font size="-1">
  1177.     WHY</font> <font size="-1">NOT,</font> <font size="-1">
  1178.     DON'T.</font></p>
  1179.  
  1180.     <p>Now the explanation: the idea here is to put <em>
  1181.     perl.exe</em> in your <font size="-1">CGI</font> directory
  1182.     (however you configure that on your server), and use <font
  1183.     size="-1">URL</font> syntax like the following:</p>
  1184.     <br />
  1185. <pre>
  1186.     <a href= 
  1187. "http://soon.to.be.a.victim.net/cgi-bin/perl.exe?myscript.pl">http://soon.to.be.a.victim.net/cgi-bin/perl.exe?myscript.pl</a>
  1188. </pre>
  1189.  
  1190.     <p>to run <em>myscript.pl</em>. This keeps you from having to
  1191.     figure out how to configure your server to associate extensions
  1192.     like <em>.pl</em> with an interpreter like <em>
  1193.     perl.exe</em>.</p>
  1194.  
  1195.     <p>In fact, on some early Win32-based web servers (Netscape 1.x
  1196.     servers in particular), it was impossible to associate a script
  1197.     file with an interpreter. This method was recommended by
  1198.     vendors as a viable approach to running Perl scripts on your
  1199.     web server.</p>
  1200.  
  1201.     <p>Anyone with a devious mind and a little knowledge of Perl
  1202.     can see that with this configuration, hackers could start doing
  1203.     all kinds of horrible things on the server. All they'd have to
  1204.     do is send made-up URLs, using the <code>-e</code> command line
  1205.     switch in <em>perl.exe</em>, in order to do stuff like delete
  1206.     all files on a drive:</p>
  1207.     <br />
  1208. <pre>
  1209.     <a href=
  1210. "http://aaaugh.that.hurts.net/cgi-bin/perl.exe?-e">http://aaaugh.that.hurts.net/cgi-bin/perl.exe?-e</a>?'del%20c:\*.*%20/S%20/Q'
  1211. </pre>
  1212.  
  1213.     <p>Of course, a true computer criminal would never do something
  1214.     so crude and obvious, but would instead use this as a launching
  1215.     point to cause irreparable harm to your organization.</p>
  1216.  
  1217.     <p>The following <font size="-1">URL</font> covers this issue
  1218.     in more depth:</p>
  1219.     <br />
  1220. <pre>
  1221.     <a href= 
  1222. "ftp://ftp.cert.org/pub/cert_advisories/CA-96.11.interpreters_in_cgi_bin_dir">ftp://cert.org/pub/cert_advisories/CA-96.11.interpreters_in_cgi_bin_dir</a>
  1223. </pre>
  1224.  
  1225.     <p>Tom Christiansen has also written a good discussion of the
  1226.     subject:</p>
  1227.     <br />
  1228. <pre>
  1229.     <a href=
  1230. "http://www.perl.com/perl/news/latro-announce.html">http://www.perl.com/perl/news/latro-announce.html</a>
  1231. </pre>
  1232.  
  1233.     <p>Note that one suggested solution to this problem is wrapping
  1234.     your Perl script in a batch file using pl2bat or your own
  1235.     custom batch code. <font size="-1">THIS</font> <font size="-1">
  1236.     IS</font> <font size="-1">ALSO</font> <font size="-1">
  1237.     NOT</font> <font size="-1">GOOD.</font> Most of the primitive
  1238.     servers that won't allow file associations are also susceptible
  1239.     to a bug that allows a user to enter any <font size="-1">
  1240.     DOS</font> command after the bat file.</p>
  1241.  
  1242.     <p>For more information on <font size="-1">CGI</font> and web
  1243.     server security, see these URLs:</p>
  1244.     <br />
  1245. <pre>
  1246.     Web: <a href= 
  1247. "http://www-genome.wi.mit.edu/WWW/faqs/www-security-faq.html">http://www-genome.wi.mit.edu/WWW/faqs/www-security-faq.html</a>
  1248. </pre>
  1249.  
  1250.     <p>As a final note, there are so many good, free web servers
  1251.     out there for Windows <font size="-1">NT</font> and Windows 95
  1252.     that you should never stay with an old, insecure web
  1253.     server.</p>
  1254.     <br />
  1255.     <hr />
  1256.  
  1257.     <h1><a name="AUTHOR_AND_COPYRIGHT">AUTHOR AND
  1258.     COPYRIGHT</a></h1>
  1259.  
  1260.     <p>This <font size="-1">FAQ</font> was originally assembled and
  1261.     maintained by Evangelo Prodromou. <a href= 
  1262.     "mailto:evangelo@endcontsw.com">evangelo@endcontsw.com.</a> It
  1263.     has been revised and updated by Brian Jepson of O'Reilly and
  1264.     Associates, and David Grove and David Dmytryshyn of
  1265.     ActiveState.</p>
  1266.  
  1267.     <p>This <font size="-1">FAQ</font> is in the public domain. If
  1268.     you use it, however, please ensure that you give credit to the
  1269.     original authors.</p>
  1270.  
  1271.     <p><!-- beginning of leaf footer--></p>
  1272.  
  1273.     <table width="100%">
  1274.       <tr>
  1275.         <td bgcolor="000000" width="70" height="31"><a href= 
  1276.         "http://www.activestate.com/"><img src="ASbutton.gif" alt= 
  1277.         "ActiveState Home Page" border="0" width="68" height=
  1278.         "30" /></a></td>
  1279.  
  1280.         <td width="10"> </td>
  1281.  
  1282.         <td valign="middle" bgcolor="#cc0066"><font face=
  1283.         "sans-serif" size="+1" color="#ff99cc">   
  1284.         Win32 FAQ</font></td>
  1285.       </tr>
  1286.     </table>
  1287.     <!-- end  of leaf footer-->
  1288.   </body>
  1289. </html>
  1290.  
  1291.