Apache-ASP
view release on metacpan or search on metacpan
site/config.html view on Meta::CPAN
<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>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#GlobalPackag78b2e61e>GlobalPackage</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#XMLSubsPerlA21dba3d7>XMLSubsPerlArgs</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#UniquePackagcf82a357>UniquePackages</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#XSLT>XSLT</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#DynamicInclu7867a61a>DynamicIncludes</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#XSLTMatch>XSLTMatch</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#IncludesDir>IncludesDir</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#XSLTParser>XSLTParser</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#NoCache>NoCache</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#XSLTCache>XSLTCache</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#XSLTCacheSiz6e7d9101>XSLTCacheSize</a>
</font>
</td>
</tr>
<tr>
<td valign=top bgcolor=#005196>
<font face="lucida console" size=-1>
<font color=white><b><a href=#State%20Managedeff2cd7><font color=white>State Management</font></a></b></font>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#NoState>NoState</a>
</font>
</td>
<td valign=top bgcolor=#005196>
<font face="lucida console" size=-1>
<font color=white><b><a href=#Caching><font color=white>Caching</font></a></b></font>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#AllowSession471aaf40>AllowSessionState</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#CacheDB>CacheDB</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#AllowApplica55cb396b>AllowApplicationState</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#CacheDir>CacheDir</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#StateDir>StateDir</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#CacheSize>CacheSize</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#StateManager>StateManager</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#StateDB>StateDB</a>
</font>
</td>
<td valign=top bgcolor=#005196>
<font face="lucida console" size=-1>
<font color=white><b><a href=#Miscellaneou387baf01><font color=white>Miscellaneous</font></a></b></font>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#StateCache>StateCache</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#AuthServerVaa7584921>AuthServerVariables</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#StateSeriali106736b1>StateSerializer</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#BufferingOn>BufferingOn</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#InodeNames>InodeNames</a>
</font>
</td>
</tr>
<tr>
<td valign=top bgcolor=#005196>
<font face="lucida console" size=-1>
<font color=white><b><a href=#Sessions><font color=white>Sessions</font></a></b></font>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#RequestParam25a784ba>RequestParams</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#CookiePath>CookiePath</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#RequestBinarc4419e4b>RequestBinaryRead</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#CookieDomain>CookieDomain</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#StatINC>StatINC</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#SessionTimeo21fc354e>SessionTimeout</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#StatINCMatch>StatINCMatch</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#SecureSessio77114c01>SecureSession</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#StatScripts>StatScripts</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#HTTPOnlySess63d4d37d>HTTPOnlySession</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#SoftRedirect>SoftRedirect</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#ParanoidSess9085f1d5>ParanoidSession</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Filter>Filter</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#SessionSeria0633b2a7>SessionSerialize</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#CgiHeaders>CgiHeaders</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#SessionCount>SessionCount</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Clean>Clean</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#CompressGzip>CompressGzip</a>
</font>
</td>
</tr>
<tr>
<td valign=top bgcolor=#005196>
<font face="lucida console" size=-1>
<font color=white><b><a href=#Cookieless%20S21cbf4f4><font color=white>Cookieless Sessions</font></a></b></font>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#FormFill>FormFill</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#SessionQuery6920bb61>SessionQueryParse</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#TimeHiRes>TimeHiRes</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#SessionQueryd88d64b8>SessionQueryParseMatch</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#SessionQuery>SessionQuery</a>
</font>
</td>
<td valign=top bgcolor=#005196>
<font face="lucida console" size=-1>
<font color=white><b><a href=#Mail%20Adminis1a4d2b59><font color=white>Mail Administration</font></a></b></font>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#SessionQuery3ae841c3>SessionQueryMatch</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#MailHost>MailHost</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#SessionQuery85863960>SessionQueryForce</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#MailFrom>MailFrom</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#MailErrorsTo>MailErrorsTo</a>
</font>
</td>
</tr>
<tr>
<td valign=top bgcolor=#005196>
<font face="lucida console" size=-1>
<font color=white><b><a href=#Developer%20Enc3495841><font color=white>Developer Environment</font></a></b></font>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#MailAlertTo>MailAlertTo</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#UseStrict>UseStrict</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#MailAlertPer096b67a8>MailAlertPeriod</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Debug>Debug</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#DebugBufferLb1013c71>DebugBufferLength</a>
</font>
</td>
<td valign=top bgcolor=#005196>
<font face="lucida console" size=-1>
<font color=white><b><a href=#File%20Uploads><font color=white>File Uploads</font></a></b></font>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#PodComments>PodComments</a>
</font>
</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>
site/config.html view on Meta::CPAN
PerlSetVar MailHost smtp.yourdomain.com.foobar
</pre></font>
<p>
<a name=MailFrom></a>
<font face=verdana><font class=title size=-1 color=#555555><b>MailFrom</b></font>
<font face="courier new" size=3><pre>
</pre></font>Default NONE, set this to specify the default mail address placed
in the From: mail header for the $Server->Mail() API extension,
as well as MailErrorsTo and MailAlertTo.
<font face="courier new" size=3><pre>
PerlSetVar MailFrom <b>youremail@yourdomain.com.foobar</b>
</pre></font>
<p>
<a name=MailErrorsTo></a>
<font face=verdana><font class=title size=-1 color=#555555><b>MailErrorsTo</b></font>
<font face="courier new" size=3><pre>
</pre></font>No default, if set, ASP server errors, error code 500, that result
while compiling or running scripts under Apache::ASP will automatically
be emailed to the email address set for this config. This allows
an administrator to have a rapid response to user generated server
errors resulting from bugs in production ASP scripts. Other errors, such
as 404 not found will be handled by Apache directly.
<font face="courier new" size=3><pre>
</pre></font>An easy way to see this config in action is to have an ASP script which calls
a die(), which generates an internal ASP 500 server error.
<font face="courier new" size=3><pre>
</pre></font>The Debug config of value 2 and this setting are mutually exclusive,
as Debug 2 is a development setting where errors are displayed in the browser,
and MailErrorsTo is a production setting so that errors are silently logged
and sent via email to the web admin.
<font face="courier new" size=3><pre>
PerlSetVar MailErrorsTo <b>youremail@yourdomain.com</b>
</pre></font>
<p>
<a name=MailAlertTo></a>
<font face=verdana><font class=title size=-1 color=#555555><b>MailAlertTo</b></font>
<font face="courier new" size=3><pre>
</pre></font>The address configured will have an email sent on any ASP server error 500,
and the message will be short enough to fit on a text based pager. This
config setting would be used to give an administrator a heads up that a www
server error occurred, as opposed to MailErrorsTo would be used for debugging
that server error.
<font face="courier new" size=3><pre>
</pre></font>This config does not work when Debug 2 is set, as it is a setting for
use in production only, where Debug 2 is for development use.
<font face="courier new" size=3><pre>
PerlSetVar MailAlertTo <b>youremail@yourdomain.com</b>
</pre></font>
<p>
<a name=MailAlertPer096b67a8></a>
<font face=verdana><font class=title size=-1 color=#555555><b>MailAlertPeriod</b></font>
<font face="courier new" size=3><pre>
</pre></font>Default 20 minutes, this config specifies the time in minutes over
which there may be only one alert email generated by MailAlertTo.
The purpose of MailAlertTo is to give the admin a heads up that there
is an error at the www server. MailErrorsTo is for to aid in speedy
debugging of the incident.
<font face="courier new" size=3><pre>
PerlSetVar MailAlertPeriod 20
</pre></font>
<p>
<a name=File%20Uploads></a>
<font face=verdana><font class=title size=+0 color=#555555><b>File Uploads</b></font>
</font>
<p>
<a name=FileUploadMa625d7c4d></a>
<font face=verdana><font class=title size=-1 color=#555555><b>FileUploadMax</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 0, if set will limit file uploads to this
size in bytes. This is currently implemented by
setting $<a href=cgi.html><font size=-1 face=verdana><b>CGI</b></font></a>::POST_MAX before handling the file
upload. Prior to this, a developer would have to
hardcode a value for $CGI::POST_MAX to get this
to work.
<font face="courier new" size=3><pre>
PerlSetVar 100000
</pre></font>
<p>
<a name=FileUploadTeb83a1ea3></a>
<font face=verdana><font class=title size=-1 color=#555555><b>FileUploadTemp</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 0, if set will leave a temp file on disk during the request,
which may be helpful for processing by other programs, but is also
a security risk in that other users on the operating system could
potentially read this file while the script is running.
<font face="courier new" size=3><pre>
</pre></font>The path to the temp file will be available at
$Request->{FileUpload}{$form_field}{TempFile}.
The regular use of file uploads remains the same
with the <$filehandle> to the upload at
$Request->{Form}{$form_field}. Please see the <a href=cgi.html><font size=-1 face=verdana><b>CGI</b></font></a> section
for more information on file uploads, and the $Request
section in <a href=objects.html><font size=-1 face=verdana><b>OBJECTS</b></font></a>.
<font face="courier new" size=3><pre>
PerlSetVar FileUploadTemp 0
</pre></font>
</font>
</td>
<td bgcolor=white valign=top>
</td>
</tr>
</table>
</td></tr>
</table>
</center>
</body>
</html>
( run in 1.251 second using v1.01-cache-2.11-cpan-39bf76dae61 )