Apache-ASP
view release on metacpan or search on metacpan
site/config.html view on Meta::CPAN
</tr>
<tr>
<td bgcolor=white><font size=-2 face="verdana" color=#993399><b><nobr> </nobr></b></font></td>
<td bgcolor=white ><font face="verdana,helvetica" size=-1><b><nobr><a href="todo.html" style="text-decoration:none"><font color=#063678>TODO</font></a></nobr></b></font></td>
</tr>
<tr>
<td bgcolor=white><font size=-2 face="verdana" color=#993399><b><nobr> </nobr></b></font></td>
<td bgcolor=white ><font face="verdana,helvetica" size=-1><b><nobr><a href="changes.html" style="text-decoration:none"><font color=#063678>CHANGES</font></a></nobr></b></font></td>
</tr>
<tr>
<td bgcolor=white><font size=-2 face="verdana" color=#993399><b><nobr> </nobr></b></font></td>
<td bgcolor=white ><font face="verdana,helvetica" size=-1><b><nobr><a href="license.html" style="text-decoration:none"><font color=#063678>LICENSE</font></a></nobr></b></font></td>
</tr>
<tr><td colspan=2><hr size=1></td></tr>
<tr>
<td bgcolor=white><font size=-2 face="verdana" color=#993399><b><nobr> </nobr></b></font></td>
<td bgcolor=white ><font face="verdana,helvetica" size=-1><b><nobr><a href="eg/index.html" style="text-decoration:none"><font color=#063678>EXAMPLES</font></a></nobr></b></font></td>
</tr>
</table>
</td></tr>
</table>
<br>
<center>
<a href=http://www.apache-asp.org/><img src="powered_by_apache_asp.jpg" width="88" height="31" alt="Powered by Apache::ASP" border="0"></a>
<br>
<a href=http://perl.apache.org><img src="powered_by_modperl.gif" width="88" height="31" alt="Powered by ModPerl and Apache" border="0"></a>
<br>
<a href=http://www.perl.com><img src="rectangle_power_perl.gif" width="88" height="31" alt="Powered by Perl" border="0"></a>
</center>
</td>
<td valign=top bgcolor=white>
<font size=+0 face=verdana,arial>
<font face=verdana><font class=title size=+1 color=#555555><b>CONFIG</b></font>
<font face="courier new" size=3><pre>
</pre></font>You may use a <Files ...> directive in your httpd.conf
Apache configuration file to make Apache::ASP start ticking. Configure the
optional settings if you want, the defaults are fine to get started.
The settings are documented below.
Make sure Global is set to where your web applications global.asa is
if you have one!
<font face="courier new" size=3><pre>
PerlModule Apache::ASP
<Files ~ (\.asp)>
SetHandler perl-script
PerlHandler Apache::ASP
PerlSetVar Global .
PerlSetVar StateDir /tmp/asp
</Files>
</pre></font>NOTE: do not use this for the examples in ./site/eg. To get the
examples working, check out the Quick Start section of <a href=install.html><font size=-1 face=verdana><b>INSTALL</b></font></a>
<font face="courier new" size=3><pre>
</pre></font>You may use other Apache configuration tags like <Directory>,
<Location>, and <VirtualHost>, to separately define ASP
configurations, but using the <Files> tag is natural for
ASP application building because it lends itself naturally
to mixed media per directory. For building many separate
ASP sites, you might want to use separate .htaccess files,
or <Files> tags in <VirtualHost> sections, the latter being
better for performance.</font>
<hr size=1>
<table width=100% border=0 cellpadding=1 cellspacing=3>
<tr>
<td valign=top><font face="lucida console" size=-1>
<tr>
<td valign=top bgcolor=#005196>
<font face="lucida console" size=-1>
<font color=white><b><a href=#Core><font color=white>Core</font></a></b></font>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#XMLSubsMatch>XMLSubsMatch</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Global>Global</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#XMLSubsStric569463b3>XMLSubsStrict</a>
</font>
</td>
</tr>
<tr>
site/config.html view on Meta::CPAN
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#FileUploadMa625d7c4d>FileUploadMax</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#CollectionItb0343456>CollectionItem</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#FileUploadTeb83a1ea3>FileUploadTemp</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
</font>
</td>
<td> </td>
</tr>
<tr>
<td valign=top bgcolor=#005196>
<font face="lucida console" size=-1>
<font color=white><b><a href=#XML%20%2F%20XSLT><font color=white>XML / XSLT</font></a></b></font>
</font>
</td>
<td> </td>
</tr>
</table>
<hr size=1>
<p>
<p>
<a name=Core></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Core</b></font>
</font>
<p>
<a name=Global></a>
<font face=verdana><font class=title size=-1 color=#555555><b>Global</b></font>
<font face="courier new" size=3><pre>
</pre></font>Global is the nerve center of an Apache::ASP application, in which
the global.asa may reside defining the web application's
event handlers.
<font face="courier new" size=3><pre>
</pre></font>This directory is pushed onto @INC, so you will be able
to "use" and "require" files in this directory, and perl modules
developed for this application may be dropped into this directory,
for easy use.
<font face="courier new" size=3><pre>
</pre></font>Unless StateDir is configured, this directory must be some
writeable directory by the web server. $Session and $Application
object state files will be stored in this directory. If StateDir
is configured, then ignore this paragraph, as it overrides the
Global directory for this purpose.
<font face="courier new" size=3><pre>
</pre></font>Includes, specified with <!--#include file=somefile.inc-->
or $Response->Include() syntax, may also be in this directory,
please see section on includes for more information.
<font face="courier new" size=3><pre>
PerlSetVar Global /tmp
</pre></font>
<p>
<a name=GlobalPackag78b2e61e></a>
<font face=verdana><font class=title size=-1 color=#555555><b>GlobalPackage</b></font>
<font face="courier new" size=3><pre>
</pre></font>Perl package namespace that all scripts, includes, & global.asa
events are compiled into. By default, GlobalPackage is some
obscure name that is uniquely generated from the file path of
the Global directory, and global.asa file. The use of explicitly
naming the GlobalPackage is to allow scripts access to globals
and subs defined in a perl module that is included with commands like:
<font face="courier new" size=3><pre>
in perl script: use Some::Package;
in apache conf: PerlModule Some::Package
PerlSetVar GlobalPackage Some::Package
</pre></font>
<p>
<a name=UniquePackagcf82a357></a>
<font face=verdana><font class=title size=-1 color=#555555><b>UniquePackages</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 0. Set to 1 to compile each script into its own perl package,
so that subroutines defined in one script will not collide with another.
<font face="courier new" size=3><pre>
</pre></font>By default, ASP scripts in a web application are compiled into the
*same* perl package, so these scripts, their includes, and the
global.asa events all share common globals & subroutines defined by each other.
The problem for some developers was that they would at times define a
subroutine of the same name in 2+ scripts, and one subroutine definition would
redefine the other one because of the namespace collision.
<font face="courier new" size=3><pre>
PerlSetVar UniquePackages 0
</pre></font>
<p>
<a name=DynamicInclu7867a61a></a>
<font face=verdana><font class=title size=-1 color=#555555><b>DynamicIncludes</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 0. <a href=ssi.html><font size=-1 face=verdana><b>SSI</b></font></a> file includes are normally inlined in the calling
script, and the text gets compiled with the script as a whole.
With this option set to TRUE, file includes are compiled as a
separate subroutine and called when the script is run.
The advantage of having this turned on is that the code compiled
from the include can be shared between scripts, which keeps the
script sizes smaller in memory, and keeps compile times down.
<font face="courier new" size=3><pre>
PerlSetVar DynamicIncludes 0
</pre></font>
<p>
<a name=IncludesDir></a>
<font face=verdana><font class=title size=-1 color=#555555><b>IncludesDir</b></font>
<font face="courier new" size=3><pre>
</pre></font>no defaults. If set, this directory will also be used to look
for includes when compiling scripts. By default the directory
the script is in, and the Global directory are checked for includes.
<font face="courier new" size=3><pre>
</pre></font>This extension was added so that includes could be easily shared
between ASP applications, whereas placing includes in the Global
directory only allows sharing between scripts in an application.
<font face="courier new" size=3><pre>
PerlSetVar IncludesDir .
</pre></font>Also, multiple includes directories may be set by creating
a directory list separated by a semicolon ';' as in
<font face="courier new" size=3><pre>
PerlSetVar IncludesDir ../shared;/usr/local/asp/shared
</pre></font>Using IncludesDir in this way creates an includes search
path that would look like ., Global, ../shared, /usr/local/asp/shared
The current directory of the executing script is checked first
whenever an include is specified, then the Global directory
in which the global.asa resides, and finally the IncludesDir
setting.</font>
<p>
<a name=NoCache></a>
<font face=verdana><font class=title size=-1 color=#555555><b>NoCache</b></font>
<font face="courier new" size=3><pre>
</pre></font>Default 0, if set to 1 will make it so that neither script nor
include compilations are cached by the server. Using this configuration
will save on memory but will slow down script execution. Please
see the <a href=tuning.html><font size=-1 face=verdana><b>TUNING</b></font></a> section for other strategies on improving site performance.
<font face="courier new" size=3><pre>
PerlSetVar NoCache 0
</pre></font>
<p>
<a name=State%20Managedeff2cd7></a>
<font face=verdana><font class=title size=+0 color=#555555><b>State Management</b></font>
</font>
<p>
<a name=NoState></a>
<font face=verdana><font class=title size=-1 color=#555555><b>NoState</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 0, if true, neither the $Application nor $Session objects will
be created. Use this for a performance increase. Please note that
this setting takes precedence over the AllowSessionState and
AllowApplicationState settings.
<font face="courier new" size=3><pre>
PerlSetVar NoState 0
</pre></font>
<p>
<a name=AllowSession471aaf40></a>
<font face=verdana><font class=title size=-1 color=#555555><b>AllowSessionState</b></font>
<font face="courier new" size=3><pre>
</pre></font>Set to 0 for no session tracking, 1 by default
If Session tracking is turned off, performance improves,
but the $Session object is inaccessible.
<font face="courier new" size=3><pre>
PerlSetVar AllowSessionState 1
</pre></font>Note that if you want to dissallow session creation
for certain non web browser user agents, like search engine
spiders, you can use an init handler like:
<font face="courier new" size=3><pre>
PerlInitHandler "sub { $_[0]->dir_config('AllowSessionState', 0) }"
</pre></font>
<p>
<a name=AllowApplica55cb396b></a>
<font face=verdana><font class=title size=-1 color=#555555><b>AllowApplicationState</b></font>
<font face="courier new" size=3><pre>
</pre></font>Default 1. If you want to leave $Application undefined, then set this
to 0, for a performance increase of around 2-3%. Allowing use of
$Application is less expensive than $Session, as there is more
work for the StateManager associated with $Session garbage collection
so this parameter should be only used for extreme tuning.
<font face="courier new" size=3><pre>
PerlSetVar AllowApplicationState 1
</pre></font>
<p>
<a name=StateDir></a>
<font face=verdana><font class=title size=-1 color=#555555><b>StateDir</b></font>
<font face="courier new" size=3><pre>
</pre></font>default $Global/.state. State files for ASP application go to
this directory. Where the state files go is the most important
determinant in what makes a unique ASP application. Different
configs pointing to the same StateDir are part of the same
ASP application.
<font face="courier new" size=3><pre>
</pre></font>The default has not changed since implementing this config directive.
The reason for this config option is to allow operating systems with caching
file systems like Solaris to specify a state directory separately
from the Global directory, which contains more permanent files.
This way one may point StateDir to /tmp/myaspapp, and make one's ASP
application scream with speed.
<font face="courier new" size=3><pre>
PerlSetVar StateDir ./.state
</pre></font>
<p>
<a name=StateManager></a>
<font face=verdana><font class=title size=-1 color=#555555><b>StateManager</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 10, this number specifies the numbers of times per SessionTimeout
that timed out sessions are garbage collected. The bigger the number,
the slower your system, but the more precise Session_OnEnd's will be
run from global.asa, which occur when a timed out session is cleaned up,
and the better able to withstand Session guessing hacking attempts.
The lower the number, the faster a normal system will run.
<font face="courier new" size=3><pre>
</pre></font>The defaults of 20 minutes for SessionTimeout and 10 times for
StateManager, has dead Sessions being cleaned up every 2 minutes.
<font face="courier new" size=3><pre>
PerlSetVar StateManager 10
</pre></font>
<p>
<a name=StateDB></a>
<font face=verdana><font class=title size=-1 color=#555555><b>StateDB</b></font>
<font face="courier new" size=3><pre>
</pre></font>default SDBM_File, this is the internal database used for state
objects like $Application and $Session. Because an SDBM_File %hash
has a limit on the size of a record key+value pair, usually 1024 bytes,
you may want to use another tied database like DB_File or
MLDBM::Sync::SDBM_File.
<font face="courier new" size=3><pre>
</pre></font>With lightweight $Session and $Application use, you can get
away with SDBM_File, but if you load it up with complex data like
<font face="courier new" size=3><pre> $Session{key} = { # very large complex object }
</pre></font>you might max out the 1024 limit.
<font face="courier new" size=3><pre>
</pre></font>Currently StateDB can be: SDBM_File, MLDBM::Sync::SDBM_File,
DB_File, and GDBM_File. Please let me know if you would like to
add any more to this list.
<font face="courier new" size=3><pre>
</pre></font>As of version .18, you may change this setting in a live production
environment, and new state databases created will be of this format.
With a prior version if you switch to a new StateDB, you would want to
delete the old StateDir, as there will likely be incompatibilities between
the different database formats, including the way garbage collection
is handled.
<font face="courier new" size=3><pre>
PerlSetVar StateDB SDBM_File
</pre></font>
<p>
<a name=StateCache></a>
<font face=verdana><font class=title size=-1 color=#555555><b>StateCache</b></font>
<font face="courier new" size=3><pre>
</pre></font>Deprecated as of 2.23. There is no equivalent config for
the functionality this represented from that version on.
The 2.23 release represented a significant rewrite
of the state management, moving to MLDBM::Sync for its
subsystem.</font>
<p>
<a name=StateSeriali106736b1></a>
<font face=verdana><font class=title size=-1 color=#555555><b>StateSerializer</b></font>
<font face="courier new" size=3><pre>
</pre></font>default Data::Dumper, you may set this to Storable for
faster serialization and storage of data into state objects.
This is particularly useful when storing large objects in
$Session and $Application, as the Storable.pm module has a faster
implementation of freezing and thawing data from and to
perl structures. Note that if you are storing this much
data in your state databases, you may want to use
DB_File since it does not have the default 1024 byte limit
that SDBM_File has on key/value lengths.
<font face="courier new" size=3><pre>
</pre></font>This configuration setting may be changed in production
as the state database's serializer type is stored
in the internal state manager which will always use
Data::Dumper & SDBM_File to store data.
<font face="courier new" size=3><pre>
PerlSetVar StateSerializer Data::Dumper
</pre></font>
<p>
<a name=Sessions></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Sessions</b></font>
</font>
<p>
<a name=CookiePath></a>
<font face=verdana><font class=title size=-1 color=#555555><b>CookiePath</b></font>
<font face="courier new" size=3><pre>
</pre></font>URL root that client responds to by sending the session cookie.
If your asp application falls under the server url "/asp",
then you would set this variable to /asp. This then allows
you to run different applications on the same server, with
different user sessions for each application.
<font face="courier new" size=3><pre>
PerlSetVar CookiePath /
</pre></font>
<p>
<a name=CookieDomain></a>
<font face=verdana><font class=title size=-1 color=#555555><b>CookieDomain</b></font>
<font face="courier new" size=3><pre>
</pre></font>Default 0, this NON-PORTABLE configuration will allow sessions to span
multiple web sites that match the same domain root. This is useful if
your web sites are hosted on the same machine and can share the same
StateDir configuration, and you want to shared the $Session data
across web sites. Whatever this is set to, that will add a
<font face="courier new" size=3><pre>
; domain=$CookieDomain
</pre></font>part to the Set-Cookie: header set for the session-id cookie.
<font face="courier new" size=3><pre>
PerlSetVar CookieDomain .your.global.domain
</pre></font>
<p>
<a name=SessionTimeo21fc354e></a>
<font face=verdana><font class=title size=-1 color=#555555><b>SessionTimeout</b></font>
<font face="courier new" size=3><pre>
</pre></font>Default 20 minutes, when a user's session has been inactive for this
period of time, the Session_OnEnd event is run, if defined, for
that session, and the contents of that session are destroyed.
<font face="courier new" size=3><pre>
PerlSetVar SessionTimeout 20
</pre></font>
<p>
<a name=SecureSessio77114c01></a>
<font face=verdana><font class=title size=-1 color=#555555><b>SecureSession</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 0. Sets the secure tag for the session cookie, so that the cookie
will only be transmitted by the browser under https transmissions.
<font face="courier new" size=3><pre>
PerlSetVar SecureSession 1
</pre></font>
<p>
<a name=HTTPOnlySess63d4d37d></a>
<font face=verdana><font class=title size=-1 color=#555555><b>HTTPOnlySession</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 0. Sets HttpOnly flag to session cookie to mitigate XSS attacks.
Supported by most modern browsers, it only allows access to the
session cookie by the server (ie NOT Javascript)
<font face="courier new" size=3><pre>
PerlSetVar HTTPOnlySession 1
</pre></font>
<p>
<a name=ParanoidSess9085f1d5></a>
<font face=verdana><font class=title size=-1 color=#555555><b>ParanoidSession</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 0. When true, stores the user-agent header of the browser
that creates the session and validates this against the session cookie presented.
If this check fails, the session is killed, with the rationale that
there is a hacking attempt underway.
<font face="courier new" size=3><pre>
</pre></font>This config option was implemented to be a smooth upgrade, as
you can turn it off and on, without disrupting current sessions.
Sessions must be created with this turned on for the security to take effect.
<font face="courier new" size=3><pre>
</pre></font>This config option is to help prevent a brute force cookie search from
being successful. The number of possible cookies is huge, 2^128, thus making such
a hacking attempt VERY unlikely. However, on the off chance that such
an attack is successful, the hacker must also present identical
browser headers to authenticate the session, or the session will be
destroyed. Thus the User-Agent acts as a backup to the real session id.
The IP address of the browser cannot be used, since because of proxies,
IP addresses may change between requests during a session.
<font face="courier new" size=3><pre>
</pre></font>There are a few browsers that will not present a User-Agent header.
These browsers are considered to be browsers of type "Unknown", and
this method works the same way for them.
<font face="courier new" size=3><pre>
site/config.html view on Meta::CPAN
PerlSetVar SessionQueryParseMatch ^https?://localhost
</pre></font>
<p>
<a name=SessionQuery></a>
<font face=verdana><font class=title size=-1 color=#555555><b>SessionQuery</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 0, if set, the session id will be initialized from
the $Request->QueryString if not first found as a cookie.
You can use this setting coupled with the
<font face="courier new" size=3><pre>
$Server->URL($url, \%params)
</pre></font>API extension to generate local URLs with session ids in their
query strings, for efficient cookieless session support.
Note that if a browser has cookies disabled, every URL
to any page that needs access to $Session will need to
be created by this method, unless you are using SessionQueryParse
which will do this for you automatically.
<font face="courier new" size=3><pre>
PerlSetVar SessionQuery 0
</pre></font>
<p>
<a name=SessionQuery3ae841c3></a>
<font face=verdana><font class=title size=-1 color=#555555><b>SessionQueryMatch</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 0, set to a regexp pattern that will match
URLs for $Server->URL() to add a session id to. SessionQuery
normally allows $Server->URL() to add session ids just to
local URLs, so if you use absolute URL references like
<tt>http://localhost/</tt> for your web site, then just like
with SessionQueryParseMatch, you might set this pattern
to ^<tt>http://localhost</tt>
<font face="courier new" size=3><pre>
</pre></font>If this is set, then you don't need to set SessionQuery,
as it will be set automatically.
<font face="courier new" size=3><pre>
PerlSetVar SessionQueryMatch ^<tt>http://localhost</tt>
</pre></font>
<p>
<a name=SessionQuery85863960></a>
<font face=verdana><font class=title size=-1 color=#555555><b>SessionQueryForce</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 0, set to 1 if you want to disallow the use of cookies
for session id passing, and only allow session ids to be passed
on the query string via SessionQuery and SessionQueryParse settings.
<font face="courier new" size=3><pre>
PerlSetVar SessionQueryForce 1
</pre></font>
<p>
<a name=Developer%20Enc3495841></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Developer Environment</b></font>
</font>
<p>
<a name=UseStrict></a>
<font face=verdana><font class=title size=-1 color=#555555><b>UseStrict</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 0, if set to 1, will compile all scripts, global.asa
and includes with "use strict;" inserted at the head of
the file, saving you from the painful process of strictifying
code that was not strict to begin with.
<font face="courier new" size=3><pre>
</pre></font>Because of how essential "use strict" programming is in
a <a href=http://perl.apache.org><font size=-1 face=verdana><b>mod_perl</b></font></a> environment, this default might be set to 1
one day, but this will be up for discussion before that
decision is made.
<font face="courier new" size=3><pre>
</pre></font>Note too that errors triggered by "use strict" are
now captured as part of the normal Apache::ASP error
handling when this configuration is set, otherwise
"use strict" errors will not be handled properly, so
using UseStrict is better than your own "use strict"
statements.
<font face="courier new" size=3><pre>
</pre></font>PerlSetVar UseStrict 1</font>
<p>
<a name=Debug></a>
<font face=verdana><font class=title size=-1 color=#555555><b>Debug</b></font>
<font face="courier new" size=3><pre>
</pre></font>1 for server log debugging, 2 for extra client html output,
3 for microtimes logged. Use 1 for production debugging,
use 2 or 3 for development. Turn off if you are not
debugging. These settings activate $Response->Debug().
<font face="courier new" size=3><pre>
PerlSetVar Debug 2
</pre></font>If Debug 3 is set and Time::HiRes is installed, microtimes
will show up in the log, and also calculate the time
between one $Response->Debug() and another, so good for a
quick benchmark when you glance at the logs.
<font face="courier new" size=3><pre>
PerlSetVar Debug 3
</pre></font>If you would like to enable system level debugging, set
Debug to a negative value. So for system level debugging,
but no output to browser:
<font face="courier new" size=3><pre>
PerlSetVar Debug -1
</pre></font>
<p>
<a name=DebugBufferLb1013c71></a>
<font face=verdana><font class=title size=-1 color=#555555><b>DebugBufferLength</b></font>
<font face="courier new" size=3><pre>
</pre></font>Default 100, set this to the number of bytes of the
buffered output's tail you want to see when an error occurs
and Debug 2 or MailErrorsTo is set, and when
BufferingOn is enabled.
<font face="courier new" size=3><pre>
</pre></font>With buffering the script output will not naturally show
up when the script errors, as it has been buffered by the
$Response object. It helps to see where in the script
output an error halted the script, so the last bytes of
the buffered output are included with the rest of
the debugging information.
<font face="courier new" size=3><pre>
</pre></font>For a demo of this functionality, try the
<a href=eg/syntax_error.asp>./site/eg/syntax_error.asp</a> script, and turn buffering on.</font>
site/config.html view on Meta::CPAN
<font face="courier new" size=3><pre>
PerlSetVar RequestParams 1
</pre></font>
<p>
<a name=RequestBinarc4419e4b></a>
<font face=verdana><font class=title size=-1 color=#555555><b>RequestBinaryRead</b></font>
<font face="courier new" size=3><pre>
</pre></font>Default On, if set to Off will not read POST data into $Request->Form().
<font face="courier new" size=3><pre>
</pre></font>One potential reason for configuring this to Off might be to initialize the Apache::ASP
object in an Apache handler phase earlier than the normal PerlRequestHandler
phase, so that it does not interfere with normal reading of POST data later
in the request.
<font face="courier new" size=3><pre>
PerlSetVar RequestBinaryRead On
</pre></font>
<p>
<a name=StatINC></a>
<font face=verdana><font class=title size=-1 color=#555555><b>StatINC</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 0, if true, reloads perl libraries that have changed
on disk automatically for ASP scripts. If false, the www server
must be restarted for library changes to take effect.
<font face="courier new" size=3><pre>
</pre></font>A known bug is that any functions that are exported, e.g. confess
Carp qw(confess), will not be refreshed by StatINC. To refresh
these, you must restart the www server.
<font face="courier new" size=3><pre>
</pre></font>This setting should be used in development only because it is so slow.
For a production version of StatINC, see StatINCMatch.
<font face="courier new" size=3><pre>
PerlSetVar StatINC 1
</pre></font>
<p>
<a name=StatINCMatch></a>
<font face=verdana><font class=title size=-1 color=#555555><b>StatINCMatch</b></font>
<font face="courier new" size=3><pre>
</pre></font>default undef, if defined, it will be used as a regular expression
to reload modules that match as in StatINC. This is useful because
StatINC has a very high performance penalty in production, so if
you can narrow the modules that are checked for reloading each
script execution to a handful, you will only suffer a mild performance
penalty.
<font face="courier new" size=3><pre>
</pre></font>The StatINCMatch setting should be a regular expression like: Struct|LWP
which would match on reloading Class/Struct.pm, and all the LWP/.*
libraries.
<font face="courier new" size=3><pre>
</pre></font>If you define StatINCMatch, you do not need to define StatINC.
<font face="courier new" size=3><pre>
PerlSetVar StatINCMatch .*
</pre></font>
<p>
<a name=StatScripts></a>
<font face=verdana><font class=title size=-1 color=#555555><b>StatScripts</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 1, if set to 0, changed scripts, global.asa, and includes
will not be reloaded. Coupled with Apache <a href=http://perl.apache.org><font size=-1 face=verdana><b>mod_perl</b></font></a> startup and restart
handlers executing Apache::ASP->Loader() for your application
this allows your application to be frozen, and only reloaded on the
next server restart or stop/start.
<font face="courier new" size=3><pre>
</pre></font>There are a few advantages for not reloading scripts and modules
in production. First there is a slight performance improvement
by not having to stat() the script, its includes and the global.asa
every request.
<font face="courier new" size=3><pre>
</pre></font>From an application deployment standpoint, you
also gain the ability to deploy your application as a
snapshot taken when the server starts and restarts.
This provides you with the reassurance that during a
production server update from development sources, you
do not have to worry with sources being used for the
wrong libraries and such, while they are all being
copied over.
<font face="courier new" size=3><pre>
</pre></font>Finally, though you really should not do this, you can
work on a live production application, with a test server
reloading changes, but your production server does see
the changes until you restart or stop/start it. This
saves your public from syntax errors while you are just
doing a quick bug fix.
<font face="courier new" size=3><pre>
PerlSetVar StatScripts 1
</pre></font>
<p>
<a name=SoftRedirect></a>
<font face=verdana><font class=title size=-1 color=#555555><b>SoftRedirect</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 0, if true, a $Response->Redirect() does not end the
script. Normally, when a Redirect() is called, the script
is ended automatically. SoftRedirect 1, is a standard
way of doing redirects, allowing for html output after the
redirect is specified.
<font face="courier new" size=3><pre>
PerlSetVar SoftRedirect 0
</pre></font>
<p>
<a name=Filter></a>
<font face=verdana><font class=title size=-1 color=#555555><b>Filter</b></font>
<font face="courier new" size=3><pre>
</pre></font>On/Off, default Off. With filtering enabled, you can take advantage of
full server side includes (<a href=ssi.html><font size=-1 face=verdana><b>SSI</b></font></a>), implemented through Apache::SSI.
SSI is implemented through this mechanism by using Apache::Filter.
A sample configuration for full SSI with filtering is in the
<a href=eg/.htaccess>./site/eg/.htaccess</a> file, with a relevant example script <a href=eg/ssi_filter.ssi>./site/eg/ssi_filter.ssi</a>.
<font face="courier new" size=3><pre>
</pre></font>You may only use this option with modperl v1.16 or greater installed
and PERL_STACKED_HANDLERS enabled. Filtering may be used in
conjunction with other handlers that are also "filter aware".
If in doubt, try building your <a href=http://perl.apache.org><font size=-1 face=verdana><b>mod_perl</b></font></a> with
<font face="courier new" size=3><pre>
perl Makefile.PL EVERYTHING=1
</pre></font>With filtering through Apache::SSI, you should expect near a
a 20% performance decrease.
<font face="courier new" size=3><pre>
PerlSetVar Filter Off
</pre></font>
<p>
<a name=CgiHeaders></a>
<font face=verdana><font class=title size=-1 color=#555555><b>CgiHeaders</b></font>
<font face="courier new" size=3><pre>
( run in 1.142 second using v1.01-cache-2.11-cpan-39bf76dae61 )