perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sbek...@hyperreal.org
Subject cvs commit: modperl-site/guide CHANGES all.html config.html control.html debug.html help.html index.html intro.html obvious.html performance.html porting.html scenario.html snippets.html start.html status.html warnings.html
Date Thu, 10 Dec 1998 09:22:28 GMT
sbekman     98/12/10 01:22:28

  Modified:    guide    CHANGES all.html config.html control.html
                        debug.html help.html index.html intro.html
                        obvious.html performance.html porting.html
                        scenario.html snippets.html start.html status.html
                        warnings.html
  Log:
  * Lot's of "little typos" fixed. Thanks to Evan A. Zacks,
    Eric Cholet and Nancy Lin !
  
  * added a quote from DBI page, why $sth-rows; can't be used for rows counting.
  
  * fixed obvious.html#Compiled_Regular_Expressions href at porting.html
    Thanks to Richard Dice!
  
  * lots of little changes and add ons...
  
  Revision  Changes    Path
  1.2       +19 -2     modperl-site/guide/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/CHANGES,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CHANGES	1998/12/07 13:03:06	1.1
  +++ CHANGES	1998/12/10 09:22:20	1.2
  @@ -1,6 +1,23 @@
   This is a CHANGES file for mod_perl mini_guide
   
   
  +12.08.98
  +
  +
  +* Lot's of "little typos" fixed. Thanks to Evan A. Zacks, 
  +  Eric Cholet and Nancy Lin !
  +
  +
  +* added a quote from DBI page, why $sth-rows; can't be used for rows counting. 
  +
  +
  +* fixed obvious.html#Compiled_Regular_Expressions href at porting.html
  +  Thanks to Richard Dice!
  +
  +
  +* lots of little changes and add ons...
  +
  +
   12.07.98
   
   
  @@ -13,7 +30,7 @@
   
   
   * Added 'Is it possible to install mod_perl without root access?'
  -  section into Server Installtion (scenario) page.
  +  section into Server Installation (scenario) page.
   
   
   * Added Perrin Harkins and Jonathan Peterson's notes about
  @@ -30,4 +47,4 @@
   12.03.98
   
   
  -* First Release
  \ No newline at end of file
  +* First Release
  
  
  
  1.2       +191 -97   modperl-site/guide/all.html
  
  Index: all.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/all.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- all.html	1998/12/07 13:03:06	1.1
  +++ all.html	1998/12/10 09:22:20	1.2
  @@ -1,5 +1,5 @@
   <HTML><BODY BGCOLOR="white"><CENTER>
  -	      <H1>This page includes all the guide and is suitable for printing only!</H1>
  +	      <H1>This page includes the entire guide and is suitable for printing!</H1>
   	      </CENTER><HR>
   	      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
   <HTML>
  @@ -15,7 +15,7 @@
   <CENTER><P><B>Deploying apache/mod_perl accelerator to give a rocket speed
   to your perl cgi-bin scripts.</B></P></CENTER>
   
  -<CENTER><P><B>Version 1.01  Dec, 7 1998</B></P></CENTER>
  +<CENTER><P><B>Version 1.02  Dec, 10 1998</B></P></CENTER>
   
   <P>
   <HR WIDTH="100%"></P>
  @@ -62,9 +62,9 @@
   </TR>
   
   <TR ALIGN=CENTER VALIGN=TOP>
  -<TD ALIGN=CENTER VALIGN=CENTER><B><FONT SIZE=-1>Written by <A HREF="mailto:sbekman@iil.intel.com">Stas
  +<TD ALIGN=CENTER VALIGN=CENTER><B><FONT SIZE=-1>Written by <A HREF="help.html#author">Stas
   Bekman</A>.<BR>
  -Last Modified at 12/04/1998 </FONT></B></TD>
  +Last Modified at 12/09/1998 </FONT></B></TD>
   
   <TD><A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl2.jpg"  BORDER=0 ALT="Mod Perl Icon" BORDER=0 HEIGHT=59 WIDTH=150></A>
   </TD>
  @@ -178,7 +178,7 @@
   wolves)</P>
   
   <P>If you find incorrect details, my grammar mistakes or you want to contribute
  -to this document please fell free to send me an <A HREF="mailto:sbekman@iil.intel.com">email</A>.</P>
  +to this document please feel free to send me an <A HREF="mailto:sbekman@iil.intel.com">email</A>.</P>
   
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B> 
   <HR WIDTH="100%"></P>
  @@ -225,10 +225,12 @@
         <LI>Ask Bjoern Hansen
         <LI>Brian Moseley 
         <LI>Chad K. Lewis
  +      <LI>David Landgren
         <LI>Doug Bagley
         <LI>Doug MacEachern
         <LI>Edmund Mergl
         <LI>Eric Cholet
  +      <LI>Evan A. Zacks
         <LI>Frank Cringle
         <LI>G.Richter
         <LI>Gunther Birznieks
  @@ -240,6 +242,7 @@
         <LI>Leslie Mikesell
         <LI>Lincoln Stein
         <LI>Mike Fletcher
  +      <LI>Nancy Lin
         <LI>Nathan Torkington
         <LI>Ralf Engelschall
         <LI>Randal Schwartz
  @@ -252,7 +255,7 @@
   <P>I&nbsp;want to thank all the people who donated their time and efforts
   to made this amazing idea of mod_perl to become reality. It includes Doug
   MacEachern, the author of mod_perl and all the developers who contributed
  -bug patches, modules and help. And of course the numeral unseen users who
  +bug patches, modules and help. And of course the numerous unseen users who
   helped to find the bugs and advocate mod_perl around the world.</P>
   
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B> 
  @@ -267,9 +270,9 @@
   </TR>
   
   <TR ALIGN=CENTER VALIGN=TOP>
  -<TD ALIGN=CENTER VALIGN=CENTER><B><FONT SIZE=-1>Written by <A HREF="mailto:sbekman@iil.intel.com">Stas
  +<TD ALIGN=CENTER VALIGN=CENTER><B><FONT SIZE=-1>Written by <A HREF="help.html#author">Stas
   Bekman</A>.<BR>
  -Last Modified at 12/04/1998 </FONT></B></TD>
  +Last Modified at 12/10/1998 </FONT></B></TD>
   
   <TD><A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl2.jpg"  BORDER=0 ALT="Mod Perl Icon" HEIGHT=59 WIDTH=150></A>
   </TD>
  @@ -437,7 +440,7 @@
   <P>
   <PRE>  % perl Makefile.PL APACHE_SRC=../apache_1.3.2/src \
       DO_HTTPD=1 PERL_MARK_WHERE=1 EVERYTHING=1
  -  % make &amp;amp;&amp;amp; make test &amp;amp;&amp;amp; make install
  +  % make &amp;&amp; make test &amp;&amp; make install
   </PRE>
   <P>
   To change the installation target (either if you aren't root or you need to
  @@ -642,8 +645,8 @@
     <TD ALIGN=CENTER VALIGN=CENTER>
       <B>
         <FONT SIZE=-1>
  -	     Written by <A HREF="mailto:sbekman@iil.intel.com">Stas Bekman</A>.
  -	     <BR>Last Modified at 12/07/98 
  +	     Written by <A HREF="help.html#author">Stas Bekman</A>.
  +	     <BR>Last Modified at 12/09/98 
         </FONT>
       </B>
     </TD>
  @@ -973,7 +976,6 @@
   home. You have a few solutions: <STRONG>a.</STRONG> reduce resource usage - see <A HREF="././performance.html#Limiting_the_size_of_the_process">Limiting the size of the processes</A>  <STRONG>b.</STRONG> ask your ISP if you can put a dedicated machine into their computer room
   and be root there. <STRONG>c.</STRONG> look for another ISP with lots of resources or one that supports mod_perl
   (not likely)
  -
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <P><A HREF="index.html">[Back to the main page]</A></P>
   
  @@ -987,7 +989,7 @@
     <TD ALIGN=CENTER VALIGN=CENTER>
       <B>
         <FONT SIZE=-1>
  -	     Written by <A HREF="mailto:sbekman@iil.intel.com">Stas Bekman</A>.
  +	     Written by <A HREF="help.html#author">Stas Bekman</A>.
   	     <BR>Last Modified at 12/07/98 
         </FONT>
       </B>
  @@ -1054,6 +1056,7 @@
   	<UL>
   
   		<LI><A HREF="#My_cgi_perl_code_is_being_return">My cgi/perl code is being returned as a plain text instead of being executed by the webserver?</A>
  +		<LI><A HREF="#Script_working_under_cgi_bin_wh">Script working under cgi-bin, when called as mod_perl I see A 'Save-As' prompt</A>
   	</UL>
   
   </UL>
  @@ -1161,7 +1164,7 @@
   like <A HREF="#perl_status">perl-status</A>)
   
   <P>
  -Note that sometimes you will have to to add : PerlModule Apache::Registry
  +Note that sometimes you will have to add : PerlModule Apache::Registry
   
   <P>
   before you specify the location that uses Apache::Registry as a
  @@ -1228,12 +1231,14 @@
     
     # tell me more about warnings
     use Carp ();
  -  $SIG{__WARN__} = \&amp;amp;Carp::cluck;
  +  $SIG{__WARN__} = \&amp;Carp::cluck;
     
  -  # Load CGI.pm and call its compile() method to precompile its autoloaded methods. 
  +  # Load CGI.pm and call its compile() method to precompile 
  +  # (but not to import) its autoloaded methods. 
     use CGI ();
     CGI-&gt;compile(':all');
     
  +See also L&lt;Apache::Status|status/Configuration&gt;
   </PRE>
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  @@ -1374,7 +1379,12 @@
       PerlSendHeader On
     &lt;/Location&gt;
   </PRE>
  +<P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H2><A NAME="Script_working_under_cgi_bin_wh">Script working under cgi-bin, when called as mod_perl I see A 'Save-As' prompt</A></H2></CENTER>
  +<P>
  +Did you put <CODE>PerlSendHeader On</CODE> in the config part of the <CODE>&lt;Location foo</CODE>&lt;/Location&gt;&gt;?
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <P><A HREF="index.html">[Back to the main page]</A></P>
   
   <CENTER><TABLE CELLSPACING=2 CELLPADDING=2 WIDTH="100%" >
  @@ -1387,8 +1397,8 @@
     <TD ALIGN=CENTER VALIGN=CENTER>
       <B>
         <FONT SIZE=-1>
  -	     Written by <A HREF="mailto:sbekman@iil.intel.com">Stas Bekman</A>.
  -	     <BR>Last Modified at 12/07/98 
  +	     Written by <A HREF="help.html#author">Stas Bekman</A>.
  +	     <BR>Last Modified at 12/10/98 
         </FONT>
       </B>
     </TD>
  @@ -1448,7 +1458,27 @@
   <CENTER><H1><A NAME="Restarting_techniques">Restarting techniques</A></H1></CENTER>
   <P>
   In all these techniques you will have to know the server PID (Process ID).
  -The easiest 
  +The easiest way to find it the PID is to look it up in the httpd.pid file.
  +With my configuration it's
  +<CODE>/usr/apps/var/httpd_perl/run/httpd.pid</CODE>. It's easy to discover where to look at, by checking out the httpd.conf
  +file. Open the file and locate the entry <CODE>PidFile</CODE>:
  +
  +<P>
  +<PRE>  PidFile /usr/apps/var/httpd_perl/run/httpd.pid
  +</PRE>
  +<P>
  +Another way is to use the <CODE>ps</CODE> and <CODE>grep</CODE> utilities:
  +
  +<P>
  +<PRE>  % ps auxc | grep httpd_perl
  +</PRE>
  +<P>
  +You will receive a list of all httpd_perl (the parent and the children).
  +You are looking after the parent process. If you run it as a root - you
  +will easily locate it, since it belongs to root. If you run the server as
  +user (when you <A HREF="././scenario.html#Is_it_possible_to_install_mod_pe">don't have a root access</A>, most likely all the processes will belong to that user (unless defined
  +different in the httpd.conf), but it's still easy to know 'who is the
  +parent' -- the one of the smallest size...
   
   <P>
   You will notice many httpd_perl executables running on your system, but you
  @@ -1548,7 +1578,7 @@
   <PRE>        % /usr/apps/sbin/httpd_perl/apachectl graceful    
   </PRE>
   <P>
  -Do a configuration syntax test
  +Do a configuration syntax test:
   
   <P>
   <PRE>        % /usr/apps/sbin/httpd_perl/apachectl configtest 
  @@ -1561,7 +1591,7 @@
   over httpd_docs server.
   
   <P>
  -There are other options for apachectl, use 'help' option to see them all
  +There are other options for apachectl, use 'help' option to see them all.
   
   <P>
   It's important to understand that this script is based on the PID file
  @@ -1572,7 +1602,7 @@
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H1><A NAME="Monitoring_the_Server_A_watchdo">Monitoring the Server. A watchdog.</A></H1></CENTER>
   <P>
  -With mod_perl many things can happen to your server. The worse one is the
  +With mod_perl many things can happen to your server. The worst one is the
   possibility that the server will die when you will be not around. As with
   any other critical service you need to run some kind of watchdog.
   
  @@ -1638,10 +1668,11 @@
   <P>
   Another approach, probably even more practical, is to use the Cool LWP perl
   package , to test the server by trying to fetch some document (script)
  -served by the server. Why is it more practical? Since the while server can
  -be up as a process, it can be stuck and not working (SYN_RECV state -
  -anyone???), So failing to get the document will trigger restart, and
  -``probably'' the problem will go away. (Just replace <CODE>start</CODE> with <CODE>restart</CODE> in the <CODE>$restart_command</CODE> below.
  +served by the server. Why is it more practical? While server can be up as a
  +process, it can be stuck and not working (SYN_RECV state - anyone??? Am I
  +getting a SYNC flood attack), So failing to get the document will trigger
  +restart, and ``probably'' the problem will go away. (Just replace
  +<CODE>start</CODE> with <CODE>restart</CODE> in the <CODE>$restart_command</CODE> below. 
   
   <P>
   Again we put this script into a crontab to call it every 30 minutes. 
  @@ -1775,7 +1806,7 @@
   (when running with -X), you generally see in the error_log that the parent
   server writes: Like ``server started, server stopped and etc''. Since httpd
   -X runs immediately as a child, so there is no controlling parent to write
  -all the status messages
  +all the status messages.
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  @@ -1904,7 +1935,7 @@
   <P>
   First to generate relative URL so it will reuse the technique above, with
   redirect (which is transparent for user) but it will not work if you have
  -something to POST (redirect looses all the data!)
  +something to POST (redirect looses all the data!).
   
   <P>
   Second to use a general config module which generates a correct full URL
  @@ -1938,7 +1969,7 @@
   environment identical to the server's by copying the perl run directives
   from server startup and config files. It'll also allow you to remove
   completely the first line of the script - since mod_perl skip it and
  -wrapper knows how to call the script
  +wrapper knows how to call the script.
   
   <P>
   Below is the example of such a script. Note that we force the -wT when we
  @@ -2018,6 +2049,7 @@
   <P>
   The effect of SIGUSR1 is detailed in: <A
   HREF="http://www.apache.org/docs/stopping.html">http://www.apache.org/docs/stopping.html</A>
  +
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <P><A HREF="index.html">[Back to the main page]</A></P>
   
  @@ -2031,8 +2063,8 @@
     <TD ALIGN=CENTER VALIGN=CENTER>
       <B>
         <FONT SIZE=-1>
  -	     Written by <A HREF="mailto:sbekman@iil.intel.com">Stas Bekman</A>.
  -	     <BR>Last Modified at 12/07/98 
  +	     Written by <A HREF="help.html#author">Stas Bekman</A>.
  +	     <BR>Last Modified at 12/09/98 
         </FONT>
       </B>
     </TD>
  @@ -2140,7 +2172,7 @@
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H1><A NAME="Before_you_start_to_code">Before you start to code</A></H1></CENTER>
   <P>
  -It can be a good idea to strength some of the programming skills, since
  +It can be a good idea to strengthen some of the programming skills, since
   Apache::Registry doesn't allow sloppiness programming.
   
   <P>
  @@ -2167,7 +2199,7 @@
   state of your mind. Scripts running under mod_perl are like subroutines are
   being called from the daemon who runs all the time. Imagine the daemon
   process that when requested to process some of the scripts - reads it in,
  -compiles it as a subroutine and finally executes it. On any consequent
  +compiles it as a subroutine and finally executes it. On any subsequent
   request it'll just recall the already compiled subroutine. Hope that you
   get the idea.
   
  @@ -2186,7 +2218,7 @@
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H3><A NAME="Script_s_namespace">Script's namespace</A></H3></CENTER>
   <P>
  -Scripts under Apache::Registry don't not run in package <STRONG>main</STRONG>, they run in a unique namespace based on the requested uri. e.g if your
  +Scripts under Apache::Registry do not run in package <STRONG>main</STRONG>, they run in a unique namespace based on the requested uri. e.g if your
   uri is /perl/test.pl the package will be called
   Apache::ROOT::perl::test_2epl;
   
  @@ -2232,7 +2264,7 @@
   <P>
   And both scripts do: <CODE>use Foo;</CODE> only the first one called will know about Foo, when you will call the
   second script it will not know about Foo at all - it's like you've
  -forgotten to write <CODE>use Foo;</CODE>. Run the server in the <A HREF="././control.html#Single_Mode_Running">single server mode</A> to solve that kind of bugs immediately.
  +forgotten to write <CODE>use Foo;</CODE>. Run the server in the <A HREF="././control.html#Single_Mode_Running">single server mode</A> to solve that kind of bug immediately.
   
   <P>
   You will see the following in the error_log file:
  @@ -2320,7 +2352,7 @@
   <PRE>  require &quot;/full/path/to/the/config.pl&quot;;
   </PRE>
   <P>
  -But than you loose portability! (I mean if you move the tool around in the
  +But then you lose portability! (I mean if you move the tool around in the
   filesystem you will have to change the base dir)
   
   <P><LI>
  @@ -2502,7 +2534,7 @@
   time, once per-child process if the module is pulled in off of disk again
   via Apache::StatINC - an additional time, in the parent process on each
   restart if PerlFreshRestart is On - unpredictable if you fiddle with
  -<CODE>%INC</CODE> yourself
  +<CODE>%INC</CODE> yourself.
   
   <P>
   Apache::Registry scripts which contain BEGIN blocks will be executed: -
  @@ -2511,7 +2543,7 @@
   additional time, once per-child process if the script file has changed on
   disk - an additional time, in the parent process on each restart if pulled
   in by the parent process via Apache::RegistryLoader and PerlFreshRestart is
  -On
  +On.
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  @@ -2710,7 +2742,7 @@
   possible of course. Try to process line at a time and print it back to the
   file (if you need to modify the file itself, use temporary file for that,
   when finished overwrite the src file, make sure to provide locking
  -mechanism!) 
  +mechanism!).
   
   <P>
   <STRONG>Second example</STRONG> is copying variables between functions (passing variables by value). Let's
  @@ -2765,7 +2797,7 @@
   browser after they were formatted. (I even don't mention the horrible case
   where programmers read in the whole DB and then let the perl to process
   it!!! Use relational DB and let the SQL do the job, so you get only the
  -records you need!!!)
  +records you need!!!).
   
   <P>
   We will use DBI for that (assume we are already connected to the DB) (read
  @@ -2781,14 +2813,14 @@
   <P>
   In the example above the httpd_process will grow up by the size of the
   variables that have been allocated for the records that matched the query.
  -(Again remember to multiply it by the number of the children server runs!)
  +(Again remember to multiply it by the number of the children server runs!).
   
   <P>
   What you want to do is to not accumulate the records but print them as they
   are fetched from the DB. More over we use a bind_col and
   $sth-&gt;fetchrow_arrayref (aliased to $sth-&gt;fetch) methods, to get the
   the fastest way to fetch data. The example below prints the TABLE with
  -matched data, the only memory that is being used is a <CODE>@cols</CODE>
  +matched data, the only memory that is being used is a @cols.
   
   <P>
   <PRE>  my @select_fields = qw(a b c);
  @@ -2814,6 +2846,25 @@
   so you get the number of matched records.
   
   <P>
  +For those who think that $sth-&gt;rows will do the job, here is the quote
  +from the DBI manpage: 
  +
  +<BLOCKQUOTE>
  +
  +<P>
  +rows <CODE>$rv</CODE> = $sth-&gt;rows; Returns the number of rows affected
  +by the last database altering command, or -1 if not known or not available.
  +Generally you can only rely on a row count after a do or non-select execute
  +(for some specific operations like update and delete) or after fetching all
  +the rows of a select statement. For select statements it is generally not
  +possible to know how many rows will be returned except by fetching them
  +all. Some drivers will return the number of rows the application has
  +fetched so far but others may return -1 until all rows have been fetched.
  +So use of the rows method with select statements is not recommended.
  +
  +</BLOCKQUOTE>
  +
  +<P>
   Just as a bonus, I wanted to write a single sub that process any query but
   very flexible, since it accepts: conditions, callback closure sub, select
   fields and restrictions. 
  @@ -2916,7 +2967,7 @@
   </PRE>
   <P>
   You might want to check also <A HREF="././performance.html#Limiting_the_size_of_the_process">Limiting the size of the processes</A>
  - and <A HREF="././performance.html#Limiting_the_resources_used_by_h">Limiting the resources used by httpd children</A>
  + and <A HREF="././performance.html#Limiting_the_resources_used_by_h">Limiting the resources used by httpd children</A>.
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  @@ -2927,9 +2978,7 @@
   the more it runs without restart the more it screws up. Many times you can
   resolve this problem very easily. You have to test your script under with
   Server running as a 
  -<A HREF="././control.html#Single_Mode_Running">single process</A> 
  -
  - 
  +<A HREF="././control.html#Single_Mode_Running">single process</A>.
   
   <P>
   Generally the problem you have is using global variables. Since global
  @@ -2939,7 +2988,7 @@
   <P>
   The first example is amazing. Web Services. Imagine that you enter some
   site you have your account on (Free Email Account?). Now you want to see
  -what other users read
  +what other users read.
   
   <P>
   You type in your name and passwd, and you are expecting to enter to your
  @@ -2951,7 +3000,7 @@
   sloppiness programming, the global variable was not reset at the beginning
   of the program and voila you can easily peek into other people emails! You
   would ask it can't happen, since you have entered the login and passwd. I
  -tell you, it happens! See for yourself:
  +tell you, it happens! See for yourself: 
   
   <P>
   <PRE>  use vars ($authenticated);
  @@ -2978,19 +3027,19 @@
   Since <CODE>$authenticated</CODE> is global - if it becomes 1 once it'll be
   1 for the whole child's life!!! The solution is trivial - reset the
   <CODE>$authenticated</CODE> to 0 at the beginning of the program. (Or many
  -other different solution). Of course the example is too trivial - but
  +other different solutions). Of course the example is too trivial - but
   believe me it happens!
   
   <P>
   Just another little one liner that can make your day spoiled, assuming you
  -forgot to reset the $allowed. It's perfectly OK in plain mod_cgi :
  +forgot to reset the $allowed. It's perfectly OK in plain mod_cgi:
   
   <P>
   <PRE>  $allowed = 1 if $username eq 'admin'; # 
   </PRE>
   <P>
   But you will let any user to admin your system with the line above (again
  -assuming you have used the same child prior to some user request) 
  +assuming you have used the same child prior to some user request).
   
   <P>
   Another good example is usage of /o in regexp. After you restart the server
  @@ -3004,10 +3053,8 @@
   
   <P>
   So to make sure you don't miss these bugs always test your CGI in
  -<A HREF="././control.html#Single_Mode_Running">single process</A>. To solve this particular <STRONG>/o</STRONG> problem refer to <A HREF="././obvious.html#Regular_Expressions">Regular Expressions</A>   
  +<A HREF="././control.html#Single_Mode_Running">single process</A>. To solve this particular <STRONG>/o</STRONG> problem refer to <A HREF="././obvious.html#Compiled_Regular_Expressions">Compiled Regular Expressions</A>.
   
  -   
  -
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H2><A NAME="The_Script_is_too_dirty_It_does">The Script is too dirty, It does the job and I can't afford rewriting it.</A></H2></CENTER>
  @@ -3124,8 +3171,8 @@
     <TD ALIGN=CENTER VALIGN=CENTER>
       <B>
         <FONT SIZE=-1>
  -	     Written by <A HREF="mailto:sbekman@iil.intel.com">Stas Bekman</A>.
  -	     <BR>Last Modified at 12/07/98 
  +	     Written by <A HREF="help.html#author">Stas Bekman</A>.
  +	     <BR>Last Modified at 12/09/98 
         </FONT>
       </B>
     </TD>
  @@ -3189,8 +3236,8 @@
   <P>
   <CENTER><H1><A NAME="Coverage">Coverage</A></H1></CENTER>
   <P>
  -This document describes a ``special'' traps of running your plain cgis
  -under Apache::Registry and Apache::PerlRun
  +This document describes ``special'' traps of running your plain cgis under
  +Apache::Registry and Apache::PerlRun.
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  @@ -3268,7 +3315,7 @@
   A solution? 
   
   <P>
  -<PRE>  use vars qw($x $a); at the top of you code
  +<PRE>  use vars qw($x $a); at the top of your code
   </PRE>
   <P>
   Also see the clarification of <CODE>my()</CODE> vs. <CODE>use vars</CODE> - Ken Williams writes:
  @@ -3347,7 +3394,7 @@
   the <CODE>@INC</CODE> is being reset to its original value. To make sure
   that you have set a correct <CODE>@INC</CODE> fetch <A
   HREF="http://your.perl.server/perl-status?inc">http://your.perl.server/perl-status?inc</A>
  -and watch the bottom of the page. (I consider you have configured the
  +and watch the bottom of the page. (I assume you have configured the
   &lt;Location /perl-status&gt; section in httpd.conf as modperl docs shows.
   
   <P>
  @@ -3408,7 +3455,7 @@
     }
   </PRE>
   <P>
  -You will want to add debug printings to test this code in your application
  +You will want to add debug printings to test this code in your application. 
   
   <P>
   Read also use versus require article for more info.
  @@ -3590,7 +3637,7 @@
   
   <P>
   Application that allows you to change the configuration at the run time.
  -Let's say the script produce a form to change the background color of the
  +Let's say the script produces a form to change the background color of the
   page. (It's not a good idea but for the sake of potential problem
   presentation we will assume that we don't write down the change on the
   disk). So you have typed in a new color , and as a respond you print back
  @@ -3598,16 +3645,16 @@
   you keep running in single server mode you will never notice that you have
   a problem... If you run the same code in the multi server environment ,
   after you submit the color change you will get the result as expected, but
  -when you will call the same URL again (not reload!) most of the chances
  -that you will get back the old color, since except the child who processed
  -the color change request no one knows about their global variable change.
  -Just remember that children can't share information, but the stuff they
  +when you will call the same URL again (not reload!) chances are that you
  +will get back the old color, since except the child who processed the color
  +change request no one knows about their global variable change. Just
  +remember that children can't share information, but the stuff they
   inherited from parent on their load.
   
   <P>
  -Also note that since server run in single mode - If the output returns HTML
  -with IMG tags, the load of these will take a lot of time (read apache docs
  -of httpd -X to learn why).
  +Also note that since the server is running in single mode - If the output
  +returns HTML with IMG tags, the load of these will take a lot of time (read
  +apache docs of httpd -X to learn why).
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  @@ -3637,8 +3684,8 @@
     <TD ALIGN=CENTER VALIGN=CENTER>
       <B>
         <FONT SIZE=-1>
  -	     Written by <A HREF="mailto:sbekman@iil.intel.com">Stas Bekman</A>.
  -	     <BR>Last Modified at 12/07/98 
  +	     Written by <A HREF="help.html#author">Stas Bekman</A>.
  +	     <BR>Last Modified at 12/09/98 
         </FONT>
       </B>
     </TD>
  @@ -3916,7 +3963,7 @@
     <TD ALIGN=CENTER VALIGN=CENTER>
       <B>
         <FONT SIZE=-1>
  -	     Written by <A HREF="mailto:sbekman@iil.intel.com">Stas Bekman</A>.
  +	     Written by <A HREF="help.html#author">Stas Bekman</A>.
   	     <BR>Last Modified at 12/07/98 
         </FONT>
       </B>
  @@ -3995,13 +4042,22 @@
   You can also put the standard <CODE>use Foo;</CODE> into the startup-file. 
   
   <P>
  -CGI.pm is a special one, you will want to put into a startup-file:
  +CGI.pm is a special one. Ordinarily CGI.pm autoloads most of its functions
  +on an as-needed basis. This speeds up the loading time by deferring the
  +compilation phase. However, if you are using mod_perl, FastCGI or another
  +system that uses a persistent Perl interpreter, you will want to precompile
  +the methods at initialization time. To accomplish this, call the package
  +function <CODE>compile()</CODE> like this: 
   
   <P>
  -<PRE>  use CGI ();
  -  CGI-&gt;compile(':all');
  +<PRE>    use CGI ();
  +    CGI-&gt;compile(':all');
   </PRE>
   <P>
  +The arguments to <CODE>compile()</CODE> are a list of method names or sets, and are identical to those accepted by
  +the use operator. 
  +
  +<P>
   You can also preload the Registry scripts. See <A HREF="#Preload_Registry_Scripts">Preload Registry Scripts</A>.
   
   <P>
  @@ -4660,8 +4716,8 @@
     <TD ALIGN=CENTER VALIGN=CENTER>
       <B>
         <FONT SIZE=-1>
  -	     Written by <A HREF="mailto:sbekman@iil.intel.com">Stas Bekman</A>.
  -	     <BR>Last Modified at 12/07/98 
  +	     Written by <A HREF="help.html#author">Stas Bekman</A>.
  +	     <BR>Last Modified at 12/10/98 
         </FONT>
       </B>
     </TD>
  @@ -4739,6 +4795,23 @@
     &lt;/Location&gt;
   </PRE>
   <P>
  +If you are going to use Apache::Status. It's important to put it as a first
  +module in the start-up file, or in the httpd.conf. 
  +
  +<P>
  +<PRE>  # startup.pl
  +  use Apache::Registry ();
  +  use Apache::Status ();
  +  use Apache::DBI ();
  +</PRE>
  +<P>
  +If you don't put Apache::Status before Apache::DBI then you don't get
  +Apache::DBI's menu entry in status.
  +
  +<P>
  +For more about Apache::DBI see <A HREF="././performance.html#Persistent_DB_Connections">Persistent DB Connections</A>.
  +
  +<P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H2><A NAME="Usage">Usage</A></H2></CENTER>
   <P>
  @@ -4790,8 +4863,8 @@
     <TD ALIGN=CENTER VALIGN=CENTER>
       <B>
         <FONT SIZE=-1>
  -	     Written by <A HREF="mailto:sbekman@iil.intel.com">Stas Bekman</A>.
  -	     <BR>Last Modified at 12/07/98 
  +	     Written by <A HREF="help.html#author">Stas Bekman</A>.
  +	     <BR>Last Modified at 12/10/98 
         </FONT>
       </B>
     </TD>
  @@ -4886,7 +4959,7 @@
     <TD ALIGN=CENTER VALIGN=CENTER>
       <B>
         <FONT SIZE=-1>
  -	     Written by <A HREF="mailto:sbekman@iil.intel.com">Stas Bekman</A>.
  +	     Written by <A HREF="help.html#author">Stas Bekman</A>.
   	     <BR>Last Modified at 12/07/98 
         </FONT>
       </B>
  @@ -4975,7 +5048,7 @@
     <TD ALIGN=CENTER VALIGN=CENTER>
       <B>
         <FONT SIZE=-1>
  -	     Written by <A HREF="mailto:sbekman@iil.intel.com">Stas Bekman</A>.
  +	     Written by <A HREF="help.html#author">Stas Bekman</A>.
   	     <BR>Last Modified at 12/07/98 
         </FONT>
       </B>
  @@ -5011,7 +5084,9 @@
   </HEAD>
   <BODY TEXT="#000000" BGCOLOR="#E0FFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000">
   
  -<H1 ALIGN=CENTER><A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=LEFT></A><A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=RIGHT></A>
  +<H1 ALIGN=CENTER><A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=LEFT></A><A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90
  +
  + ALIGN=RIGHT></A>
   Help. Futher Learning</H1>
   
   <P>
  @@ -5021,14 +5096,16 @@
   
   <UL>
   <LI><A HREF="#1">READ ME&nbsp;FIRST</A></LI>
  +
  +<LI><A HREF="#author">This document's Author</A></LI>
   
  -<LI><A HREF="#2">mod_perl</A></LI>
  +<LI><A HREF="#2">Get helped with mod_perl</A></LI>
   
  -<LI><A HREF="#3">perl </A></LI>
  +<LI><A HREF="#3">Get helped with perl </A></LI>
   
  -<LI><A HREF="#4">perl/CGI</A></LI>
  +<LI><A HREF="#4">Get helped with perl/CGI</A></LI>
   
  -<LI><A HREF="#5">apache </A></LI>
  +<LI><A HREF="#5">Get helped with apache </A></LI>
   </UL>
   
   <P>
  @@ -5036,7 +5113,7 @@
   
   <H3><A NAME="1"></A>READ ME&nbsp;FIRST</H3>
   
  -<P>If after reading this guide and other documents listed n this section,
  +<P>If after reading this guide and other documents listed in this section,
   you feel that your question is yet not answered, please ask the apache/mod_perl
   mailing list to help you. But first try to browse the mailing list archive.
   Most of the time you will find the answer for your question by searching
  @@ -5048,11 +5125,30 @@
   help and <B>RTFM </B>before you call for <B>HELP</B>. (You have certainly
   heard the infamous fable of the shepherd boy and the wolves)</P>
   
  +<P>For more information See <A HREF="#2">Get helped with mod_perl</A>.
  +
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B> 
   <HR WIDTH="100%"></P>
   
  -<H3><A NAME="2"></A>mod_perl</H3>
  +<H3><A NAME="author"></A>This document's Author</H3>
   
  +<P>Hi, I wrote this document to help you with mod_perl.  
  +It doesn't mean that if you have any question regarding 
  +mod_perl, perl or whatever you think I might know, 
  +you should directly send it to me. Please see the 
  +<A HREF="help.html#2">Get helped with mod_perl</A> section and 
  +follow the guidelines as prescribed there.</P>
  +
  +<P>However, You are welcome to submit any corrections 
  +<A href="mailto:sbekman@iname.com?subject=mod_perl%20guide%20corrections"> 
  +directly to me</A>. <B>But please no questions, they will 
  +be immediately deleted.</B></P>
  +
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B> 
  +<HR WIDTH="100%"></P>
  +
  +<H3><A NAME="2"></A>Get helped with mod_perl</H3>
  +
   <UL>
   <LI><A HREF="perl.apache.org">perl.apache.org </A>- mod_perl home </LI>
   
  @@ -5087,15 +5183,13 @@
   href="mailto:majordomo@apache.org">majordomo@apache.org</a> with the
   string &quot;subscribe modperl&quot; in the body. </P>
   
  -<P><B>Searchable </B>mod_perl mailing list<A
  -HREF="http://forum.swarthmore.edu/epigone/modperl"><B>archive</B></A>by
  -Ken Williams. </P>
  -</UL>
  +<P><B>Searchable </B>mod_perl mailing list <A
  +HREF="http://forum.swarthmore.edu/epigone/modperl"><B>archive</B></A> by Ken Williams. </P> </UL>
   
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B> 
   <HR WIDTH="100%"></P>
   
  -<H3><A NAME="3"></A>Perl </H3>
  +<H3><A NAME="3"></A>Get helped with Perl </H3>
   
   <UL>
   <LI><A HREF="http://www.perl.com/CPAN/doc/FAQs/FAQ/PerlFAQ.html">The Perl
  @@ -5113,7 +5207,7 @@
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B> 
   <HR WIDTH="100%"></P>
   
  -<H3><A NAME="4"></A>Perl/CGI</H3>
  +<H3><A NAME="4"></A>Get helped with Perl/CGI</H3>
   
   <UL>
   <LI><A HREF="http://www.perl.com/CPAN/doc/FAQs/cgi/perl-cgi-faq.html">Perl/CGI
  @@ -5135,7 +5229,7 @@
   <H3><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B> 
   <HR WIDTH="100%"></H3>
   
  -<H3><A NAME="5"></A>Apache </H3>
  +<H3><A NAME="5"></A>Get helped with Apache </H3>
   
   <UL>
   <LI><A HREF="http://www.apache.org">Apache Project's Home</A></LI>
  @@ -5160,9 +5254,9 @@
   </TR>
   
   <TR ALIGN=CENTER VALIGN=TOP>
  -<TD ALIGN=CENTER VALIGN=CENTER><B><FONT SIZE=-1>Written by <A HREF="mailto:sbekman@iil.intel.com">Stas
  +<TD ALIGN=CENTER VALIGN=CENTER><B><FONT SIZE=-1>Written by <A HREF="help.html#author">Stas
   Bekman</A>.<BR>
  -Last Modified at 12/04/1998 </FONT></B></TD>
  +Last Modified at 12/10/1998 </FONT></B></TD>
   
   <TD><A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl2.jpg"  BORDER=0 ALT="Mod Perl Icon" HEIGHT=59 WIDTH=150></A>
   </TD>
  
  
  
  1.4       +13 -5     modperl-site/guide/config.html
  
  Index: config.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/config.html,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- config.html	1998/12/07 13:03:06	1.3
  +++ config.html	1998/12/10 09:22:21	1.4
  @@ -40,6 +40,7 @@
   	<UL>
   
   		<LI><A HREF="#My_cgi_perl_code_is_being_return">My cgi/perl code is being returned as a plain text instead of being executed by the webserver?</A>
  +		<LI><A HREF="#Script_working_under_cgi_bin_wh">Script working under cgi-bin, when called as mod_perl I see A 'Save-As' prompt</A>
   	</UL>
   
   </UL>
  @@ -147,7 +148,7 @@
   like <A HREF="#perl_status">perl-status</A>)
   
   <P>
  -Note that sometimes you will have to to add : PerlModule Apache::Registry
  +Note that sometimes you will have to add : PerlModule Apache::Registry
   
   <P>
   before you specify the location that uses Apache::Registry as a
  @@ -216,12 +217,14 @@
     
     # tell me more about warnings
     use Carp ();
  -  $SIG{__WARN__} = \&amp;amp;Carp::cluck;
  +  $SIG{__WARN__} = \&amp;Carp::cluck;
     
  -  # Load CGI.pm and call its compile() method to precompile its autoloaded methods. 
  +  # Load CGI.pm and call its compile() method to precompile 
  +  # (but not to import) its autoloaded methods. 
     use CGI ();
     CGI-&gt;compile(':all');
     
  +See also L&lt;Apache::Status|status/Configuration&gt;
   </PRE>
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  @@ -366,6 +369,11 @@
       PerlSendHeader On
     &lt;/Location&gt;
   </PRE>
  +<P>
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  +<CENTER><H2><A NAME="Script_working_under_cgi_bin_wh">Script working under cgi-bin, when called as mod_perl I see A 'Save-As' prompt</A></H2></CENTER>
  +<P>
  +Did you put <CODE>PerlSendHeader On</CODE> in the config part of the <CODE>&lt;Location foo</CODE>&lt;/Location&gt;&gt;?
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <P><A HREF="index.html">[Back to the main page]</A></P>
   
  @@ -379,8 +387,8 @@
     <TD ALIGN=CENTER VALIGN=CENTER>
       <B>
         <FONT SIZE=-1>
  -	     Written by <A HREF="mailto:sbekman@iil.intel.com">Stas Bekman</A>.
  -	     <BR>Last Modified at 12/07/98 
  +	     Written by <A HREF="help.html#author">Stas Bekman</A>.
  +	     <BR>Last Modified at 12/10/98 
         </FONT>
       </B>
     </TD>
  
  
  
  1.4       +35 -13    modperl-site/guide/control.html
  
  Index: control.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/control.html,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- control.html	1998/12/07 13:03:06	1.3
  +++ control.html	1998/12/10 09:22:21	1.4
  @@ -34,9 +34,29 @@
   <CENTER><H1><A NAME="Restarting_techniques">Restarting techniques</A></H1></CENTER>
   <P>
   In all these techniques you will have to know the server PID (Process ID).
  -The easiest 
  +The easiest way to find it the PID is to look it up in the httpd.pid file.
  +With my configuration it's
  +<CODE>/usr/apps/var/httpd_perl/run/httpd.pid</CODE>. It's easy to discover where to look at, by checking out the httpd.conf
  +file. Open the file and locate the entry <CODE>PidFile</CODE>:
   
   <P>
  +<PRE>  PidFile /usr/apps/var/httpd_perl/run/httpd.pid
  +</PRE>
  +<P>
  +Another way is to use the <CODE>ps</CODE> and <CODE>grep</CODE> utilities:
  +
  +<P>
  +<PRE>  % ps auxc | grep httpd_perl
  +</PRE>
  +<P>
  +You will receive a list of all httpd_perl (the parent and the children).
  +You are looking after the parent process. If you run it as a root - you
  +will easily locate it, since it belongs to root. If you run the server as
  +user (when you <A HREF="././scenario.html#Is_it_possible_to_install_mod_pe">don't have a root access</A>, most likely all the processes will belong to that user (unless defined
  +different in the httpd.conf), but it's still easy to know 'who is the
  +parent' -- the one of the smallest size...
  +
  +<P>
   You will notice many httpd_perl executables running on your system, but you
   should not send signals to any of them except the parent, whose pid is in
   the PidFile. That is to say you shouldn't ever need to send signals to any
  @@ -135,7 +155,7 @@
   <PRE>        % /usr/apps/sbin/httpd_perl/apachectl graceful    
   </PRE>
   <P>
  -Do a configuration syntax test
  +Do a configuration syntax test:
   
   <P>
   <PRE>        % /usr/apps/sbin/httpd_perl/apachectl configtest 
  @@ -148,7 +168,7 @@
   over httpd_docs server.
   
   <P>
  -There are other options for apachectl, use 'help' option to see them all
  +There are other options for apachectl, use 'help' option to see them all.
   
   <P>
   It's important to understand that this script is based on the PID file
  @@ -159,7 +179,7 @@
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H1><A NAME="Monitoring_the_Server_A_watchdo">Monitoring the Server. A watchdog.</A></H1></CENTER>
   <P>
  -With mod_perl many things can happen to your server. The worse one is the
  +With mod_perl many things can happen to your server. The worst one is the
   possibility that the server will die when you will be not around. As with
   any other critical service you need to run some kind of watchdog.
   
  @@ -225,10 +245,11 @@
   <P>
   Another approach, probably even more practical, is to use the Cool LWP perl
   package , to test the server by trying to fetch some document (script)
  -served by the server. Why is it more practical? Since the while server can
  -be up as a process, it can be stuck and not working (SYN_RECV state -
  -anyone???), So failing to get the document will trigger restart, and
  -``probably'' the problem will go away. (Just replace <CODE>start</CODE> with <CODE>restart</CODE> in the <CODE>$restart_command</CODE> below.
  +served by the server. Why is it more practical? While server can be up as a
  +process, it can be stuck and not working (SYN_RECV state - anyone??? Am I
  +getting a SYNC flood attack), So failing to get the document will trigger
  +restart, and ``probably'' the problem will go away. (Just replace
  +<CODE>start</CODE> with <CODE>restart</CODE> in the <CODE>$restart_command</CODE> below. 
   
   <P>
   Again we put this script into a crontab to call it every 30 minutes. 
  @@ -362,7 +383,7 @@
   (when running with -X), you generally see in the error_log that the parent
   server writes: Like ``server started, server stopped and etc''. Since httpd
   -X runs immediately as a child, so there is no controlling parent to write
  -all the status messages
  +all the status messages.
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  @@ -491,7 +512,7 @@
   <P>
   First to generate relative URL so it will reuse the technique above, with
   redirect (which is transparent for user) but it will not work if you have
  -something to POST (redirect looses all the data!)
  +something to POST (redirect looses all the data!).
   
   <P>
   Second to use a general config module which generates a correct full URL
  @@ -525,7 +546,7 @@
   environment identical to the server's by copying the perl run directives
   from server startup and config files. It'll also allow you to remove
   completely the first line of the script - since mod_perl skip it and
  -wrapper knows how to call the script
  +wrapper knows how to call the script.
   
   <P>
   Below is the example of such a script. Note that we force the -wT when we
  @@ -605,6 +626,7 @@
   <P>
   The effect of SIGUSR1 is detailed in: <A
   HREF="http://www.apache.org/docs/stopping.html">http://www.apache.org/docs/stopping.html</A>
  +
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <P><A HREF="index.html">[Back to the main page]</A></P>
   
  @@ -618,8 +640,8 @@
     <TD ALIGN=CENTER VALIGN=CENTER>
       <B>
         <FONT SIZE=-1>
  -	     Written by <A HREF="mailto:sbekman@iil.intel.com">Stas Bekman</A>.
  -	     <BR>Last Modified at 12/07/98 
  +	     Written by <A HREF="help.html#author">Stas Bekman</A>.
  +	     <BR>Last Modified at 12/09/98 
         </FONT>
       </B>
     </TD>
  
  
  
  1.4       +1 -1      modperl-site/guide/debug.html
  
  Index: debug.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/debug.html,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- debug.html	1998/12/07 13:03:06	1.3
  +++ debug.html	1998/12/10 09:22:21	1.4
  @@ -71,7 +71,7 @@
     <TD ALIGN=CENTER VALIGN=CENTER>
       <B>
         <FONT SIZE=-1>
  -	     Written by <A HREF="mailto:sbekman@iil.intel.com">Stas Bekman</A>.
  +	     Written by <A HREF="help.html#author">Stas Bekman</A>.
   	     <BR>Last Modified at 12/07/98 
         </FONT>
       </B>
  
  
  
  1.5       +44 -16    modperl-site/guide/help.html
  
  Index: help.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/help.html,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- help.html	1998/12/07 13:03:07	1.4
  +++ help.html	1998/12/10 09:22:21	1.5
  @@ -10,7 +10,10 @@
   <BODY TEXT="#000000" BGCOLOR="#E0FFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000">
   
   
  -<H1 ALIGN=CENTER><A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=LEFT></A><A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=RIGHT></A>
  +<H1 ALIGN=CENTER><A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90 ALIGN=LEFT></A><A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl.gif" ALT="Mod Perl Icon" BORDER=0 HEIGHT=30 WIDTH=90
  +
  +
  + ALIGN=RIGHT></A>
   Help. Futher Learning</H1>
   
   
  @@ -24,17 +27,20 @@
   <UL>
   <LI><A HREF="#1">READ ME&nbsp;FIRST</A></LI>
   
  +
  +<LI><A HREF="#author">This document's Author</A></LI>
   
  -<LI><A HREF="#2">mod_perl</A></LI>
   
  +<LI><A HREF="#2">Get helped with mod_perl</A></LI>
   
  -<LI><A HREF="#3">perl </A></LI>
   
  +<LI><A HREF="#3">Get helped with perl </A></LI>
   
  -<LI><A HREF="#4">perl/CGI</A></LI>
   
  +<LI><A HREF="#4">Get helped with perl/CGI</A></LI>
   
  -<LI><A HREF="#5">apache </A></LI>
  +
  +<LI><A HREF="#5">Get helped with apache </A></LI>
   </UL>
   
   
  @@ -45,7 +51,7 @@
   <H3><A NAME="1"></A>READ ME&nbsp;FIRST</H3>
   
   
  -<P>If after reading this guide and other documents listed n this section,
  +<P>If after reading this guide and other documents listed in this section,
   you feel that your question is yet not answered, please ask the apache/mod_perl
   mailing list to help you. But first try to browse the mailing list archive.
   Most of the time you will find the answer for your question by searching
  @@ -58,13 +64,37 @@
   heard the infamous fable of the shepherd boy and the wolves)</P>
   
   
  +<P>For more information See <A HREF="#2">Get helped with mod_perl</A>.
  +
  +
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B> 
   <HR WIDTH="100%"></P>
   
  +
  +<H3><A NAME="author"></A>This document's Author</H3>
  +
  +
  +<P>Hi, I wrote this document to help you with mod_perl.  
  +It doesn't mean that if you have any question regarding 
  +mod_perl, perl or whatever you think I might know, 
  +you should directly send it to me. Please see the 
  +<A HREF="help.html#2">Get helped with mod_perl</A> section and 
  +follow the guidelines as prescribed there.</P>
   
  -<H3><A NAME="2"></A>mod_perl</H3>
   
  +<P>However, You are welcome to submit any corrections 
  +<A href="mailto:sbekman@iname.com?subject=mod_perl%20guide%20corrections"> 
  +directly to me</A>. <B>But please no questions, they will 
  +be immediately deleted.</B></P>
   
  +
  +<P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B> 
  +<HR WIDTH="100%"></P>
  +
  +
  +<H3><A NAME="2"></A>Get helped with mod_perl</H3>
  +
  +
   <UL>
   <LI><A HREF="perl.apache.org">perl.apache.org </A>- mod_perl home </LI>
   
  @@ -109,17 +139,15 @@
   string &quot;subscribe modperl&quot; in the body. </P>
   
   
  -<P><B>Searchable </B>mod_perl mailing list<A
  -HREF="http://forum.swarthmore.edu/epigone/modperl"><B>archive</B></A>by
  -Ken Williams. </P>
  -</UL>
  +<P><B>Searchable </B>mod_perl mailing list <A
  +HREF="http://forum.swarthmore.edu/epigone/modperl"><B>archive</B></A> by Ken Williams. </P> </UL>
   
   
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B> 
   <HR WIDTH="100%"></P>
   
   
  -<H3><A NAME="3"></A>Perl </H3>
  +<H3><A NAME="3"></A>Get helped with Perl </H3>
   
   
   <UL>
  @@ -143,7 +171,7 @@
   <HR WIDTH="100%"></P>
   
   
  -<H3><A NAME="4"></A>Perl/CGI</H3>
  +<H3><A NAME="4"></A>Get helped with Perl/CGI</H3>
   
   
   <UL>
  @@ -172,7 +200,7 @@
   <HR WIDTH="100%"></H3>
   
   
  -<H3><A NAME="5"></A>Apache </H3>
  +<H3><A NAME="5"></A>Get helped with Apache </H3>
   
   
   <UL>
  @@ -205,9 +233,9 @@
   
   
   <TR ALIGN=CENTER VALIGN=TOP>
  -<TD ALIGN=CENTER VALIGN=CENTER><B><FONT SIZE=-1>Written by <A HREF="mailto:sbekman@iil.intel.com">Stas
  +<TD ALIGN=CENTER VALIGN=CENTER><B><FONT SIZE=-1>Written by <A HREF="help.html#author">Stas
   Bekman</A>.<BR>
  -Last Modified at 12/04/1998 </FONT></B></TD>
  +Last Modified at 12/10/1998 </FONT></B></TD>
   
   
   <TD><A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl2.jpg"  BORDER=0 ALT="Mod Perl Icon" HEIGHT=59 WIDTH=150></A>
  
  
  
  1.4       +3 -3      modperl-site/guide/index.html
  
  Index: index.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/index.html,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- index.html	1998/12/07 13:03:07	1.3
  +++ index.html	1998/12/10 09:22:21	1.4
  @@ -15,7 +15,7 @@
   to your perl cgi-bin scripts.</B></P></CENTER>
   
   
  -<CENTER><P><B>Version 1.01  Dec, 7 1998</B></P></CENTER>
  +<CENTER><P><B>Version 1.02  Dec, 10 1998</B></P></CENTER>
   
   
   <P>
  @@ -82,9 +82,9 @@
   
   
   <TR ALIGN=CENTER VALIGN=TOP>
  -<TD ALIGN=CENTER VALIGN=CENTER><B><FONT SIZE=-1>Written by <A HREF="mailto:sbekman@iil.intel.com">Stas
  +<TD ALIGN=CENTER VALIGN=CENTER><B><FONT SIZE=-1>Written by <A HREF="help.html#author">Stas
   Bekman</A>.<BR>
  -Last Modified at 12/04/1998 </FONT></B></TD>
  +Last Modified at 12/09/1998 </FONT></B></TD>
   
   
   <TD><A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl2.jpg"  BORDER=0 ALT="Mod Perl Icon" BORDER=0 HEIGHT=59 WIDTH=150></A>
  
  
  
  1.5       +7 -4      modperl-site/guide/intro.html
  
  Index: intro.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/intro.html,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- intro.html	1998/12/07 13:03:07	1.4
  +++ intro.html	1998/12/10 09:22:22	1.5
  @@ -113,7 +113,7 @@
   
   
   <P>If you find incorrect details, my grammar mistakes or you want to contribute
  -to this document please fell free to send me an <A HREF="mailto:sbekman@iil.intel.com">email</A>.</P>
  +to this document please feel free to send me an <A HREF="mailto:sbekman@iil.intel.com">email</A>.</P>
   
   
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B> 
  @@ -172,10 +172,12 @@
         <LI>Ask Bjoern Hansen
         <LI>Brian Moseley 
         <LI>Chad K. Lewis
  +      <LI>David Landgren
         <LI>Doug Bagley
         <LI>Doug MacEachern
         <LI>Edmund Mergl
         <LI>Eric Cholet
  +      <LI>Evan A. Zacks
         <LI>Frank Cringle
         <LI>G.Richter
         <LI>Gunther Birznieks
  @@ -187,6 +189,7 @@
         <LI>Leslie Mikesell
         <LI>Lincoln Stein
         <LI>Mike Fletcher
  +      <LI>Nancy Lin
         <LI>Nathan Torkington
         <LI>Ralf Engelschall
         <LI>Randal Schwartz
  @@ -200,7 +203,7 @@
   <P>I&nbsp;want to thank all the people who donated their time and efforts
   to made this amazing idea of mod_perl to become reality. It includes Doug
   MacEachern, the author of mod_perl and all the developers who contributed
  -bug patches, modules and help. And of course the numeral unseen users who
  +bug patches, modules and help. And of course the numerous unseen users who
   helped to find the bugs and advocate mod_perl around the world.</P>
   
   
  @@ -219,9 +222,9 @@
   
   
   <TR ALIGN=CENTER VALIGN=TOP>
  -<TD ALIGN=CENTER VALIGN=CENTER><B><FONT SIZE=-1>Written by <A HREF="mailto:sbekman@iil.intel.com">Stas
  +<TD ALIGN=CENTER VALIGN=CENTER><B><FONT SIZE=-1>Written by <A HREF="help.html#author">Stas
   Bekman</A>.<BR>
  -Last Modified at 12/04/1998 </FONT></B></TD>
  +Last Modified at 12/10/1998 </FONT></B></TD>
   
   
   <TD><A HREF="http://perl.apache.org"><IMG SRC="images/mod_perl2.jpg"  BORDER=0 ALT="Mod Perl Icon" HEIGHT=59 WIDTH=150></A>
  
  
  
  1.4       +15 -15    modperl-site/guide/obvious.html
  
  Index: obvious.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/obvious.html,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- obvious.html	1998/12/07 13:03:07	1.3
  +++ obvious.html	1998/12/10 09:22:22	1.4
  @@ -38,8 +38,8 @@
   <P>
   <CENTER><H1><A NAME="Coverage">Coverage</A></H1></CENTER>
   <P>
  -This document describes a ``special'' traps of running your plain cgis
  -under Apache::Registry and Apache::PerlRun
  +This document describes ``special'' traps of running your plain cgis under
  +Apache::Registry and Apache::PerlRun.
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  @@ -117,7 +117,7 @@
   A solution? 
   
   <P>
  -<PRE>  use vars qw($x $a); at the top of you code
  +<PRE>  use vars qw($x $a); at the top of your code
   </PRE>
   <P>
   Also see the clarification of <CODE>my()</CODE> vs. <CODE>use vars</CODE> - Ken Williams writes:
  @@ -196,7 +196,7 @@
   the <CODE>@INC</CODE> is being reset to its original value. To make sure
   that you have set a correct <CODE>@INC</CODE> fetch <A
   HREF="http://your.perl.server/perl-status?inc">http://your.perl.server/perl-status?inc</A>
  -and watch the bottom of the page. (I consider you have configured the
  +and watch the bottom of the page. (I assume you have configured the
   &lt;Location /perl-status&gt; section in httpd.conf as modperl docs shows.
   
   <P>
  @@ -257,7 +257,7 @@
     }
   </PRE>
   <P>
  -You will want to add debug printings to test this code in your application
  +You will want to add debug printings to test this code in your application. 
   
   <P>
   Read also use versus require article for more info.
  @@ -439,7 +439,7 @@
   
   <P>
   Application that allows you to change the configuration at the run time.
  -Let's say the script produce a form to change the background color of the
  +Let's say the script produces a form to change the background color of the
   page. (It's not a good idea but for the sake of potential problem
   presentation we will assume that we don't write down the change on the
   disk). So you have typed in a new color , and as a respond you print back
  @@ -447,16 +447,16 @@
   you keep running in single server mode you will never notice that you have
   a problem... If you run the same code in the multi server environment ,
   after you submit the color change you will get the result as expected, but
  -when you will call the same URL again (not reload!) most of the chances
  -that you will get back the old color, since except the child who processed
  -the color change request no one knows about their global variable change.
  -Just remember that children can't share information, but the stuff they
  +when you will call the same URL again (not reload!) chances are that you
  +will get back the old color, since except the child who processed the color
  +change request no one knows about their global variable change. Just
  +remember that children can't share information, but the stuff they
   inherited from parent on their load.
   
   <P>
  -Also note that since server run in single mode - If the output returns HTML
  -with IMG tags, the load of these will take a lot of time (read apache docs
  -of httpd -X to learn why).
  +Also note that since the server is running in single mode - If the output
  +returns HTML with IMG tags, the load of these will take a lot of time (read
  +apache docs of httpd -X to learn why).
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  @@ -486,8 +486,8 @@
     <TD ALIGN=CENTER VALIGN=CENTER>
       <B>
         <FONT SIZE=-1>
  -	     Written by <A HREF="mailto:sbekman@iil.intel.com">Stas Bekman</A>.
  -	     <BR>Last Modified at 12/07/98 
  +	     Written by <A HREF="help.html#author">Stas Bekman</A>.
  +	     <BR>Last Modified at 12/09/98 
         </FONT>
       </B>
     </TD>
  
  
  
  1.4       +14 -5     modperl-site/guide/performance.html
  
  Index: performance.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/performance.html,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- performance.html	1998/12/07 13:03:07	1.3
  +++ performance.html	1998/12/10 09:22:22	1.4
  @@ -52,13 +52,22 @@
   You can also put the standard <CODE>use Foo;</CODE> into the startup-file. 
   
   <P>
  -CGI.pm is a special one, you will want to put into a startup-file:
  +CGI.pm is a special one. Ordinarily CGI.pm autoloads most of its functions
  +on an as-needed basis. This speeds up the loading time by deferring the
  +compilation phase. However, if you are using mod_perl, FastCGI or another
  +system that uses a persistent Perl interpreter, you will want to precompile
  +the methods at initialization time. To accomplish this, call the package
  +function <CODE>compile()</CODE> like this: 
   
   <P>
  -<PRE>  use CGI ();
  -  CGI-&gt;compile(':all');
  +<PRE>    use CGI ();
  +    CGI-&gt;compile(':all');
   </PRE>
   <P>
  +The arguments to <CODE>compile()</CODE> are a list of method names or sets, and are identical to those accepted by
  +the use operator. 
  +
  +<P>
   You can also preload the Registry scripts. See <A HREF="#Preload_Registry_Scripts">Preload Registry Scripts</A>.
   
   <P>
  @@ -731,8 +740,8 @@
     <TD ALIGN=CENTER VALIGN=CENTER>
       <B>
         <FONT SIZE=-1>
  -	     Written by <A HREF="mailto:sbekman@iil.intel.com">Stas Bekman</A>.
  -	     <BR>Last Modified at 12/07/98 
  +	     Written by <A HREF="help.html#author">Stas Bekman</A>.
  +	     <BR>Last Modified at 12/10/98 
         </FONT>
       </B>
     </TD>
  
  
  
  1.5       +40 -27    modperl-site/guide/porting.html
  
  Index: porting.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/porting.html,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- porting.html	1998/12/07 13:03:07	1.4
  +++ porting.html	1998/12/10 09:22:22	1.5
  @@ -82,7 +82,7 @@
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H1><A NAME="Before_you_start_to_code">Before you start to code</A></H1></CENTER>
   <P>
  -It can be a good idea to strength some of the programming skills, since
  +It can be a good idea to strengthen some of the programming skills, since
   Apache::Registry doesn't allow sloppiness programming.
   
   <P>
  @@ -110,7 +110,7 @@
   state of your mind. Scripts running under mod_perl are like subroutines are
   being called from the daemon who runs all the time. Imagine the daemon
   process that when requested to process some of the scripts - reads it in,
  -compiles it as a subroutine and finally executes it. On any consequent
  +compiles it as a subroutine and finally executes it. On any subsequent
   request it'll just recall the already compiled subroutine. Hope that you
   get the idea.
   
  @@ -129,7 +129,7 @@
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H3><A NAME="Script_s_namespace">Script's namespace</A></H3></CENTER>
   <P>
  -Scripts under Apache::Registry don't not run in package <STRONG>main</STRONG>, they run in a unique namespace based on the requested uri. e.g if your
  +Scripts under Apache::Registry do not run in package <STRONG>main</STRONG>, they run in a unique namespace based on the requested uri. e.g if your
   uri is /perl/test.pl the package will be called
   Apache::ROOT::perl::test_2epl;
   
  @@ -175,7 +175,7 @@
   <P>
   And both scripts do: <CODE>use Foo;</CODE> only the first one called will know about Foo, when you will call the
   second script it will not know about Foo at all - it's like you've
  -forgotten to write <CODE>use Foo;</CODE>. Run the server in the <A HREF="././control.html#Single_Mode_Running">single server mode</A> to solve that kind of bugs immediately.
  +forgotten to write <CODE>use Foo;</CODE>. Run the server in the <A HREF="././control.html#Single_Mode_Running">single server mode</A> to solve that kind of bug immediately.
   
   <P>
   You will see the following in the error_log file:
  @@ -263,7 +263,7 @@
   <PRE>  require &quot;/full/path/to/the/config.pl&quot;;
   </PRE>
   <P>
  -But than you loose portability! (I mean if you move the tool around in the
  +But then you lose portability! (I mean if you move the tool around in the
   filesystem you will have to change the base dir)
   
   <P><LI>
  @@ -445,7 +445,7 @@
   time, once per-child process if the module is pulled in off of disk again
   via Apache::StatINC - an additional time, in the parent process on each
   restart if PerlFreshRestart is On - unpredictable if you fiddle with
  -<CODE>%INC</CODE> yourself
  +<CODE>%INC</CODE> yourself.
   
   <P>
   Apache::Registry scripts which contain BEGIN blocks will be executed: -
  @@ -454,7 +454,7 @@
   additional time, once per-child process if the script file has changed on
   disk - an additional time, in the parent process on each restart if pulled
   in by the parent process via Apache::RegistryLoader and PerlFreshRestart is
  -On
  +On.
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  @@ -653,7 +653,7 @@
   possible of course. Try to process line at a time and print it back to the
   file (if you need to modify the file itself, use temporary file for that,
   when finished overwrite the src file, make sure to provide locking
  -mechanism!) 
  +mechanism!).
   
   <P>
   <STRONG>Second example</STRONG> is copying variables between functions (passing variables by value). Let's
  @@ -710,7 +710,7 @@
   browser after they were formatted. (I even don't mention the horrible case
   where programmers read in the whole DB and then let the perl to process
   it!!! Use relational DB and let the SQL do the job, so you get only the
  -records you need!!!)
  +records you need!!!).
   
   <P>
   We will use DBI for that (assume we are already connected to the DB) (read
  @@ -726,14 +726,14 @@
   <P>
   In the example above the httpd_process will grow up by the size of the
   variables that have been allocated for the records that matched the query.
  -(Again remember to multiply it by the number of the children server runs!)
  +(Again remember to multiply it by the number of the children server runs!).
   
   <P>
   What you want to do is to not accumulate the records but print them as they
   are fetched from the DB. More over we use a bind_col and
   $sth-&gt;fetchrow_arrayref (aliased to $sth-&gt;fetch) methods, to get the
   the fastest way to fetch data. The example below prints the TABLE with
  -matched data, the only memory that is being used is a <CODE>@cols</CODE>
  +matched data, the only memory that is being used is a @cols.
   
   <P>
   <PRE>  my @select_fields = qw(a b c);
  @@ -759,6 +759,25 @@
   so you get the number of matched records.
   
   <P>
  +For those who think that $sth-&gt;rows will do the job, here is the quote
  +from the DBI manpage: 
  +
  +<BLOCKQUOTE>
  +
  +<P>
  +rows <CODE>$rv</CODE> = $sth-&gt;rows; Returns the number of rows affected
  +by the last database altering command, or -1 if not known or not available.
  +Generally you can only rely on a row count after a do or non-select execute
  +(for some specific operations like update and delete) or after fetching all
  +the rows of a select statement. For select statements it is generally not
  +possible to know how many rows will be returned except by fetching them
  +all. Some drivers will return the number of rows the application has
  +fetched so far but others may return -1 until all rows have been fetched.
  +So use of the rows method with select statements is not recommended.
  +
  +</BLOCKQUOTE>
  +
  +<P>
   Just as a bonus, I wanted to write a single sub that process any query but
   very flexible, since it accepts: conditions, callback closure sub, select
   fields and restrictions. 
  @@ -861,10 +880,8 @@
   </PRE>
   <P>
   You might want to check also <A HREF="././performance.html#Limiting_the_size_of_the_process">Limiting the size of the processes</A>
  - and <A HREF="././performance.html#Limiting_the_resources_used_by_h">Limiting the resources used by httpd children</A>
  + and <A HREF="././performance.html#Limiting_the_resources_used_by_h">Limiting the resources used by httpd children</A>.
   
  -
  -
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H2><A NAME="Sometimes_it_works_Sometimes_Not">Sometimes it works Sometimes Not (Very important!)</A></H2></CENTER>
  @@ -874,10 +891,8 @@
   the more it runs without restart the more it screws up. Many times you can
   resolve this problem very easily. You have to test your script under with
   Server running as a 
  -<A HREF="././control.html#Single_Mode_Running">single process</A> 
  +<A HREF="././control.html#Single_Mode_Running">single process</A>.
   
  - 
  -
   <P>
   Generally the problem you have is using global variables. Since global
   variables don't change from one script invocation to another unless you
  @@ -886,7 +901,7 @@
   <P>
   The first example is amazing. Web Services. Imagine that you enter some
   site you have your account on (Free Email Account?). Now you want to see
  -what other users read
  +what other users read.
   
   <P>
   You type in your name and passwd, and you are expecting to enter to your
  @@ -898,7 +913,7 @@
   sloppiness programming, the global variable was not reset at the beginning
   of the program and voila you can easily peek into other people emails! You
   would ask it can't happen, since you have entered the login and passwd. I
  -tell you, it happens! See for yourself:
  +tell you, it happens! See for yourself: 
   
   <P>
   <PRE>  use vars ($authenticated);
  @@ -925,19 +940,19 @@
   Since <CODE>$authenticated</CODE> is global - if it becomes 1 once it'll be
   1 for the whole child's life!!! The solution is trivial - reset the
   <CODE>$authenticated</CODE> to 0 at the beginning of the program. (Or many
  -other different solution). Of course the example is too trivial - but
  +other different solutions). Of course the example is too trivial - but
   believe me it happens!
   
   <P>
   Just another little one liner that can make your day spoiled, assuming you
  -forgot to reset the $allowed. It's perfectly OK in plain mod_cgi :
  +forgot to reset the $allowed. It's perfectly OK in plain mod_cgi:
   
   <P>
   <PRE>  $allowed = 1 if $username eq 'admin'; # 
   </PRE>
   <P>
   But you will let any user to admin your system with the line above (again
  -assuming you have used the same child prior to some user request) 
  +assuming you have used the same child prior to some user request).
   
   <P>
   Another good example is usage of /o in regexp. After you restart the server
  @@ -951,9 +966,7 @@
   
   <P>
   So to make sure you don't miss these bugs always test your CGI in
  -<A HREF="././control.html#Single_Mode_Running">single process</A>. To solve this particular <STRONG>/o</STRONG> problem refer to <A HREF="././obvious.html#Regular_Expressions">Regular Expressions</A>   
  -
  -   
  +<A HREF="././control.html#Single_Mode_Running">single process</A>. To solve this particular <STRONG>/o</STRONG> problem refer to <A HREF="././obvious.html#Compiled_Regular_Expressions">Compiled Regular Expressions</A>.
   
   <P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
  @@ -1073,8 +1086,8 @@
     <TD ALIGN=CENTER VALIGN=CENTER>
       <B>
         <FONT SIZE=-1>
  -	     Written by <A HREF="mailto:sbekman@iil.intel.com">Stas Bekman</A>.
  -	     <BR>Last Modified at 12/07/98 
  +	     Written by <A HREF="help.html#author">Stas Bekman</A>.
  +	     <BR>Last Modified at 12/09/98 
         </FONT>
       </B>
     </TD>
  
  
  
  1.4       +1 -2      modperl-site/guide/scenario.html
  
  Index: scenario.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/scenario.html,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- scenario.html	1998/12/07 13:03:07	1.3
  +++ scenario.html	1998/12/10 09:22:22	1.4
  @@ -304,7 +304,6 @@
   home. You have a few solutions: <STRONG>a.</STRONG> reduce resource usage - see <A HREF="././performance.html#Limiting_the_size_of_the_process">Limiting the size of the processes</A>  <STRONG>b.</STRONG> ask your ISP if you can put a dedicated machine into their computer room
   and be root there. <STRONG>c.</STRONG> look for another ISP with lots of resources or one that supports mod_perl
   (not likely)
  -
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <P><A HREF="index.html">[Back to the main page]</A></P>
   
  @@ -318,7 +317,7 @@
     <TD ALIGN=CENTER VALIGN=CENTER>
       <B>
         <FONT SIZE=-1>
  -	     Written by <A HREF="mailto:sbekman@iil.intel.com">Stas Bekman</A>.
  +	     Written by <A HREF="help.html#author">Stas Bekman</A>.
   	     <BR>Last Modified at 12/07/98 
         </FONT>
       </B>
  
  
  
  1.4       +1 -1      modperl-site/guide/snippets.html
  
  Index: snippets.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/snippets.html,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- snippets.html	1998/12/07 13:03:08	1.3
  +++ snippets.html	1998/12/10 09:22:22	1.4
  @@ -62,7 +62,7 @@
     <TD ALIGN=CENTER VALIGN=CENTER>
       <B>
         <FONT SIZE=-1>
  -	     Written by <A HREF="mailto:sbekman@iil.intel.com">Stas Bekman</A>.
  +	     Written by <A HREF="help.html#author">Stas Bekman</A>.
   	     <BR>Last Modified at 12/07/98 
         </FONT>
       </B>
  
  
  
  1.4       +3 -3      modperl-site/guide/start.html
  
  Index: start.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/start.html,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- start.html	1998/12/07 13:03:08	1.3
  +++ start.html	1998/12/10 09:22:22	1.4
  @@ -152,7 +152,7 @@
   <P>
   <PRE>  % perl Makefile.PL APACHE_SRC=../apache_1.3.2/src \
       DO_HTTPD=1 PERL_MARK_WHERE=1 EVERYTHING=1
  -  % make &amp;amp;&amp;amp; make test &amp;amp;&amp;amp; make install
  +  % make &amp;&amp; make test &amp;&amp; make install
   </PRE>
   <P>
   To change the installation target (either if you aren't root or you need to
  @@ -362,8 +362,8 @@
     <TD ALIGN=CENTER VALIGN=CENTER>
       <B>
         <FONT SIZE=-1>
  -	     Written by <A HREF="mailto:sbekman@iil.intel.com">Stas Bekman</A>.
  -	     <BR>Last Modified at 12/07/98 
  +	     Written by <A HREF="help.html#author">Stas Bekman</A>.
  +	     <BR>Last Modified at 12/09/98 
         </FONT>
       </B>
     </TD>
  
  
  
  1.4       +19 -2     modperl-site/guide/status.html
  
  Index: status.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/status.html,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- status.html	1998/12/07 13:03:08	1.3
  +++ status.html	1998/12/10 09:22:23	1.4
  @@ -52,6 +52,23 @@
     &lt;/Location&gt;
   </PRE>
   <P>
  +If you are going to use Apache::Status. It's important to put it as a first
  +module in the start-up file, or in the httpd.conf. 
  +
  +<P>
  +<PRE>  # startup.pl
  +  use Apache::Registry ();
  +  use Apache::Status ();
  +  use Apache::DBI ();
  +</PRE>
  +<P>
  +If you don't put Apache::Status before Apache::DBI then you don't get
  +Apache::DBI's menu entry in status.
  +
  +<P>
  +For more about Apache::DBI see <A HREF="././performance.html#Persistent_DB_Connections">Persistent DB Connections</A>.
  +
  +<P>
   <P><B><FONT SIZE=-1><A HREF="#toc">[TOC]</A></FONT></B><HR WIDTH="100%"></P>
   <CENTER><H2><A NAME="Usage">Usage</A></H2></CENTER>
   <P>
  @@ -104,8 +121,8 @@
     <TD ALIGN=CENTER VALIGN=CENTER>
       <B>
         <FONT SIZE=-1>
  -	     Written by <A HREF="mailto:sbekman@iil.intel.com">Stas Bekman</A>.
  -	     <BR>Last Modified at 12/07/98 
  +	     Written by <A HREF="help.html#author">Stas Bekman</A>.
  +	     <BR>Last Modified at 12/10/98 
         </FONT>
       </B>
     </TD>
  
  
  
  1.4       +1 -1      modperl-site/guide/warnings.html
  
  Index: warnings.html
  ===================================================================
  RCS file: /export/home/cvs/modperl-site/guide/warnings.html,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- warnings.html	1998/12/07 13:03:08	1.3
  +++ warnings.html	1998/12/10 09:22:23	1.4
  @@ -260,7 +260,7 @@
     <TD ALIGN=CENTER VALIGN=CENTER>
       <B>
         <FONT SIZE=-1>
  -	     Written by <A HREF="mailto:sbekman@iil.intel.com">Stas Bekman</A>.
  +	     Written by <A HREF="help.html#author">Stas Bekman</A>.
   	     <BR>Last Modified at 12/07/98 
         </FONT>
       </B>
  
  
  

Mime
View raw message