view release on metacpan or search on metacpan
Apache Web Server with Perl scripting only, and enables developing
of dynamic web applications
with session management and embedded Perl code. There are also
many powerful extensions, including XML taglibs, XSLT rendering,
and new events not originally part of the ASP API!
=begin html
<table class="noescape" border="0"><tr><td>
<b>Apache::ASP's features include:</b>
<font face=verdana,helvetica,arial size=-1>
<ul>
<li> Scripting SYNTAX is Natural and Powerful
<li> Rich OBJECTS Developer API
<li> Web Application EVENTS Model
<li> Modular SSI Decomposition, Code Sharing
<li> User SESSIONS, CIFS & NFS Cluster Ready
<li> XML/XSLT Rendering & Custom Tag Technology
<li> CGI Compatibility
<li> PERLSCRIPT Compatibility
<li> Great Open Source SUPPORT
</ul>
</font>
</table>
=end html
This module works under the Apache Web Server
with the mod_perl module enabled. See http://www.apache.org and
http://perl.apache.org for further information.
This is a portable solution, similar to ActiveState's PerlScript
for NT/IIS ASP. Work has been done and will continue to make ports
ASP embedding syntax allows one to embed code in html in 2 simple ways.
The first is the <% xxx %> tag in which xxx is any valid perl code.
The second is <%= xxx %> where xxx is some scalar value that will
be inserted into the html directly. An easy print.
A simple asp page would look like:
<!-- sample here -->
<html>
<body>
For loop incrementing font size: <p>
<% for(1..5) { %>
<!-- iterated html text -->
<font size="<%=$_%>" > Size = <%=$_%> </font> <br>
<% } %>
</body>
</html>
<!-- end sample here -->
Notice that your perl code blocks can span any html. The for loop
above iterates over the html without any special syntax.
=head2 XMLSubs
means first production ready release, this would be the
equivalent of a 1.0 release for other kinds of software.
+ = improvement - = bug fix (d) = documentations
=item $VERSION = 2.63; $DATE="03/14/2018"
+ Added section ``raw'' to MailErrors.inc to debug POSTs without
form fields
- MailErrorsHTML now uses monospaced fonts for errors. Easier on
the eyes and more informative
=item $VERSION = 2.62; $DATE="08/16/2011"
- Fixed 'application/x-www-form-urlencoded' for AJAX POSTs post
Firefox 3.x
+ First sourceforge.net hosted version
+ Incremented version number to actually match SVN branch tag
from standard ASP session id implementation which will automatically
use the session id presented by the browser, now a new session id will
be returned if the presented one is invalid or expired.
-$Application->GetSession will only return a session if
one already existed. It would create one before by default.
+Script_OnFlush global.asa event handler, and $Response->{BinaryRef}
member which is a scalar reference to the content about to be flushed.
See ./site/eg/global.asa for example usage, used in this case to
insert font tags on the fly into the output.
+Highlighting and linking of line error when Debug is set to 2 or -2.
--removed fork() call from flock() backup routine? How did
that get in there? Oh right, testing on Win32. :(
Very painful lesson this one, sorry to whom it may concern.
+$Application->SessionCount support turned off by default
must enable with SessionCount config option. This feature
puts an unnecessary load on busy sites, so not default
+more bullet proof loading of Apache::Symbol, changed the
way Apache::ASP loads modules in general. It used to
check for the module to load every time, if it hadn't loaded
successfully before, but now it just tries once per httpd,
so the web server will have to be restarted to see new installed
modules. This is just for modules that Apache::ASP relies on.
Old modules that are changed or updated with an installation
are still reloaded with the StatINC settings if so configured.
+ASP web site wraps <font face="courier new"> around <pre>
tags now to override the other font used for the text
areas. The spacing was all weird in Netscape before
for <pre> sections.
-Fixed Content-Length calculation when using the Clean
option, so that the length is calculated after the HTML
is clean, not before. This would cause a browser to
hang sometimes.
+Added IncludesDir config option that if set will also be
used to check for includes, so that includes may easily be
$MODULE=Apache::ASP; $VERSION = 2.63; $DATE="2014/05/20"
+ fixed $r->connection()->remote_ip() to use useragent_ip(), then client_ip() access for Apache 2.4
+ Added section ``raw'' to MailErrors.inc to debug POSTs without
form fields
- MailErrorsHTML now uses monospaced fonts for errors. Easier on
the eyes and more informative
- Added a clumsy regex to avoid header longer than 70 chars
- removed deprecated "Extra" module references from Makefile.PL and Bundle::Apache::ASP::Extra,
including Apache::Filter, Apache::SSI, Bundle::XML, XML::Sablotron, and Tie::TextDir
$MODULE=Apache::ASP; $VERSION = 2.62; $DATE="2011/08/16"
- Fixed 'application/x-www-form-urlencoded' for AJAX POSTs post
ASP embedding syntax allows one to embed code in html in 2 simple ways. The
first is the <% xxx %> tag in which xxx is any valid perl code. The second
is <%= xxx %> where xxx is some scalar value that will be inserted into the
html directly. An easy print.
A simple asp page would look like:
<!-- sample here -->
<html>
<body>
For loop incrementing font size: <p>
<% for(1..5) { %>
<!-- iterated html text -->
<font size="<%=$_%>" > Size = <%=$_%> </font> <br>
<% } %>
</body>
</html>
<!-- end sample here -->
Notice that your perl code blocks can span any html. The for loop above
iterates over the html without any special syntax.
XMLSubs
XMLSubs allows a developer to define custom handlers for HTML & XML tags,
more relevant to software development outside the perl community. Where a
.10 perl module usually means first production ready release, this would be
the equivalent of a 1.0 release for other kinds of software.
+ = improvement - = bug fix (d) = documentations
$VERSION = 2.63; $DATE="03/14/2018"
+ Added section ``raw'' to MailErrors.inc to debug POSTs without
form fields
- MailErrorsHTML now uses monospaced fonts for errors. Easier on
the eyes and more informative
$VERSION = 2.62; $DATE="08/16/2011"
- Fixed 'application/x-www-form-urlencoded' for AJAX POSTs post
Firefox 3.x
+ First sourceforge.net hosted version
+ Incremented version number to actually match SVN branch tag
from standard ASP session id implementation which will automatically
use the session id presented by the browser, now a new session id will
be returned if the presented one is invalid or expired.
-$Application->GetSession will only return a session if
one already existed. It would create one before by default.
+Script_OnFlush global.asa event handler, and $Response->{BinaryRef}
member which is a scalar reference to the content about to be flushed.
See ./site/eg/global.asa for example usage, used in this case to
insert font tags on the fly into the output.
+Highlighting and linking of line error when Debug is set to 2 or -2.
--removed fork() call from flock() backup routine? How did
that get in there? Oh right, testing on Win32. :(
Very painful lesson this one, sorry to whom it may concern.
+$Application->SessionCount support turned off by default
must enable with SessionCount config option. This feature
puts an unnecessary load on busy sites, so not default
+more bullet proof loading of Apache::Symbol, changed the
way Apache::ASP loads modules in general. It used to
check for the module to load every time, if it hadn't loaded
successfully before, but now it just tries once per httpd,
so the web server will have to be restarted to see new installed
modules. This is just for modules that Apache::ASP relies on.
Old modules that are changed or updated with an installation
are still reloaded with the StatINC settings if so configured.
+ASP web site wraps <font face="courier new"> around <pre>
tags now to override the other font used for the text
areas. The spacing was all weird in Netscape before
for <pre> sections.
-Fixed Content-Length calculation when using the Clean
option, so that the length is calculated after the HTML
is clean, not before. This would cause a browser to
hang sometimes.
+Added IncludesDir config option that if set will also be
used to check for includes, so that includes may easily be
build/global/box.inc view on Meta::CPAN
<%
my($args, $html) = @_;
$args->{width} ||= '240';
%>
<!-- box.inc -->
<table width=<%= $args->{width } %> bgcolor=<%=$DarkRowColor%> border=1 cellpadding=3 cellspacing=0 >
<% if($args->{title}) { %>
<tr><td align=center><b>
<font size=-1 color=white face=verdana,helvetica,arial>
<nobr><%= $args->{title} %></nobr>
</font></b>
</td></tr>
<% } %>
<tr><td>
<%= $html %>
</td></tr>
</table>
build/global/global.asa view on Meta::CPAN
}
sub pod2html {
my($body, $title, $depth) = @_;
if($title) {
$depth ||= 1;
my $size = 2 - $depth;
$size = ($size > -1) ? "+$size" : $size;
$title = "<font class=title size=$size color=#555555><b>$title</b></font>\n";
}
if (($body =~ /^(.*?)(<(a|table)[^\<\>]*>.*?<\/(\3)>)(.*)$/is)) {
my($pre,$html,$post) = ($1, $2, $5);
# $html =~ s/\s+/ /isg;
$body = $Server->HTMLEncode($pre).$html.$Server->HTMLEncode($post);
} else {
$body = $Server->HTMLEncode($body);
}
$body =~ s/(\<\%|\%\>)/$Server->HTMLEncode($1);/esg;
my @lines = split(/\n/, $body);
my $pre = 0;
my @newlines;
for(@lines) {
my $pre_tag = '';
if(/^\s+[^\s]/ || /^\s*$/) {
if(! $pre) {
# $_ = "<pre>$_";
$pre_tag = "<font face=\"courier new\" size=3><pre>";
$pre = 1;
}
} else {
if($pre) {
# $_ = "</pre>$_";
$pre_tag = "</pre></font>";
$pre = 0;
}
}
# if($pre) {
# $_ =~ s/\s*$//;
# $_ = $Server->HTMLEncode($_);
# }
# }
build/global/global.asa view on Meta::CPAN
$body =~ s|\n\n</pre>|\n</pre>|isg;
# my $match_links = join('|', keys %LINKS);
my %matched;
$body =~ s:([^\n]*?)\b($LINKS_MATCH)(?=[^<])\b:
{
my($head, $match) = ($1, $2);
#print STDERR "***** $head $match\n";
if(! $matched{$match}++ and $head !~ /\>$/ and $head !~ /^\s+/ and $LINKS{$match}) {
"$head<a href=$LINKS{$match}><font size=-1 face=verdana><b>$match<\/b><\/font><\/a>";
} else {
$head.$match;
}
}
:sgex;
'<font face=verdana>'.$title.$body.'</font>';
}
# we use this to mask email addresses in the documentation
sub html_encode_hide {
my $word = shift;
join('',
map{
sprintf(qq(&#%03d;),ord($_))
} split(//, $word)
);
build/global/index_extra.inc view on Meta::CPAN
=pod
<br>
<br>
<center>
<table width=210 bgcolor=<%=$DarkRowColor%> border=1 cellpadding=3 cellspacing=0>
<tr><td align=center><b><font size=-1 color=white face=verdana,helvetica,arial><nobr>WEB SITE PREMIERS</nobr></font></b></td></tr>
<tr><td>
<table bgcolor=white width=100% cellpadding=4 cellspacing=0 border=0>
<tr><td>
</td></tr>
</table>
build/global/top.inc view on Meta::CPAN
for (keys %meta) {
%>
<meta name="<%=$_%>" content="<%=$Server->HTMLEncode($meta{$_})%>">
<%
}
}
%>
<style type="text/css">
<!--
td { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px}
font { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px}
.title { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 16px}
=pod
a:link { font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; color: #003366}
a:visited { font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; color: #003366}
=cut
-->
</style>
</head>
<body bgcolor=black link=<%=$LinkColor%> alink=#ff5599 vlink=<%=$VLinkColor%>
marginheight=0 marginwidth=0 leftMargin=0 topMargin=0>
<center>
<table border=0 cellpadding=0 width=<%=$BodyWidth%> cellspacing=8>
build/global/top.inc view on Meta::CPAN
<% } else { %>
<td align=right></td>
<% } %>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor=<%=$NavColor%> align=center>
<b>
<font color=#ffffff><% Web Applications with Apache & mod_perl %></font>
</b>
</td>
</tr>
</table>
<% my $nav_row_counter = 0; %>
<table border=0 cellpadding=10 cellspacing=0 width=100% bgcolor=<%=$NavColor%>>
<tr>
<td valign=top width=120 bgcolor=<%=$NavColor%>>
build/global/top.inc view on Meta::CPAN
$file = $top->{file};
} else {
($file) = grep($top->{name} eq $FILES{$_}, keys %FILES);
}
$file = "$file.html";
next unless (-e $file);
my $here = ($basename eq $file) ? 1 : 0;
my $link;
if($here) {
$link = "<font color=$VLinkColor>$top->{name}</font>";
} else {
$link = "<a href=\"$file\" style=\"text-decoration:none\"><font color=$LinkColor>$top->{name}</font></a>";
}
# my $nav_row_color = ++$nav_row_counter % 2 ? '#e0f0ff' : 'white';
my $nav_row_color = 'white';
%>
<tr>
<td bgcolor=<%= $nav_row_color %>><font size=-2 face="verdana" color=<%=$VLinkColor%>><b><nobr><%=
$here ? $Server->HTMLEncode("%") : " "
%></nobr></b></font></td>
<td bgcolor=<%= $nav_row_color %> ><font face="verdana,helvetica" size=-1><b><nobr><%=
$link
%></nobr></b></font></td>
</tr>
<%
}
%>
</table>
</td></tr>
</table>
build/global/top.inc view on Meta::CPAN
<a href=http://www.nodeworks.com/partner.htm?partner_id=apacheasp><img src="nodecheck_button.gif" width="88" height="31" alt="NodeWorks Link Checker" border="0"></a>
<% } %>
</center>
</td>
<% # BODY OF DOC %>
<td valign=top bgcolor=white>
<font size=+0 face=verdana,arial>
<%
my @stack;
my @order;
push(@stack, $data);
while(@stack) {
my $data = shift @stack;
unshift(@stack, @{$data->{stack}});
push(@order, $data);
build/global/top.inc view on Meta::CPAN
}
$last_level = $data->{level};
}
push(@links, "<a href=#".$Server->URLEncode($data->{unique}).">$data->{name}</a>");
}
%>
<hr size=1>
<table width=100% border=0 cellpadding=1 cellspacing=3>
<tr>
<td valign=top><font face="lucida console" size=-1>
<%
my $half = int((@links + 1) / 2);
my $index;
my $hilite_first;
unless($links[0]) {
$hilite_first = 1;
shift @links;
}
build/global/top.inc view on Meta::CPAN
# $bgcolor = $NavColor;
# }
if($hilite_first) {
$bgcolor = $NavColor;
}
} elsif(! $links[$index-1]) {
$bgcolor = $NavColor;
}
%>
<td valign=top <%= $bgcolor ? "bgcolor=$bgcolor" : '' %>>
<font face="lucida console" size=-1>
<%
if(($index == 0 and $hilite_first) || ! $links[$index-1]) {
$links[$index] =~ s|\>(.*?)\<|><font color=white>$1</font><|i;
print "<font color=white><b>$links[$index]</b></font>";
} else {
print $links[$index];
}
%>
</font>
</td>
<% } %>
</tr>
<%
}
%>
</table>
<hr size=1>
<p>
<%
build/global/top.inc view on Meta::CPAN
for $data (@order) {
%>
<p>
<a name=<%=$Server->URLEncode($data->{unique})%>></a>
<%=pod2html($data->{body}, $data->{name}, $data->{level})%>
<%
}
%>
</font>
</td>
<td bgcolor=white valign=top>
<%
# EXTRA SECTION NEXT TO BODY ?
my $basename = basename($0);
$basename =~ s/\.\w+$//isg;
my $extra_include = $basename.'_extra.inc';
warn $extra_include;
if($Server->MapInclude($extra_include)) {
my $data = $Response->TrapInclude($extra_include);
$$data =~ s/(<td[^>]*>)/$1<font size=-1 face=verdana,helvetica,arial>/isg;
%>
<%= $$data %>
<%
} else {
print " ";
}
%>
</td>
</tr>
lib/Apache/ASP/Error.pm view on Meta::CPAN
$lineurl = ' -';
} elsif (($lineno == 0)) {
$lineurl = ' -';
} else {
$frag = $self->{Server}->URLEncode($file_context.' '.$lineno);
$lineurl = "<a name=$frag>".sprintf('%3d', $lineno)."</a>";
$lineno++;
}
$frag ||= '';
grep($frag eq $_, @eval_error_lines) &&
($lineurl = "<b><font color=red>$lineurl</font></b>");
unless(&config($self, 'CommandLine')) {
$_ = $self->Escape($_);
}
$out .= "$lineurl: $_\n";
}
$out .= <<OUT;
</pre>
<hr width=30% size=1>\n<font size=-1>
<i>
An error has occured with the Apache::ASP script just run.
If you are the developer working on this script, and cannot work
through this problem, please try researching it at the
<a href=http://www.apache-asp.org/>Apache::ASP web site</a>,
specifically the <a href=http://www.apache-asp.org/faq.html>FAQ section</a>.
Failing that, check out your
<a href=http://www.apache-asp.org/support.html>support options</a>, and
if necessary include this debug output with any query.
site/apps/bookmarks/bookmarks.asp view on Meta::CPAN
<% if(@bookmarks) { %>
Welcome to your bookmarks!
<% } else { %>
You don't have any bookmarks. Please feel free to
add some using the below form.
<% } %>
<center>
<% if($error) { %>
<p><b><font color=red size=-1>* <%=$error%></font></b>
<% } %>
<form src=<%=$Basename%> method=POST>
<table border=0>
<% for ('new_url', 'new_title') {
my $name = $_;
my $title = join(' ',
map { ucfirst $_ } split(/_/, $name));
%>
<tr>
<td><b><%=$title%>:</b></td>
<td><input type=text name=<%=$name%>
value="<%=$Form->{$name}%>"
size=40 maxlength=120>
</td>
</tr>
<% } %>
<tr>
<td> </td>
<td>
<font <%=$FontBase%>>
<input type=submit name=submit
value="Create Bookmark"></td></tr>
</font>
</td>
</form>
</table>
<% if(@bookmarks) {
my $half_index = int((@bookmarks+1)/2);
%>
<p>
<table border=0 width=80% bgcolor=<%= $DarkColor %> cellspacing=0>
<tr><td align=center>
<table border=0 width=100% cellspacing=1 cellpadding=3>
<tr bgcolor=<%= $DarkColor %>><td align=center colspan=4>
<font color=yellow><b>Bookmarks</b></font>
</td></tr>
<% for(my $i=0; $i<$half_index; $i++) { %>
<tr>
<% for($i, $i+$half_index) {
my $data = ($_ < @bookmarks) ?
$bookmarks[$_] : undef;
$data->{title} ||= $data->{'url'};
my $text = $data->{bookmark_id} ?
"<a href=$data->{'url'}
>$data->{'title'}</a>"
: " ";
%>
<td bgcolor=#c0c0c0 width=30 align=center>
<% if($data->{bookmark_id}) { %>
<font size=-1><tt>
<a href=<%=
"$Basename?delete=$data->{bookmark_id}"
%>>[DEL]</a>
</tt></font>
<% } else { %>
<% } %>
</td>
<td bgcolor=white><%= $text || ' '%></td>
<% } %>
</tr>
<% } %>
</table>
site/apps/bookmarks/footer.inc view on Meta::CPAN
</font>
</table>
<table border=0 width=100% cellpadding=5>
<tr>
<td bgcolor=yellow align=center>
<font <%=$FontBase%> size=-1 color=<%= $DarkColor %>>
<b>
My-NotExists-Bookmarks
Cool Technologies Etc., ???, © <%= (localtime())[5] + 1900 %>
</b>
</font>
</td>
</tr>
</table>
</body>
</html>
site/apps/bookmarks/header.inc view on Meta::CPAN
<html>
<head><title><%=$Title%></title></head>
<body bgcolor=white link=purple alink=yellow vlink=gray>
<form src=<%=$Basename%> method=POST>
<table border=0 width=100% cellpadding=5 cellspacing=0>
<tr bgcolor=<%= $DarkColor %>>
<td>
<b><font <%=$FontBase%> size=+1 color=yellow>
<%=$Title%>
<% if($Session->{user}) { %>
for <%= $Session->{user} %>
<% } %>
</font></b>
</td>
<td align=right>
<font <%=$FontBase%>>
<% if($Session->{'user'}) { %>
<input type=submit name=logout value=Logout>
<% } else { %>
<% } %>
</font>
</td>
</tr>
</form>
</table>
<table border=0 cellpadding=5 width=100% ><tr><td valign=top>
<font <%=$FontBase%> size=+0>
site/apps/bookmarks/index.asp view on Meta::CPAN
$Response->Redirect('bookmarks.asp');
}
}
$user ||= $Session->{user};
%>
Hello, and welcome to the MyBookmarks Apache::ASP demo application.
To begin your bookmark experience, please login now:
<center>
<% if($error) { %>
<p><b><font color=red size=-1>* <%=$error%></font></b>
<% } %>
<form src=<%=$Basename%> method=POST>
<input type=text name=user value="<%=$Server->HTMLEncode($user)%>">
<input type=submit value=Login>
</form>
</center>
This demo makes use of the Apache::ASP objects, especially
<tt>$Session</tt> and <tt>$Response</tt>, modularizes html
via SSI file includes, and uses the <tt>Script_OnStart</tt>
site/apps/search/index.asp view on Meta::CPAN
<b>Matches:</b>
<tt>
<%= join(", ", map { "$_: $matches->{$_}" } keys %$matches) %>
</tt>
<p>
<%
} else {
print "No matches found for your search.";
}
print "<font size=-1>\n";
my $count = 0;
my $final_match = join('|', @final);
for my $file (reverse sort { $files->{$a} <=> $files->{$b} } keys %$files) {
my $score = $files->{$file};
$Response->Debug("listing ranked $file");
my $file_data = $SDB{"FILE:$file"};
my($title,$summary) = ($file_data->{'title'}, $file_data->{summary});
# $Response->Debug($file_data);
unless($title || $summary) {
$Response->Debug("no data for $file");
site/apps/search/index.asp view on Meta::CPAN
<nobr><i>( Score: <%= $score %> )</i></nobr>
<br>
<%= $summary_match %>
<br>
<p>
<%
;
$Response->Flush;
}
%>
</font>
<!--#include file=footer.inc-->
site/articles/perlmonth1_intro.html view on Meta::CPAN
<h2>Introduction to Apache::ASP</h2>
<h3>By: Joshua Chamas</h3>
<i>published in PerlMonth.com in 1999</i>
<p>
I was first drawn to Active Server Pages (ASP) as a web development
platform a couple years ago when researching how to best develop the
<font size=-1><a href=http://www.nodeworks.com>NODEWORKS</a></font> web site. I needed
something maintainable, powerful, fast, portable, and of course perl.
<p>
Microsoft had developed the ASP standard as the end all to web
application development, which promised to be maintainable, powerful,
and fast. But support for perl under PerlScript was shoddy, VBScript,
ASP's native tongue, seemed a pathetic alternative, and an NT/IIS solution lacks a certain
portability. Thus I was led to developing <a href=http://www.apache-asp.org>Apache::ASP</a>,
which runs under Doug MacEachern's <a href=http://perl.apache.org>mod_perl</a>
for <a href=http://www.apache.org>Apache</a>.
site/articles/perlmonth2_build.html view on Meta::CPAN
<h3>Implementation</h3>
We start by configuring <tt>.htaccess</tt> file
of a directory in apache to allow Apache::ASP
to run <tt>.asp</tt> files, and testing the configuration
with a <tt>dummy.asp</tt> file.
<p>
<center>
<table border=0 cellspacing=0 width=90% >
<tr bgcolor=gray><td><font color=white><b># .htaccess</b></td></tr>
<tr bgcolor=#c0c0c0><td><pre>
<tt>DirectoryIndex index.asp
<Files ~ \.asp$>
SetHandler perl-script
PerlHandler Apache::ASP
PerlSetVar Global .
PerlSetVar GlobalPackage My::Bookmarks
PerlSetVar StateDir /tmp/asp_apps_bookmarks
PerlSetVar Debug 2
PerlSetVar SessionTimeout 15
site/articles/perlmonth2_build.html view on Meta::CPAN
PerlSetVar AllowSessionState 1
</Files></tt></pre></td></tr>
</table>
</center>
<p>
<p>
<center>
<table border=0 cellspacing=0 width=90% >
<tr bgcolor=gray><td><font color=white><b># dummy.asp</b></td></tr>
<tr bgcolor=#c0c0c0><td><pre>
<tt>INTRO <%=$Session%></tt></pre></td></tr>
</table>
</center>
<p>
If the index.asp works on your server, and just prints
<tt>INTRO Apache::ASP::Session=HASH(0x??????)</tt>,
then we know Apache::ASP is working and $Sessions are
site/articles/perlmonth2_build.html view on Meta::CPAN
relevant globals used by the scripts.
<p>
Notice that each script can process its own <tt>Logout</tt>
request, which was a decision made after the design
because it seemed good to make the first script, <tt>index.asp</tt>,
<tt>$Session</tt> aware.
<p>
<center>
<table border=0 cellspacing=0 width=90% >
<tr bgcolor=gray><td><font color=white><b># global.asa</b></td></tr>
<tr bgcolor=#c0c0c0><td><pre>
<tt>use File::Basename;
use DBI;
use DBD::CSV;
use vars qw( $DarkColor $Name %Titles $FontBase $Db $Title $Basename $Form $Query );
$DarkColor = '#0000aa';
$Name = "MyBookmarks";
%Titles = (
site/articles/perlmonth2_build.html view on Meta::CPAN
One problem with <tt>HTML</tt> is that it requires you to specify
the unique titles of the document before the standard
body style for your site, so we cheated this and
created the per page titles already in the <tt>Script_OnStart</tt>
of the <tt>global.asa</tt>.
<p>
<center>
<table border=0 cellspacing=0 width=90% >
<tr bgcolor=gray><td><font color=white><b># header.inc</b></td></tr>
<tr bgcolor=#c0c0c0><td><pre>
<tt><html>
<head><title><%=$Title%></title></head>
<body bgcolor=white link=purple alink=yellow vlink=gray>
<form src=<%=$Basename%> method=POST>
<table border=0 width=100% cellpadding=5 cellspacing=0>
<tr bgcolor=<%= $DarkColor %>>
<td>
<b><font <%=$FontBase%> size=+1 color=yellow>
<%=$Title%>
<% if($Session->{user}) { %>
for <%= $Session->{user} %>
<% } %>
</font></b>
</td>
<td align=right>
<font <%=$FontBase%>>
<% if($Session->{'user'}) { %>
<input type=submit name=logout value=Logout>
<% } else { %>
&nbsp;
<% } %>
</font>
</td>
</tr>
</form>
</table>
<table border=0 cellpadding=5 width=100% ><tr><td valign=top>
<font <%=$FontBase%> size=+0></tt></pre></td></tr>
</table>
</center>
<p>
<p>
<center>
<table border=0 cellspacing=0 width=90% >
<tr bgcolor=gray><td><font color=white><b># footer.inc</b></td></tr>
<tr bgcolor=#c0c0c0><td><pre>
<tt></font>
</table>
<table border=0 width=100% cellpadding=5>
<tr>
<td bgcolor=yellow align=center>
<font <%=$FontBase%> size=-1 color=<%= $DarkColor %>>
<b>
My-NotExists-Bookmarks
Cool Technologies Etc., ???, &copy; <%= (localtime())[5] + 1900 %>
</b>
</font>
</td>
</tr>
</table>
</body>
</html></tt></pre></td></tr>
</table>
</center>
<p>
site/articles/perlmonth2_build.html view on Meta::CPAN
Doing the intro page should now be fairly easy. We
will handle the login at the intro page, and redirect
to the viewer upon success. We keep the login
processing perl code at the top so we don't print
out any <tt>HTML</tt> before the redirect is handled.
<p>
<center>
<table border=0 cellspacing=0 width=90% >
<tr bgcolor=gray><td><font color=white><b># index.asp</b></td></tr>
<tr bgcolor=#c0c0c0><td><pre>
<tt><%
# process user login
my $error;
my $user = $Form->{'user'};
if(defined $user) {
$user =~ /^\w+$/ or $error =
"Your username must made of only letter and numbers";
length($user) > 3 or $error =
"Your username much be at least 4 character long";
site/articles/perlmonth2_build.html view on Meta::CPAN
$Response->Redirect('bookmarks.asp');
}
}
$user ||= $Session->{user};
%>
Hello, and welcome to the MyBookmarks Apache::ASP demo application.
To begin your bookmark experience, please login now:
<center>
<% if($error) { %>
<p><b><font color=red size=-1>* <%=$error%></font></b>
<% } %>
<form src=<%=$Basename%> method=POST>
<input type=text name=user value="<%=$Server->HTMLEncode($user)%>">
<input type=submit value=Login>
</form>
</center>
This demo makes use of the Apache::ASP objects, especially
<tt>$Session</tt> and <tt>$Response</tt>, modularizes html
via SSI file includes, and uses the <tt>Script_OnStart</tt>
site/articles/perlmonth2_build.html view on Meta::CPAN
The final script for the site is the <tt>bookmarks.asp</tt>
script, which is the most complex of the bunch. This
script is in charge of viewing, adding, and deleting
the user bookmarks. In order to do the bookmark
modifications, the script processes its own form input.
<p>
<center>
<table border=0 cellspacing=0 width=90% >
<tr bgcolor=gray><td><font color=white><b># bookmarks.asp</b></td></tr>
<tr bgcolor=#c0c0c0><td><pre>
<tt><%
# only a logged in user may view the bookmarks
$Session->{'user'} || $Response->Redirect('index.asp');
my $error;
if($Form->{submit} =~ /create/i) {
unless($Form->{new_url}) {
$error = "The Url must be ".
"filled in to create a new bookmark";
site/articles/perlmonth2_build.html view on Meta::CPAN
<% if(@bookmarks) { %>
Welcome to your bookmarks!
<% } else { %>
You don't have any bookmarks. Please feel free to
add some using the below form.
<% } %>
<center>
<% if($error) { %>
<p><b><font color=red size=-1>* <%=$error%></font></b>
<% } %>
<form src=<%=$Basename%> method=POST>
<table border=0>
<% for ('new_url', 'new_title') {
my $name = $_;
my $title = join(' ',
map { ucfirst $_ } split(/_/, $name));
%>
<tr>
<td><b><%=$title%>:</b></td>
<td><input type=text name=<%=$name%>
value="<%=$Form->{$name}%>"
size=40 maxlength=120>
</td>
</tr>
<% } %>
<tr>
<td>&nbsp;</td>
<td>
<font <%=$FontBase%>>
<input type=submit name=submit
value="Create Bookmark"></td></tr>
</font>
</td>
</form>
</table>
<% if(@bookmarks) {
my $half_index = int((@bookmarks+1)/2);
%>
<p>
<table border=0 width=80% bgcolor=<%= $DarkColor %> cellspacing=0>
<tr><td align=center>
<table border=0 width=100% cellspacing=1 cellpadding=3>
<tr bgcolor=<%= $DarkColor %>><td align=center colspan=4>
<font color=yellow><b>Bookmarks</b></font>
</td></tr>
<% for(my $i=0; $i<$half_index; $i++) { %>
<tr>
<% for($i, $i+$half_index) {
my $data = ($_ < @bookmarks) ?
$bookmarks[$_] : undef;
$data->{title} ||= $data->{'url'};
my $text = $data->{bookmark_id} ?
"<a href=$data->{'url'}
>$data->{'title'}</a>"
: "&nbsp;";
%>
<td bgcolor=#c0c0c0 width=30 align=center>
<% if($data->{bookmark_id}) { %>
<font size=-1><tt>
<a href=<%=
"$Basename?delete=$data->{bookmark_id}"
%>>[DEL]</a>
</tt></font>
<% } else { %>
&nbsp;
<% } %>
</td>
<td bgcolor=white><%= $text || '&nbsp;'%></td>
<% } %>
</tr>
<% } %>
</table>
site/articles/perlmonth3_tune.html view on Meta::CPAN
Last month, we used Apache::ASP to build a simple
<a href=http://www.apache-asp.org/apps/bookmarks/>MyBookmarks</a>
web application. Now we are going to tune the
<a href=http://www.apache-asp.org/>Apache::ASP</a> web application and
<a href=http://www.apache.org>Apache</a> web server, taking a mild mannered
web app running at <tt>250,000</tt> pages per day, and boosting it up 4 times
to a <tt>1,000,000</tt> pages per day powerhouse.
<p>
Are you ready? <font size=+1>Let's Tune!</font>
<p>
<h3>Methodology</h3>
The application was taken as it was built last week,
and incrementally benchmarked, changing one configuration
setting at a time, and showing the performance changes
below. The URL tested is the main URL of the application,
<a href=http://www.apache-asp.org/apps/bookmarks/index.asp
>.../bookmarks/index.asp</a>.
<p>
site/articles/perlmonth3_tune.html view on Meta::CPAN
<tr>
<td bgcolor=pink>StateDir</td>
<td bgcolor=pink>.state</td>
<td bgcolor=pink>/tmp/bookmarks</td>
</tr>
<tr bgcolor=white>
<td><b>Comments</b></td>
<td><font size=-1>Disk i/o activity takes 50% of the time, because the StateDir is pointed at a non-caching file system.</font></td>
<td><font size=-1>Disk i/o activity is nearly 0%, with roughly 75% of the time spent in the user space, and 25% in the kernel</font></td>
</tr>
<tr bgcolor=white>
<td><b>Legend</b></td>
<td colspan=2>
<font size=-2 face=verdana>
Configuration items
that start with AP are Apache configuration options, the
rest are Apache::ASP. The
.htaccess one means that configurations are stored in the .htaccess
if yes, if no in a configuration file. The configuration changes
between benchmarks are highlighted in <font color=pink><b>pink</b></font>.
</font>
</td></tr>
</table>
<p>
</center>
More straightforward is turning off debugging.
The Apache::ASP code has been streamlined for production
when debugging is turned off, and there is a significant
penalty for leaving it on, as well as a bunch of clutter
in your error_log.
site/articles/perlmonth3_tune.html view on Meta::CPAN
<tr>
<td bgcolor=#c0c0c0>StateDir</td>
<td bgcolor=#c0c0c0>/tmp/bookmarks</td>
<td bgcolor=#c0c0c0>/tmp/bookmarks</td>
</tr>
<tr bgcolor=white>
<td><b>Comments</b></td>
<td><font size=-1>Disk i/o activity is nearly 0%, with roughly 75% of the time spent in the user space, and 25% in the kernel</font></td>
<td><font size=-1></font></td>
</tr>
<tr bgcolor=white>
<td><b>Legend</b></td>
<td colspan=2>
<font size=-2 face=verdana>
Configuration items
that start with AP are Apache configuration options, the
rest are Apache::ASP. The
.htaccess one means that configurations are stored in the .htaccess
if yes, if no in a configuration file. The configuration changes
between benchmarks are highlighted in <font color=pink><b>pink</b></font>.
</font>
</td></tr>
</table>
<p>
</center>
Those were the two big basic tunes for Apache::ASP.
Let's now go to the Apache web server. So far, our
configuration information has been stored in a .htaccess
file, which must be reparsed every request by Apache.
So, we move the configuration information into one of
site/articles/perlmonth3_tune.html view on Meta::CPAN
<tr>
<td bgcolor=#c0c0c0>StateDir</td>
<td bgcolor=#c0c0c0>/tmp/bookmarks</td>
<td bgcolor=#c0c0c0>/tmp/bookmarks</td>
</tr>
<tr bgcolor=white>
<td><b>Comments</b></td>
<td><font size=-1></font></td>
<td><font size=-1>Couldn't believe my eyes when I saw there to be so little difference when not using .htaccess. My guess is that the Apache people optimized this at some point.</font></td>
</tr>
<tr bgcolor=white>
<td><b>Legend</b></td>
<td colspan=2>
<font size=-2 face=verdana>
Configuration items
that start with AP are Apache configuration options, the
rest are Apache::ASP. The
.htaccess one means that configurations are stored in the .htaccess
if yes, if no in a configuration file. The configuration changes
between benchmarks are highlighted in <font color=pink><b>pink</b></font>.
</font>
</td></tr>
</table>
<p>
</center>
The MaxRequestsPerChild is commonly overlooked in
web server setup. What this does is control the
number of requests that a child httpd server may
serve before exiting, and the parent reforking
another one. With mod_perl library loading
site/articles/perlmonth3_tune.html view on Meta::CPAN
<tr>
<td bgcolor=#c0c0c0>StateDir</td>
<td bgcolor=#c0c0c0>/tmp/bookmarks</td>
<td bgcolor=#c0c0c0>/tmp/bookmarks</td>
</tr>
<tr bgcolor=white>
<td><b>Comments</b></td>
<td><font size=-1>Couldn't believe my eyes when I saw there to be so little difference when not using .htaccess. My guess is that the Apache people optimized this at some point.</font></td>
<td><font size=-1>This bench only had 684 requests, so there was no parent httpd forking during this time, whereas before there may have been reforking every few seconds during the 30 second bench.</font></td>
</tr>
<tr bgcolor=white>
<td><b>Legend</b></td>
<td colspan=2>
<font size=-2 face=verdana>
Configuration items
that start with AP are Apache configuration options, the
rest are Apache::ASP. The
.htaccess one means that configurations are stored in the .htaccess
if yes, if no in a configuration file. The configuration changes
between benchmarks are highlighted in <font color=pink><b>pink</b></font>.
</font>
</td></tr>
</table>
<p>
</center>
Back to Apache::ASP, and some finer tuning. By
default SessionSerialize is 0, and we are going
to turn it on. What this does is lock $Session
for exclusive use during the course of the script
being run, so that any reads or writes to $Session
site/articles/perlmonth3_tune.html view on Meta::CPAN
<tr>
<td bgcolor=#c0c0c0>StateDir</td>
<td bgcolor=#c0c0c0>/tmp/bookmarks</td>
<td bgcolor=#c0c0c0>/tmp/bookmarks</td>
</tr>
<tr bgcolor=white>
<td><b>Comments</b></td>
<td><font size=-1>This bench only had 684 requests, so there was no parent httpd forking during this time, whereas before there may have been reforking every few seconds during the 30 second bench.</font></td>
<td><font size=-1></font></td>
</tr>
<tr bgcolor=white>
<td><b>Legend</b></td>
<td colspan=2>
<font size=-2 face=verdana>
Configuration items
that start with AP are Apache configuration options, the
rest are Apache::ASP. The
.htaccess one means that configurations are stored in the .htaccess
if yes, if no in a configuration file. The configuration changes
between benchmarks are highlighted in <font color=pink><b>pink</b></font>.
</font>
</td></tr>
</table>
<p>
</center>
site/articles/perlmonth3_tune.html view on Meta::CPAN
<tr>
<td bgcolor=pink>StateDir</td>
<td bgcolor=pink>.state</td>
<td bgcolor=pink>/tmp/bookmarks</td>
</tr>
<tr bgcolor=white>
<td><b>Comments</b></td>
<td><font size=-1>Disk i/o activity takes 50% of the time, because the StateDir is pointed at a non-caching file system.</font></td>
<td><font size=-1></font></td>
</tr>
<tr bgcolor=white>
<td><b>Legend</b></td>
<td colspan=2>
<font size=-2 face=verdana>
Configuration items
that start with AP are Apache configuration options, the
rest are Apache::ASP. The
.htaccess one means that configurations are stored in the .htaccess
if yes, if no in a configuration file. The configuration changes
between benchmarks are highlighted in <font color=pink><b>pink</b></font>.
</font>
</td></tr>
</table>
<p>
</center>
For more information on Apache::ASP tuning, see the
<a href=http://www.apache-asp.org/tuning.html>tuning docs online</a>.
</body>
</html>
site/cgi.html view on Meta::CPAN
<html>
<head>
<title>Apache::ASP::Cgi</title>
<style type="text/css">
<!--
td { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px}
font { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px}
.title { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 16px}
-->
</style>
</head>
<body bgcolor=black link=#063678 alink=#ff5599 vlink=#993399
marginheight=0 marginwidth=0 leftMargin=0 topMargin=0>
site/cgi.html view on Meta::CPAN
<td align=right></td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor=#005196 align=center>
<b>
<font color=#ffffff><% Web Applications with Apache & mod_perl %></font>
</b>
</td>
</tr>
</table>
<table border=0 cellpadding=10 cellspacing=0 width=100% bgcolor=#005196>
<tr>
<td valign=top width=120 bgcolor=#005196>
<table cellpadding=5 cellspacing=0 border=1 bgcolor=white><tr><td>
<table border=0 cellpadding=0 cellspacing=0 width=105 bgcolor=white>
<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="index.html" style="text-decoration:none"><font color=#063678>INTRO</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="install.html" style="text-decoration:none"><font color=#063678>INSTALL</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="config.html" style="text-decoration:none"><font color=#063678>CONFIG</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="syntax.html" style="text-decoration:none"><font color=#063678>SYNTAX</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="events.html" style="text-decoration:none"><font color=#063678>EVENTS</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="objects.html" style="text-decoration:none"><font color=#063678>OBJECTS</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="ssi.html" style="text-decoration:none"><font color=#063678>SSI</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="sessions.html" style="text-decoration:none"><font color=#063678>SESSIONS</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="xml.html" style="text-decoration:none"><font color=#063678>XML/XSLT</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><font color=#993399>CGI</font></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="perlscript.html" style="text-decoration:none"><font color=#063678>PERLSCRIPT</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="style.html" style="text-decoration:none"><font color=#063678>STYLE GUIDE</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="faq.html" style="text-decoration:none"><font color=#063678>FAQ</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="tuning.html" style="text-decoration:none"><font color=#063678>TUNING</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="kudos.html" style="text-decoration:none"><font color=#063678>CREDITS</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="support.html" style="text-decoration:none"><font color=#063678>SUPPORT</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="sites.html" style="text-decoration:none"><font color=#063678>SITES USING</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="testimonials.html" style="text-decoration:none"><font color=#063678>TESTIMONIALS</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="resources.html" style="text-decoration:none"><font color=#063678>RESOURCES</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="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>
site/cgi.html view on Meta::CPAN
<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>CGI</b></font>
<font face="courier new" size=3><pre>
</pre></font>CGI has been the standard way of deploying web applications long before
ASP came along. In the CGI gateway world, CGI.pm has been a widely
used module in building CGI applications, and Apache::ASP is compatible
with scripts written with CGI.pm. Also, as of version 2.19, Apache::ASP
can run in standalone CGI mode for the Apache web server without
<a href=http://perl.apache.org><font size=-1 face=verdana><b>mod_perl</b></font></a> being available. See "Standalone CGI Mode" section below.
<font face="courier new" size=3><pre>
</pre></font>Following are some special notes with respect to compatibility with CGI
and CGI.pm. Use of CGI.pm in any of these ways was made possible through
a great amount of work, and is not guaranteed to be portable with other perl
ASP implementations, as other ASP implementations will likely be more limited.</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 >
<font face="lucida console" size=-1>
<a href=#Standalone%20Cbddd74cc>Standalone CGI Mode, without mod_perl</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#CGI%20headers>CGI headers</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#CGI.pm>CGI.pm</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#print%28%29ing%20C99232b52>print()ing CGI</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Query%20Object4fef5875>Query Object Initialization</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#File%20Upload>File Upload</a>
</font>
</td>
</tr>
</table>
<hr size=1>
<p>
<p>
<a name=Standalone%20Cbddd74cc></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Standalone CGI Mode, without mod_perl</b></font>
<font face="courier new" size=3><pre>
</pre></font>As of version 2.19, Apache::ASP scripts may be run as standalone
<a href=cgi.html><font size=-1 face=verdana><b>CGI</b></font></a> scripts without mod_perl being loaded into Apache. Work
to date has only been done with mod_cgi scripts under Apache on a
Unix platform, and it is unlikely to work under other web servers
or Win32 operating systems without further development.
<font face="courier new" size=3><pre>
</pre></font>To run the ./site/eg scripts as CGI scripts, you copy the
./site directory to some location accessible by your web
server, in this example its /usr/local/apache/htdocs/aspcgi,
then in your httpd.conf activate Apache::ASP cgi
scripts like so:
<font face="courier new" size=3><pre>
Alias /aspcgi/ /usr/local/apache/htdocs/aspcgi/
<Directory /usr/local/apache/htdocs/aspcgi/eg/ >
AddType application/x-httpd-cgi .htm
AddType application/x-httpd-cgi .html
AddType application/x-httpd-cgi .asp
AddType application/x-httpd-cgi .xml
AddType application/x-httpd-cgi .ssi
AllowOverride None
Options +ExecCGI +Indexes
</Directory>
</pre></font>Then install the asp-perl script from the distribution
into /usr/bin, or some other directory. This is
so the CGI execution line at the top of those scripts
will invoke the asp-perl wrapper like so:
<font face="courier new" size=3><pre>
#!/usr/bin/perl /usr/bin/asp-perl
</pre></font>The asp-perl script is a cgi wrapper that sets up the
Apache::ASP environment in lieu of the normal mod_perl
handler request. Because there is no Apache->dir_config()
data available under mod_cgi, the asp-perl script will load
a asp.conf file that may define a hash %Config of
data for populating the dir_config() data. An example
of a complex asp.conf file is at <a href=eg/asp.conf>./site/eg/asp.conf</a>
<font face="courier new" size=3><pre>
</pre></font>So, a trivial asp.conf file might look like:
<font face="courier new" size=3><pre>
# asp.conf
%Config = (
'Global' => '.',
'StateDir' => '/tmp/aspstate',
'NoState' => 0,
'Debug' => 3,
);
</pre></font>The default for NoState is 1 in CGI mode, so one must
set NoState to 0 for objects like $Session & $Application
to be defined.</font>
<p>
<a name=CGI.pm></a>
<font face=verdana><font class=title size=+0 color=#555555><b>CGI.pm</b></font>
<font face="courier new" size=3><pre>
</pre></font>CGI.pm is a very useful module that aids developers in
the building of these applications, and Apache::ASP has been made to
be compatible with function calls in CGI.pm. Please see cgi.htm in the
./site/eg directory for a sample ASP script written almost entirely in <a href=cgi.html><font size=-1 face=verdana><b>CGI</b></font></a>.
<font face="courier new" size=3><pre>
</pre></font>As of version 0.09, use of CGI.pm for both input and output is seamless
when working under Apache::ASP. Thus if you would like to port existing
cgi scripts over to Apache::ASP, all you need to do is wrap <% %> around
the script to get going. This functionality has been implemented so that
developers may have the best of both worlds when building their
web applications.
<font face="courier new" size=3><pre>
</pre></font>For more information about CGI.pm, please see the web site
<font face="courier new" size=3><pre>
<a href=http://search.cpan.org/dist/CGI/>http://search.cpan.org/dist/CGI/</a>
</pre></font>
<p>
<a name=Query%20Object4fef5875></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Query Object Initialization</b></font>
<font face="courier new" size=3><pre>
</pre></font>You may create a <a href=http://stein.cshl.org/WWW/software/CGI/cgi_docs.html><font size=-1 face=verdana><b>CGI.pm</b></font></a> $query object like so:
<font face="courier new" size=3><pre>
use CGI;
my $query = new CGI;
</pre></font>As of Apache::ASP version 0.09, form input may be read in
by CGI.pm upon initialization. Before, Apache::ASP would
consume the form input when reading into $Request->Form(),
but now form input is cached, and may be used by CGI.pm input
routines.</font>
<p>
<a name=CGI%20headers></a>
<font face=verdana><font class=title size=+0 color=#555555><b>CGI headers</b></font>
<font face="courier new" size=3><pre>
</pre></font>Not only can you use the <a href=http://stein.cshl.org/WWW/software/CGI/cgi_docs.html><font size=-1 face=verdana><b>CGI.pm</b></font></a> $query->header() method
to put out headers, but with the CgiHeaders config option
set to true, you can also print "Header: value\n", and add
similar lines to the top of your script, like:
<font face="courier new" size=3><pre>
Some-Header: Value
Some-Other: OtherValue
<html><body> Script body starts here.
</pre></font>Once there are no longer any cgi style headers, or the
there is a newline, the body of the script begins. So
if you just had an asp script like:
<font face="courier new" size=3><pre>
print join(":", %{$Request->QueryString});
</pre></font>You would likely end up with no output, as that line is
interpreted as a header because of the semicolon. When doing
basic debugging, as long as you start the page with <html>
you will avoid this problem.</font>
<p>
<a name=print%28%29ing%20C99232b52></a>
<font face=verdana><font class=title size=+0 color=#555555><b>print()ing CGI</b></font>
<font face="courier new" size=3><pre>
</pre></font>CGI is notorious for its print() statements, and the functions in CGI.pm
usually return strings to print(). You can do this under Apache::ASP,
since print just aliases to $Response->Write(). Note that $| has no
affect.
<font face="courier new" size=3><pre>
print $query->header();
print $query->start_form();
</pre></font>
<p>
<a name=File%20Upload></a>
<font face=verdana><font class=title size=+0 color=#555555><b>File Upload</b></font>
<font face="courier new" size=3><pre>
</pre></font>CGI.pm is used for implementing reading the input from file upload. You
may create the file upload form however you wish, and then the
data may be recovered from the file upload by using $Request->Form().
Data from a file upload gets written to a file handle, that may in
turn be read from. The original file name that was uploaded is the
name of the file handle.
<font face="courier new" size=3><pre>
my $filehandle = $Request->Form('file_upload_field_name');
print $filehandle; # will get you the file name
my $data;
while(read($filehandle, $data, 1024)) {
# data from the uploaded file read into $data
};
</pre></font>Please see the docs on CGI.pm (try perldoc CGI) for more information
on this topic, and <a href=eg/file_upload.asp>./site/eg/file_upload.asp</a> for an example of its use.
Also, for more details about CGI.pm itself, please see the web site:
<font face="courier new" size=3><pre>
<a href=http://search.cpan.org/dist/CGI/>http://search.cpan.org/dist/CGI/</a>
</pre></font>Occasionally, a newer version of CGI.pm will be released which breaks
file upload compatibility with Apache::ASP. If you find this to occur,
then you might consider downgrading to a version that works. For example,
one can install a working CGI.pm v2.78 for a working version, and to
get old versions of this module, one can go to BACKPAN at:
<font face="courier new" size=3><pre>
<a href=http://backpan.cpan.org/modules/by-authors/id/L/LD/LDS/>http://backpan.cpan.org/modules/by-authors/id/L/LD/LDS/</a>
</pre></font>There is also $Request->FileUpload() API extension that you can use to get
more data about a file upload, so that the following properties are
available for querying:
<font face="courier new" size=3><pre>
my $file_upload = $Request->{FileUpload}{upload_field};
$file_upload->{BrowserFile}
$file_upload->{FileHandle}
$file_upload->{ContentType}
# only if FileUploadTemp is set
$file_upload->{TempFile}
# whatever mime headers are sent with the file upload
# just "keys %$file_upload" to find out
$file_upload->{?Mime-Header?}
</pre></font>Please see the $Request section in <a href=objects.html><font size=-1 face=verdana><b>OBJECTS</b></font></a> for more information.</font>
</font>
</td>
<td bgcolor=white valign=top>
</td>
</tr>
</table>
</td></tr>
site/changes.html view on Meta::CPAN
<html>
<head>
<title>Apache::ASP::Changes</title>
<style type="text/css">
<!--
td { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px}
font { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px}
.title { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 16px}
-->
</style>
</head>
<body bgcolor=black link=#063678 alink=#ff5599 vlink=#993399
marginheight=0 marginwidth=0 leftMargin=0 topMargin=0>
site/changes.html view on Meta::CPAN
<td align=right></td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor=#005196 align=center>
<b>
<font color=#ffffff><% Web Applications with Apache & mod_perl %></font>
</b>
</td>
</tr>
</table>
<table border=0 cellpadding=10 cellspacing=0 width=100% bgcolor=#005196>
<tr>
<td valign=top width=120 bgcolor=#005196>
<table cellpadding=5 cellspacing=0 border=1 bgcolor=white><tr><td>
<table border=0 cellpadding=0 cellspacing=0 width=105 bgcolor=white>
<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="index.html" style="text-decoration:none"><font color=#063678>INTRO</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="install.html" style="text-decoration:none"><font color=#063678>INSTALL</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="config.html" style="text-decoration:none"><font color=#063678>CONFIG</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="syntax.html" style="text-decoration:none"><font color=#063678>SYNTAX</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="events.html" style="text-decoration:none"><font color=#063678>EVENTS</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="objects.html" style="text-decoration:none"><font color=#063678>OBJECTS</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="ssi.html" style="text-decoration:none"><font color=#063678>SSI</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="sessions.html" style="text-decoration:none"><font color=#063678>SESSIONS</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="xml.html" style="text-decoration:none"><font color=#063678>XML/XSLT</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="cgi.html" style="text-decoration:none"><font color=#063678>CGI</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="perlscript.html" style="text-decoration:none"><font color=#063678>PERLSCRIPT</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="style.html" style="text-decoration:none"><font color=#063678>STYLE GUIDE</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="faq.html" style="text-decoration:none"><font color=#063678>FAQ</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="tuning.html" style="text-decoration:none"><font color=#063678>TUNING</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="kudos.html" style="text-decoration:none"><font color=#063678>CREDITS</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="support.html" style="text-decoration:none"><font color=#063678>SUPPORT</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="sites.html" style="text-decoration:none"><font color=#063678>SITES USING</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="testimonials.html" style="text-decoration:none"><font color=#063678>TESTIMONIALS</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="resources.html" style="text-decoration:none"><font color=#063678>RESOURCES</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="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><font color=#993399>CHANGES</font></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>
site/changes.html view on Meta::CPAN
<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>CHANGES</b></font>
<font face="courier new" size=3><pre>
</pre></font>Apache::ASP has been in development since 1998, and
was production ready since its .02 release. Releases
are always used in a production setting before being
made publically available.
<font face="courier new" size=3><pre>
</pre></font>In July 2000, the version numbers of releases went
from .19 to 1.9 which is more relevant to software development
outside the perl community. Where a .10 perl module usually
means first production ready release, this would be the
equivalent of a 1.0 release for other kinds of software.
<font face="courier new" size=3><pre>
+ = improvement - = bug fix (d) = documentations
</pre></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 >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%2024b1e08d7>$VERSION = 2.63; $DATE="03/14/2018"</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%202023e855d>$VERSION = 2.09; $DATE="01/30/2001";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%20239066cad>$VERSION = 2.62; $DATE="08/16/2011"</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%2021002eb7e>$VERSION = 2.07; $DATE="11/26/2000";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%202c3b7fac7>$VERSION = 2.61; $DATE="05/24/2008"</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%202909e81ef>$VERSION = 2.03; $DATE="08/01/2000";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%2021803a342>$VERSION = 2.59; $DATE="05/23/2005"</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%202727b0736>$VERSION = 2.01; $DATE="07/22/2000";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%2022aa8a3f0>$VERSION = 2.57; $DATE="01/29/2004"</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%202784583b1>$VERSION = 2.00; $DATE="07/15/2000";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%202d9674a90>$VERSION = 2.55; $DATE="08/09/2003"</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%2010d78b35d>$VERSION = 1.95; $DATE="07/10/2000";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%2022c8082fb>$VERSION = 2.53; $DATE="04/10/2003"</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%201b231718a>$VERSION = 1.93; $DATE="07/03/2000";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%2025b84bf7e>$VERSION = 2.51; $DATE="02/10/2003"</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%2010d8c7b1b>$VERSION = 1.91; $DATE="07/02/2000";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%202eaeef6e0>$VERSION = 2.49; $DATE="11/10/2002"</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%200f0c93549>$VERSION = 0.19; $DATE="NOT RELEASED";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%202a705193b>$VERSION = 2.47; $DATE="11/06/2002"</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%2004a1da04f>$VERSION = 0.18; $DATE="02/03/2000";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%20204276936>$VERSION = 2.45; $DATE="10/13/2002"</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%200792d4e8d>$VERSION = 0.17; $DATE="11/15/99";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%2022337f806>$VERSION = 2.41; $DATE="09/29/2002"</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%2003dd1597d>$VERSION = 0.16; $DATE="09/22/99";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%20252d85c29>$VERSION = 2.39; $DATE="09/10/2002"</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%200a2fa9027>$VERSION = 0.15; $DATE="08/24/1999";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%202c1fa6b38>$VERSION = 2.37; $DATE="07/03/2002"</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%200b667e0c4>$VERSION = 0.14; $DATE="07/29/1999";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%202af464d94>$VERSION = 2.35; $DATE="05/30/2002"</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%200fcc7c76f>$VERSION = 0.12; $DATE="07/01/1999";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%20276381ac3>$VERSION = 2.33; $DATE="04/29/2002"</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%200bd024b52>$VERSION = 0.11; $DATE="06/24/1999";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%202a77480eb>$VERSION = 2.31; $DATE="01/22/2002";</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%200c7f99fbe>$VERSION = 0.10; $DATE="05/24/1999";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%202be948898>$VERSION = 2.29; $DATE="11/19/2001";</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%2005ee189f2>$VERSION = 0.09; $DATE="04/22/1999";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%20211fd057b>$VERSION = 2.27; $DATE="10/31/2001";</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%200ea85a09a>$VERSION = 0.08; $DATE="02/06/1999";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%20276d7fe30>$VERSION = 2.25; $DATE="10/11/2001";</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%2003960e08a>$VERSION = 0.07; $DATE="01/20/1999";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%2024674da9c>$VERSION = 2.23; $DATE="10/11/2001";</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%200394bbc7f>$VERSION = 0.06; $DATE="12/21/1998";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%202c37caa32>$VERSION = 2.21; $DATE="8/5/2001";</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%2003a5fe2db>$VERSION = 0.05; $DATE="10/19/1998";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%2029e6581ab>$VERSION = 2.19; $DATE="7/10/2001";</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%2009ffce1f9>$VERSION = 0.04; $DATE="10/14/1998";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%20282c9e25e>$VERSION = 2.17; $DATE="6/17/2001";</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%200ec664faf>$VERSION = 0.03; $DATE="09/14/1998";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%202d4094038>$VERSION = 2.15; $DATE="06/12/2001";</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%20055b248f9>$VERSION = 0.02; $DATE="07/12/1998";</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%2023614edca>$VERSION = 2.11; $DATE="05/29/2001";</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#%24VERSION%20%3D%2009faee67f>$VERSION = 0.01; $DATE="06/26/1998";</a>
</font>
</td>
</tr>
</table>
<hr size=1>
<p>
<p>
<a name=%24VERSION%20%3D%2024b1e08d7></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.63; $DATE="03/14/2018"</b></font>
<font face="courier new" size=3><pre>
+ Added section ``raw'' to MailErrors.inc to debug POSTs without
form fields
- MailErrorsHTML now uses monospaced fonts for errors. Easier on
the eyes and more informative
</pre></font>
<p>
<a name=%24VERSION%20%3D%20239066cad></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.62; $DATE="08/16/2011"</b></font>
<font face="courier new" size=3><pre>
- Fixed 'application/x-www-form-urlencoded' for AJAX POSTs post
Firefox 3.x
+ First sourceforge.net hosted version
+ Incremented version number to actually match SVN branch tag
</pre></font>
<p>
<a name=%24VERSION%20%3D%202c3b7fac7></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.61; $DATE="05/24/2008"</b></font>
<font face="courier new" size=3><pre>
- updated for more recent mod_perl 2 environment to trigger correct loading of modules
+ loads modules in a backwards compatible way for older versions of mod_perl 1.99_07 to 1.99_09
+ license changes from GPL to Perl Artistic License
</pre></font>
<p>
<a name=%24VERSION%20%3D%2021803a342></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.59; $DATE="05/23/2005"</b></font>
<font face="courier new" size=3><pre>
+ added "use bytes" to Response object to calculate Content-Length
correctly for UTF8 data, which should require therefore at least
perl version 5.6 installed
+ updated to work with latest mod_perl 2.0 module naming convention,
thanks to Randy Kobes for patch
+ examples now exclude usage of Apache::Filter & Apache::SSI under mod_perl 2.0
</pre></font>
<p>
<a name=%24VERSION%20%3D%2022aa8a3f0></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.57; $DATE="01/29/2004"</b></font>
<font face="courier new" size=3><pre>
- $Server->Transfer will update $0 correctly
- return 0 for mod_perl handler to work with latest mod_perl 2 release
when we were returning 200 ( HTTP_OK ) before
- fixed bug in $Server->URL when called like $Server->URL($url)
without parameters. Its not clear which perl versions this bug
affected.
</pre></font>
<p>
<a name=%24VERSION%20%3D%202d9674a90></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.55; $DATE="08/09/2003"</b></font>
<font face="courier new" size=3><pre>
- Bug fixes for running on standalone CGI mode on Win32 submitted
by Francesco Pasqualini
+ Added Apache::ASP::Request::BINMODE for binmode() being
called on STDIN after STDIN is tied to $Request object
+ New RequestBinaryRead configuration created, may be turned off
to prevent $Request object from reading POST data
++ mod_perl 2 optmizations, there was a large code impact on this,
site/changes.html view on Meta::CPAN
no longer used
+ preloaded CGI for file uploads in the mod_perl environment
- When XSLT config is set, $Response->Redirect() should work now
Thanks to Marcus Zoller for pointing problem out
+ Added CookieDomain setting, documented, and added test to cover
it in t/cookies.t . Setting suggested by Uwe Riehm, who nicely
submitted some code for this.
</pre></font>
<p>
<a name=%24VERSION%20%3D%2022c8082fb></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.53; $DATE="04/10/2003"</b></font>
<font face="courier new" size=3><pre>
+ XMLSubs tags with "-" in them will have "-" replaced with "_" or underscore, so a
tag like <my:render-table /> will be translated to &my::render_table() ... tags with
- in them are common in extended XML syntaxes, but perl subs cannot have - in them only.
+ Clean setting now works on output when $Response->{ContentType} begins with text/html;
like "text/html; charset=iso-8859-2" ... before Clean would only work on output marked
with ContentType text/html. Thanks to Szymon Juraszczyk for recommending fix.
--Fixed a bug which would cause Session_OnEnd to be called twice on sessions in a certain case,
particularly when an old expired session gets reused by and web browser... this bug was
site/changes.html view on Meta::CPAN
is that these script will have a performance penalty having to be
recompiled each invocation, but this will kill many closure caching
bugs that are hard to detect.
- $Request->FileUpload('upload_file', 'BrowserFile') would return
a glob before that would be the file name in scalar form. However
this would be interpreted as a reference incorrectly. The fix
is to make sure this is always a scalar by stringifying
this data internally. Thanks to Richard Curtis for pointing
out this bug.
</pre></font>
<p>
<a name=%24VERSION%20%3D%2025b84bf7e></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.51; $DATE="02/10/2003"</b></font>
<font face="courier new" size=3><pre>
+ added t/session_query_parse.t test to cover use of SessionQueryParse
and $Server->URL APIs
- Fixed duplicate "&" bug associated with using $Server->URL
and SessionQueryParse together
+ Patch to allow $Server->URL() to be called multiple times on the same URL
as in $Server->URL($Server->URL($url, \%params), \%more_params)
(d) Added new testimonials & sites & created a separate testimonials page.
site/changes.html view on Meta::CPAN
+ bypass meta data check like expires for XSLT Cache() API use
because XSLT tranformations don't expire, saves hit to cache dbm
for meta data
+ use of direct Apache::ASP::State methods like FETCH/STORE
in Cache() layer so we don't have to go through slower tied interface.
This will speed up XSLT & and include output caching mostly.
+ minor optimizations for speed & memory usage
</pre></font>
<p>
<a name=%24VERSION%20%3D%202eaeef6e0></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.49; $DATE="11/10/2002"</b></font>
<font face="courier new" size=3><pre>
-- bug introduced in 2.47 cached script compilations for executing
scripts ( not includes ) of the same name in different directories
for the same Global/GlobalPackage config for an application.
Fix was to remove optimization that caused problem, and
created test case t/same_name.t to cover bug.
</pre></font>
<p>
<a name=%24VERSION%20%3D%202a705193b></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.47; $DATE="11/06/2002"</b></font>
<font face="courier new" size=3><pre>
++ Runtime speed enhancements for 15-20% improvement including:
+ INTERNAL API ReadFile() now returns scalar ref as memory optimization
+ cache InodeNames config setting in ASP object now for common lookups
+ removed CompileChecksum() INTERNAL API, since it was an unnecesary
method decomposition along a common code path
+ removed IsChanged() INTERNAL API since compiling of scripts
is now handled by CompileInclude() which does this functionality already
+ removed unnecessary decomp of IncludesChanged() INTERNAL API, which was along
critical code path
+ do not call INTERNAL SearchDirs() API when compiling base script
site/changes.html view on Meta::CPAN
+ For new XMLSubs ASP type <%= %> argument interpolation
activated with XMLSubsPerlArgs 0, <% %> will no longer work,
just <%= %>, as in
<my:tag value="some value <%= $value %> more data" />
This feature is still experimental, and its interface may change.
However it is slated for the 3.0 release as default method,
so feedback is appreciated.
</pre></font>
<p>
<a name=%24VERSION%20%3D%20204276936></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.45; $DATE="10/13/2002"</b></font>
<font face="courier new" size=3><pre>
++New XMLSubsPerlArgs config, default 1, indicates how
XMLSubs arguments have always been parsed. If set to 0,
will enable new XMLSubs args that are more ASP like with
<%= %> for dynamic interpolation, such as:
<my:xmlsub arg="<%= $data %>" arg2="text <%= $data2 %>" />
Settings XMLSubsPerlArgs to 0 is experimental for now, but
will become the default by Apache::ASP version 3.0
site/changes.html view on Meta::CPAN
the cache. Before, because a list was always returned,
$rv would have been equal to the number of items returned,
even if the return value list has just one element.
(d) added site/robots.txt file with just a comment for
search engine indexing
-fixed <a href=eg/binary_write.htm>./site/eg/binary_write.htm</a> to not use
$Response->{ContentLength} because it does not exist.
Fixed it to use $Response->AddHeader now instead
</pre></font>
<p>
<a name=%24VERSION%20%3D%2022337f806></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.41; $DATE="09/29/2002"</b></font>
<font face="courier new" size=3><pre>
-Removed CVS Revision tag from Apache::ASP::Date, which
was causing bad revision numbers in CPAN after CVS integration
of Apache::ASP
+removed cgi/asp link to ../asp-perl from distribution. This
link was for the deprecated asp script which is now asp-perl
</pre></font>
<p>
<a name=%24VERSION%20%3D%20252d85c29></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.39; $DATE="09/10/2002"</b></font>
<font face="courier new" size=3><pre>
-Turn off $^W explicitly before reloading global.asa. Reloading
global.asa when $^W is set will trigger subroutine redefinition
warnings. Reloading global.asa should occur without any problems
under normal usage of the system, thus this work around.
This fix is important to UseStrict functionality because warnings
automatically become thrown as die() errors with UseStrict enabled,
so we have to disable normal soft warnings here.
-$Response->Include() runtime errors now throw a die() that
can be trapped. This was old functionality that has been restored.
Other compile time errors should still trigger a hard error
like script compilation, global.asa, or $Response->Include()
without an eval()
+Some better error handling with Debug 3 or -3 set, cleaned
up developer errors messages somewhat.
</pre></font>
<p>
<a name=%24VERSION%20%3D%202c1fa6b38></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.37; $DATE="07/03/2002"</b></font>
<font face="courier new" size=3><pre>
-Fixed the testing directory structures for t/long_names.t
so that tar software like Archive::Tar & Solaris tar that
have problems with long file names will still be able
to untar distribution successfully. Now t/long_names.t
generates its testing directory structures at runtime.
-Fixes for "make test" to work under perl 5.8.0 RC2,
courtesy of Manabu Higashida
+SessionQueryForce setting created for disabling use of cookies
site/changes.html view on Meta::CPAN
-Trying to fix t/server_mail.t to work better for platforms
that it should skip testing on. Updated t/server.t test case.
+Remove exit() from Makefile.PL so CPAN.pm's automatic
follow prereq mechanism works correctly. Thanks to Slaven Rezic
for pointing this out.
+Added Apache::compat loading in mod_perl environment for better
mod_perl 2.0 support.
</pre></font>
<p>
<a name=%24VERSION%20%3D%202af464d94></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.35; $DATE="05/30/2002"</b></font>
<font face="courier new" size=3><pre>
+Destroy better $Server & $Response objects so that my
closure references to these to not attempt to work in the future
against invalid internal data. There was enough data left in these
old objects to make debugging the my closure problem confusing, where
it looked like the ASP object state became invalid.
+Added system debug diagnostics to inspect StateManager group cleanup
(d) Documentation update about flock() work around for
Win95/Win98/WinMe systems, confirmed by Rex Arul
(d) Documentation/site build bug found by Mitsunobu Ozato,
where <% %> not being escaped correctly with $Server->HTMLEncode().
New japanese documentation project started by him
at <a href=http://sourceforge.jp/projects/apache-asp-jp/>http://sourceforge.jp/projects/apache-asp-jp/</a>
-InitPackageGlobals() called after new Apache::ASP object created so
core system templates can be compiled even when there was a runtime
compilation error of user templates. Bug fix needed pointed out by
Eamon Daly
</pre></font>
<p>
<a name=%24VERSION%20%3D%20276381ac3></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.33; $DATE="04/29/2002"</b></font>
<font face="courier new" size=3><pre>
- fixed up t/server_mail.t test to skip if a sendmail server
is not available on localhost. We only want the test to run
if there is a server to test against.
+ removed cgi/asp script, just a symlink now to the ./asp-perl script
which in this way deprecates it. I had it hard linked, but the
distribution did not untar very well on win32 platform.
+ Reordered the modules in Bundle::Apache::ASP for a cleaner install.
site/changes.html view on Meta::CPAN
specifically a config like
PerlSetVar (aaa|bbb):\w+
should now work. Thanks for bug report from David Kulp.
+ Added an early srand() for better $ServerID creation
+ Work around for DSO problems where $r is not always correctly
defined in Apache::ASP::handler(). Thanks to Tom Lear for patch.
</pre></font>
<p>
<a name=%24VERSION%20%3D%202a77480eb></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.31; $DATE="01/22/2002";</b></font>
<font face="courier new" size=3><pre>
+ $Server->MapInclude() API extension created to wrap up Apache::ASP::SearchDirs
functionality so one may do an conditional check for an include existence befor
executing $Response->Include(). Added API test to server.t
+ $Server->Transfer() now allows arguments like $Response->Include(), and now acts just
as a wrapper for:
$Response->Include($file, @args);
$Response->End();
site/changes.html view on Meta::CPAN
for these headers: Content-Type, Cache-Control, Expires. This is to avoid
both the application & Apache::ASP sending out duplicate headers. Added
test cases for this to t/response.t
+ split up Bundle::Apache::ASP into that, and Bundle::Apache::ASP::Extra
the former with just the required modules to run, and the latter
for extra functionality in Apache::ASP
+ new $Request->{Method} member to return $r->method of GET or POST that
client browser is requesting, added t/request.t sub test to cover this member.
</pre></font>
<p>
<a name=%24VERSION%20%3D%202be948898></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.29; $DATE="11/19/2001";</b></font>
<font face="courier new" size=3><pre>
+Added some extra help text to the ./cgi/asp --help message
to clarify how to pass arguments to a script from the command line.
+When using $Server->Mail() API, if Content-Type header is set,
and MIME-Version is not, then a "MIME-Version: 1.0" header will be sent
for the email. This is correct according to RFC 1521 which specifies
for the first time the Content-Type: header for email documents.
Thanks to Philip Mak for pointing out this correct behavior.
+Made dependent on MLDBM::Sync version .25 to pass the taint_check.t test
site/changes.html view on Meta::CPAN
--Under certain circumstances with file upload, it seems that IsClientConnected()
would return an aborted client value from $r->connection->aborted, so
the buffer output data would not be flushed to the client, and
the HTML page would return to the browser empty. This would be under
normal file upload use. One work-around was to make sure to initialize
the $Request object before $Response->IsClientConnected is called,
then $r->connection->aborted returns the right value.
This problem was probably introduced with IsClientConnected() code changes
starting in the 2.25 release.
</pre></font>
<p>
<a name=%24VERSION%20%3D%20211fd057b></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.27; $DATE="10/31/2001";</b></font>
<font face="courier new" size=3><pre>
+ Wrapped call to $r->connection->fileno in eval {} so to
preserve backwards compatibility with older mod_perl versions
that do not have this method defined. Thanks to Helmut Zeilinger
for catching this.
+ removed ./dev directory from distribution, useless clutter
+ Removed dependency on HTTP::Date by taking code into
Apache::ASP as Apache::ASP::Date. This relieves
the dependency of Apache::ASP on libwww LWP libraries.
site/changes.html view on Meta::CPAN
from recent development.
+ Tie::TextDir .04 and above is supported for StateDB
and CacheDB settings with MLDBM::Sync .21. This is good for
CacheDB where output is larger and there are not many
versions to cache, like for XSLTCache, where the site is
mostly static.
+ Better RESOURCES section to web site, especially with adding
some links to past Apache::ASP articles & presentations.
</pre></font>
<p>
<a name=%24VERSION%20%3D%20276d7fe30></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.25; $DATE="10/11/2001";</b></font>
<font face="courier new" size=3><pre>
+ Improved ./site/apps/search application, for better
search results at Apache::ASP site. Also, reengineered
application better, with more perl code moved to global.asa.
Make use of MLDBM::Sync::SDBM_File, where search database
before was engineering around SDBM_File's shortcomings.
- Fix for SessionSerialize config, which broke in 2.23
Also, added t/session_serialize.t to test suite to catch
this problem in the future.
</pre></font>
<p>
<a name=%24VERSION%20%3D%2024674da9c></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.23; $DATE="10/11/2001";</b></font>
<font face="courier new" size=3><pre>
+Make sure a couple other small standard modules get loaded
upon "PerlModule Apache::ASP", like Time::HiRes, Class::Struct,
and MLDBM::Serializer::Data::Dumper. If not available
these modules won't cause errors, but will promote child httpd
RAM sharing if they are.
-XMLSubs args parsing fix so an arg like z-index
does not error under UseStrict. This is OK now:
<my:layer z-index=3 top=0 left=0> HTML </my:layer>
site/changes.html view on Meta::CPAN
for production & development use when the system has
very many modules.
-Cookieless session support with configs like SessionQueryParse
and SessionQuery now work for URLs with frags in them
like <tt>http://localhost?arg=value#frag</tt>
+@rv = $Response->Include() now works where there are
multiple return values from an include like:
<% return(1,2); %>
</pre></font>
<p>
<a name=%24VERSION%20%3D%202c37caa32></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.21; $DATE="8/5/2001";</b></font>
<font face="courier new" size=3><pre>
+Documented RequestParams config in CONFIG misc section.
+Documented new XSLT caching directives.
+Updated <a href=eg/.htaccess>./site/eg/.htaccess</a> XSLT example config
to use XSLTCache setting.
+New FAQ section on why perl variables are sticky globals,
suggested by Mark Seger.
site/changes.html view on Meta::CPAN
can be leveraged later for output caching of includes,
or arbitrary user caching.
-t/server_mail.t test now uses valid email for testing
purposes ... doesn't actually send a mail, but for SMTP
runtime validation purposes it should be OK.
+fixed where POST data was read from under MOD_PERL,
harmless bug this was that just generated the wrong
system debugging message.
</pre></font>
<p>
<a name=%24VERSION%20%3D%2029e6581ab></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.19; $DATE="7/10/2001";</b></font>
<font face="courier new" size=3><pre>
+update docs in various parts
+added ./make_httpd/build_httpds.sh scripts for quick builds
of apache + mod_perl + mod_ssl
++plain CGI mode available for ASP execution.
cgi/asp script can now be used to execute ASP
scripts in CGI mode. See CGI perldoc section for more info.
The examples in ./site/eg have been set up to run
in cgi mode if desired. Configuration in CGI section
site/changes.html view on Meta::CPAN
not only when system debugging is set with Debug -1,-2,-3
However, a Debug param passed to $Server->Mail() will
sucessfully override the Debug -1,-2,-3 setting even
when its Debug => 0
-Check for undef values during stats for inline includes
so we don't trigger unintialized warnings
+Documented ';' may separate many directories in the IncludesDir
setting for creating a more flexible includes search path.
</pre></font>
<p>
<a name=%24VERSION%20%3D%20282c9e25e></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.17; $DATE="6/17/2001";</b></font>
<font face="courier new" size=3><pre>
+Added ASP perl mmm-mode subclass and configuration
in editors/mmm-asp-perl.el file for better emacs support.
Updated SYNTAX/Editors documentation.
+Better debugging error message for Debug 2 or 3 settings
for global.asa errors. Limit debug output for lines
preceding rendered script.
-In old inline include mode, there should no longer
be the error "need id for includes" when using
site/changes.html view on Meta::CPAN
enabled, this problem would not have likely occured
anyway. DynamicIncludes are preferrable to use so
that compiled includes can be shared between scripts.
This bug was likely introduced in version 2.11.
-Removed logging from $Response->BinaryWrite() in regular
debug mode 1 or 2. Logging still enabled in system Debug mode, -1 or -2
-Removed other extra system debugging call that is really not
necessary.
</pre></font>
<p>
<a name=%24VERSION%20%3D%202d4094038></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.15; $DATE="06/12/2001";</b></font>
<font face="courier new" size=3><pre>
-Fix for running under perl 5.6.1 by removing parser optimization
introduced in 2.11.
-Now file upload forms, forms with ENCTYPE="multipart/form-data"
can have multiple check boxes and select items marked for
@params = $Request->Form('param_name') functionality. This
will be demonstrated via the <a href=eg/file_upload.asp>./site/eg/file_upload.asp</a> example.
</pre></font>
<p>
<a name=%24VERSION%20%3D%2023614edca></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.11; $DATE="05/29/2001";</b></font>
<font face="courier new" size=3><pre>
+Parser optimization from Dariusz Pietrzak
-work around for global destruction error message for perl 5.6
during install
+$Response->{IsClientConnected} now will be set
correctly with ! $r->connection->aborted after each
$Response->Flush()
+New XSLTParser config which can be set to XML::XSLT or
site/changes.html view on Meta::CPAN
helps with inline includes. Lots of work here, & integrated
with Debug 2 runtime pretty print debugging.
+$Response->{Debug} member toggles on/off whether
$Response->Debug() is active, overriding the Debug setting
for this purpose. Documented.
-When Filter is on, Content-Length won't be set and compression
won't be used. These things would not work with a filtering
handler after Apache::ASP
</pre></font>
<p>
<a name=%24VERSION%20%3D%202023e855d></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.09; $DATE="01/30/2001";</b></font>
<font face="courier new" size=3><pre>
+Examples in ./site/eg are now UseStrict friendly.
Also fixed up <a href=eg/ssi_filter.ssi>./site/eg/ssi_filter.ssi</a> example.
+Auto purge of old stale session group directories, increasing
session manager performance when using Sessions when migrating
to Apache::ASP 2.09+ from older versions.
+SessionQueryParse now works for all $Response->{ContentType}
starting with 'text' ... before just worked with text/html,
now other text formats like wml will work too.
site/changes.html view on Meta::CPAN
-Renamed Apache::ASP::Loader class to Apache::ASP::Load
as it collided with the Apache::ASP->Loader() function
namespace. Class used internally by Apache::ASP->Loader()
so no public API changed here.
+-Read of POST input for $Request->BinaryRead() even
if its not from a form. Only set up $Request->Form
if this is from a form POST.
+faster POST/GET param parsing
</pre></font>
<p>
<a name=%24VERSION%20%3D%2021002eb7e></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.07; $DATE="11/26/2000";</b></font>
<font face="courier new" size=3><pre>
-+-+ Session Manager
empty state group directories are not removed, thus alleviating
one potential race condition. This impacted performance
on idle sites severely as there were now 256 directories
to check, so made many performance enhancements to the
session manager. The session manager is built to handle
up to 20,000 client sessions over a 20 minute period. It
will slow the system down as it approaches this capacity.
One such enhancement was session-ids now being 11 bytes long
site/changes.html view on Meta::CPAN
Call without arguments to rely on perl's decent rand
seeding. Then when calling rand() in Secret() we have
enough random data, that even if someone else calls srand()
to something fixed, should not mess things up terribly since
we checksum things like $$ & time, as well as perl memory
references.
+XMLSubs installation make test.
-Fix for multiline arguments for XMLSubs
</pre></font>
<p>
<a name=%24VERSION%20%3D%202909e81ef></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.03; $DATE="08/01/2000";</b></font>
<font face="courier new" size=3><pre>
+License change to GPL. See LICENSE section.
+Setup of www.apache-asp.org site, finally!
-get rid of Apache::ASP->Loader() warning message for perl 5.6.0
</pre></font>
<p>
<a name=%24VERSION%20%3D%202727b0736></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.01; $DATE="07/22/2000";</b></font>
<font face="courier new" size=3><pre>
+$data_ref = $Response->TrapInclude('file.inc') API
extension which allows for easy post processing of
data from includes
+<a href=eg/source.inc>./site/eg/source.inc</a> syntax highlighting improvements
+XMLSubsMatch compile time parsing performance improvement
</pre></font>
<p>
<a name=%24VERSION%20%3D%202784583b1></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 2.00; $DATE="07/15/2000";</b></font>
<font face="courier new" size=3><pre>
-UniquePackages config works again, broke a couple versions back
+better error handling for methods called on $Application
that don't exist, hard to debug before
</pre></font>
<p>
<a name=%24VERSION%20%3D%2010d78b35d></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 1.95; $DATE="07/10/2000";</b></font>
<font face="courier new" size=3><pre>
!!!!! EXAMPLES SECURITY BUG FOUND & FIXED !!!!!
--FIXED: distribution example <a href=eg/source.asp>./site/eg/source.asp</a> now parses
out special characters of the open() call when reading local
files.
This bug would allow a malicious user possible writing
of files in the same directory as the source.asp script. This
writing exploit would only have effect if the web server user
has write permission on those files.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$0 now set to transferred file, when using $Server->Transfer
-Fix for XMLSubsMatch parsing on cases with 2 or more args passed
to tag sub that was standalone like
<Apps:header type="header" title="Moo" foo="moo" />
</pre></font>
<p>
<a name=%24VERSION%20%3D%201b231718a></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 1.93; $DATE="07/03/2000";</b></font>
<font face="courier new" size=3><pre>
-sub second timing with Time::HiRes was adding <!-- -->
comments by HTML by default, which would possibly
break specific programs looking for precise HTML output.
Now this behavior must be explicitly turned on with
the TimeHiRes config setting.
These comments will only appear in HTML only if
Debug is enabled as well.
Timed log entries will only occur if
system debugging is enabled, with Debug -1 or -2
</pre></font>
<p>
<a name=%24VERSION%20%3D%2010d8c7b1b></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 1.91; $DATE="07/02/2000";</b></font>
<font face="courier new" size=3><pre>
+Documented XMLSubsMatch & XSLT* configuration
settings in CONFIG section.
+XSLT XSL template is now first executed as an
ASP script just like the XML scripts. This is
just one step away now from implementing XSP logic.
+$Server->Execute and $Server->Transfer API extensions
implemented. Execute is the same as $Request->Include()
and $Server->Transfer is like an apache internal redirect
site/changes.html view on Meta::CPAN
+Nice source hiliting when viewing source for the example
scripts.
+Runtime string writing optimization for static HTML going
through $Response.
+New version numbering just like everyone else. Starting at 1.91
since I seem to be off by a factor of 10, last release would have
been 1.9.
</pre></font>
<p>
<a name=%24VERSION%20%3D%200f0c93549></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 0.19; $DATE="NOT RELEASED";</b></font>
<font face="courier new" size=3><pre>
+XMLSubsMatch and XSLT* settings documented in
the XML/XSLT section of the site/README.
-XMLSubsMatch will strip parens in a pattern match
so it does not interfere with internal matching use.
+XSLT integration allowing XML to be rendered by XSLT
on the fly. XSLT specifies XSL file to transform XML.
XSLTMatch is a regexp that matches XML file names, like \.xml$,
which will be transformed by XSLT setting, default .*
site/changes.html view on Meta::CPAN
from standard ASP session id implementation which will automatically
use the session id presented by the browser, now a new session id will
be returned if the presented one is invalid or expired.
-$Application->GetSession will only return a session if
one already existed. It would create one before by default.
+Script_OnFlush global.asa event handler, and $Response->{BinaryRef}
member which is a scalar reference to the content about to be flushed.
See <a href=eg/global.asa>./site/eg/global.asa</a> for example usage, used in this case to
insert font tags on the fly into the output.
+Highlighting and linking of line error when Debug is set to 2 or -2.
--removed fork() call from flock() backup routine? How did
that get in there? Oh right, testing on Win32. :(
Very painful lesson this one, sorry to whom it may concern.
+$Application->SessionCount support turned off by default
must enable with SessionCount config option. This feature
puts an unnecessary load on busy sites, so not default
site/changes.html view on Meta::CPAN
wrapper around Apache->dir_config($setting)
+Loader() will log the number of scripts
recompiled and the number of scripts checked, instead
of just the number of scripts recompiled, which is
misleading as it reports 0 for child httpds after
a parent fork that used Loader() upon startup.
-Apache::ASP->Loader() would have a bad error if it didn't load
any scripts when given a directory, prints "loaded 0 scripts" now
</pre></font>
<p>
<a name=%24VERSION%20%3D%2004a1da04f></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 0.18; $DATE="02/03/2000";</b></font>
<font face="courier new" size=3><pre>
+Documented SessionQuery* & $Server->URL() and
cleaned up formatting some, as well as redoing
some of the sections ordering for better readability.
Document the cookieless session functionality more
in a new SESSIONS section. Also documented new
FileUpload configs and $Request->FileUpload collection.
Documented StatScripts.
+StatScripts setting which if set to 0 will not reload
includes, global.asa, or scripts when changed.
site/changes.html view on Meta::CPAN
+Improved the locking, streamlining a bit of the
$Application / $Session setup process. Bench is up to
22 from 21 hits / sec on dev NT box.
+Cut more fat for faster startup, now on my dev box
I get 44 hits per sec Apache::ASP vs. 48 Embperl
vs. 52 CGI via Apache::Registry for the HelloWorld Scripts.
-Improved linking for the online site documentation,
where a few links before were bad.
</pre></font>
<p>
<a name=%24VERSION%20%3D%200792d4e8d></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 0.17; $DATE="11/15/99";</b></font>
<font face="courier new" size=3><pre>
++20%+ faster startup script execution, as measured by the
HelloWorld bench. I cut a lot of the fat out of
the code, and is now at least 20% faster on startup
both with and without state.
On my dev (NT, apache 1.3.6+mod_perl) machine, I now get:
42 hits per sec on Apache::ASP HelloWorld bench
46 hits per sec on Embperl (1.2b10) and
51 hits per sec for CGI Apache::Registry scripts
site/changes.html view on Meta::CPAN
+$Application->GetSession($session_id) API extension, useful
for managing active user sessions when storing session ids
in $Application. Documented.
-disable use of flock() on Win95/98 where it is unimplemented
<b>-@array</b> context of $Request->Form('name') returns
undef when value for 'name' is undefined. Put extra
logic in there to make sure this happens.
</pre></font>
<p>
<a name=%24VERSION%20%3D%2003dd1597d></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 0.16; $DATE="09/22/99";</b></font>
<font face="courier new" size=3><pre>
-$Response->{Buffer} and PerlSetVar BufferingOn
configs now work when set to 0, to unbuffer output,
and send it out to the web client as the script generates it.
Buffering is enabled by default, as it is faster, and
allows a script to error cleanly in the middle of execution.
+more bullet proof loading of Apache::Symbol, changed the
way Apache::ASP loads modules in general. It used to
check for the module to load every time, if it hadn't loaded
successfully before, but now it just tries once per httpd,
so the web server will have to be restarted to see new installed
modules. This is just for modules that Apache::ASP relies on.
Old modules that are changed or updated with an installation
are still reloaded with the StatINC settings if so configured.
+ASP web site wraps <font face="courier new"> around <pre>
tags now to override the other font used for the text
areas. The spacing was all weird in Netscape before
for <pre> sections.
-Fixed Content-Length calculation when using the Clean
option, so that the length is calculated after the HTML
is clean, not before. This would cause a browser to
hang sometimes.
+Added IncludesDir config option that if set will also be
used to check for includes, so that includes may easily be
site/changes.html view on Meta::CPAN
$env->{REMOTE_USER} = $env->{AUTH_USER} = username
$env->{AUTH_PASSWD} = password
$env->{AUTH_NAME} = your realm
$env->{AUTH_TYPE} = 'Basic'
This is the same place to find auth data as if Apache had some
authentication handler deal with the auth phase separately.
-MailErrorsTo should report the right file now that generates
the error.
</pre></font>
<p>
<a name=%24VERSION%20%3D%200a2fa9027></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 0.15; $DATE="08/24/1999";</b></font>
<font face="courier new" size=3><pre>
--State databases like $Session, $Application are
now tied/untied to every lock/unlock triggered by read/write
access. This was necessary for correctness issues, so that
database file handles are flushed appropriately between writes
in a highly concurrent multi-process environment.
This problem raised its ugly head because under high volume,
a DB_File can become corrupt if not flushed correctly.
Unfortunately, there is no way to flush SDBM_Files & DB_Files
consistently other than to tie/untie the databases every access.
site/changes.html view on Meta::CPAN
these state databases is not cached, just the locking
file handles are held open.
-Added in much more locking in session manager
and session garbage collector to help avoid collisions
between the two. There were definite windows that the
two would collide in, during which bad things could
happen on a high volume site.
-Fixed some warnings in DESTROY and ParseParams()
</pre></font>
<p>
<a name=%24VERSION%20%3D%200b667e0c4></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 0.14; $DATE="07/29/1999";</b></font>
<font face="courier new" size=3><pre>
-CGI & StatINC or StatINCMatch would have bad results
at times, with StatINC deleting dynamically compiled
CGI subroutines, that were imported into other scripts
and modules namespaces.
A couple tweaks, and now StatINC & CGI play nice again ;)
StatINCMatch should be safe to use in production with CGI.
This affects in particular environments that use file upload,
since CGI is loaded automatically by Apache::ASP to handle
file uploads.
site/changes.html view on Meta::CPAN
safe in scripts, while UniquePackages config is set.
+Better handling of "use strict" errors in ASP scripts.
The error is detected, and the developer is pointed to the
Apache error log for the exact error.
The script with "use strict" errors will be recompiled again. Its seems
though that "use strict" will only throw its error once, so that a script
can be recompiled with the same errors, and work w/o any use strict
error messaging.
</pre></font>
<p>
<a name=%24VERSION%20%3D%200fcc7c76f></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 0.12; $DATE="07/01/1999";</b></font>
<font face="courier new" size=3><pre>
-Compiles are now 10 +times faster for scripts with lots of big
embedded perl blocks <% #perl %>
Compiles were slow because of an old PerlScript compatibility
parsing trick where $Request->QueryString('hi')->{item}
would be parsed to $Request->QueryString('hi') which works.
I think the regexp that I was using had O(n^2) characteristics
and it took a really big perl block to 10 +seconds to parse
to understand there was a problem :(
site/changes.html view on Meta::CPAN
+$Response->{IsClientConnected} set to one by default. Will
work out a real value when I upgrade to apache 1.3.6. This
value has no meaning before, as apache aborts the perl code
when a client drops its connection in earlier versions.
+better compile time debugging of dynamic includes, with
Debug 2 setting
+"use strict" friendly handling of compiling dynamic includes
with errors
</pre></font>
<p>
<a name=%24VERSION%20%3D%200bd024b52></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 0.11; $DATE="06/24/1999";</b></font>
<font face="courier new" size=3><pre>
+Lots of documentation updates
+The MailHost config option is the smtp server used for
relay emails for the Mail* config options.
+MailAlertTo config option used for sending a short administrative
alert for an internal ASP error, server code 500. This is the
compliment to MailErrorsTo, but is suited for sending a to a
small text based pager. The email sent by MailErrorsTo would
then be checked by the web admin for quick response & debugging
site/changes.html view on Meta::CPAN
for production use.
+StatINCMatch setting created for production use reloading of
perl modules. StatINCMatch allows StatINC reloading of a
subset of all the modules defined in %INC, those that match
$module =~ /$StatINCMatch/, where module is some module name
like Class/Struct.pm
+Reoptimized pod comment parsing. I slowed it down to sync
lines numbers in the last version, but found another corner I could cut.
</pre></font>
<p>
<a name=%24VERSION%20%3D%200c7f99fbe></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 0.10; $DATE="05/24/1999";</b></font>
<font face="courier new" size=3><pre>
+= improvement; - = bug fix
+Added index.html file to ./eg to help people wade through
the examples. This one has been long overdue.
+Clean config option, or setting $Response->{Clean} to 1 - 9,
uses HTML::Clean to compress text/html output of ASP scripts.
I like the Clean 1 setting which is lightweight, stripping
white space for about 10% compression, at a cost of less than
a 5% performance penalty.
site/changes.html view on Meta::CPAN
+Perl script generated from asp scripts should match line
for line, seen in errors, except when using inline (default)
includes, pod comments, or <% #comment %> perl comments, which
will throw off the line counts by adding text, removing
text, or having an extra newline added, respectively.
-Script_OnEnd may now send output to the browser. Before
$main::Response->End() was being called at the end of the
main script preventing further output.
</pre></font>++All scripts are compiled as routines in a namespace uniquely
<font face="courier new" size=3><pre> defined by the global.asa of the ASP application. Thus,
scripts, includes, and global.asa routines will share
all globals defined in the global.asa namespace. This means
that globals between scripts will be shared, and globals
defined in a global.asa will be available to scripts.
Scripts used to have their own namespace, thus globals
were not shared between them.
+a -o $output_dir switch on the ./cgi/asp script allows
it to execute scripts and write their output to an output
directory. Useful for building static html sites, based on
asp scripts. An example use would be:
asp -b -o out *.asp
Without an output directory, script output is written to STDOUT
</pre></font>
<p>
<a name=%24VERSION%20%3D%2005ee189f2></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 0.09; $DATE="04/22/1999";</b></font>
<font face="courier new" size=3><pre>
+Updated Makefile.PL optional modules output for CGI & DB_File
+Improved docs on $Response->Cookies() and $Request->Cookies()
+Added PERFORMANCE doc to main README, and added sub section
on precompiling scripts with Apache::ASP->Loader()
+Naming of CompileIncludes switched over to DynamicIncludes
for greater clarity.
site/changes.html view on Meta::CPAN
included 100 times for a script. Better to quit early than
have a process spin out of control. (PORTABLE ? probably not)
+Allow <!--include file=file.inc--> notation w/o quotes around file names
-PerlSetEnv apache conf setting now get passed through to
$Request->ServerVariables. This update has ServerVariables
getting data from %ENV instead of $r->cgi_env
+README FAQ for PerlHandler errors
</pre></font>
<p>
<a name=%24VERSION%20%3D%200ea85a09a></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 0.08; $DATE="02/06/1999";</b></font>
<font face="courier new" size=3><pre>
++SSI with Apache::Filter & Apache::SSI, see config options & ./eg files
Currently filtering only works in the direction Apache::ASP -> Apache::SSI,
will not work the other way around, as SSI must come last in a set of filters
+SSI file includes may reference files in the Global directory, better
code sharing
- <% @array... %> no longer dropped from code.
+perl =pod comments are stripped from script before compiling, and associated
site/changes.html view on Meta::CPAN
+Command line cgi/asp script takes various options, and allows execution
of multiple asp scripts at one time. This script should be used for
command line debugging. This is also the beginning of building
a static site from asp scripts with the -b option, suppressing headers.
+$Response->AddHeader('Set-Cookie') works for multiple cookies.
-$Response->Cookies('foo', '0') works, was dropping 0 because of boolean test
-Fixed up some config doc errors.
</pre></font>
<p>
<a name=%24VERSION%20%3D%2003960e08a></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 0.07; $DATE="01/20/1999";</b></font>
<font face="courier new" size=3><pre>
-removed SIG{__WARN__} handler, it was a bad idea.
-fixes file locking on QNX, work around poor flock porting
+removed message about Win32::OLE on UNIX platforms from Makefile.PL
-Better lock garbage collection. Works with StatINC seamlessly.
-Multiple select forms now work in array context with $Response->Form()
@values = $Response->Form('multi');
-Better CGI.pm compatibility with $r->header_out('Content-type'),
improved garbage collection under modperl, esp. w/ file uploads
</pre></font>
<p>
<a name=%24VERSION%20%3D%200394bbc7f></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 0.06; $DATE="12/21/1998";</b></font>
<font face="courier new" size=3><pre>
+Application_OnStart & Application_OnEnd event handlers support.
-Compatible with CGI.pm 2.46 headers()
-Compatible with CGI.pm $q = new CGI({}), caveat: does not set params
+use strict; followed by use of objects like $Session is fine.
-Multiple cookies may be set per script execution.
site/changes.html view on Meta::CPAN
: Win32::OLE::in not supported, just use "keys %{$Collection}"
+./cgi/asp script for testing scripts from the command line
: will be upgraded to CGI method of doing asp
: is not "correct" in anyway, so not documented for now
but still useful
+strips DOS carriage returns from scripts automatically, so that
programs like FrontPage can upload pages to UNIX servers
without perl choking on the extra \r characters.
</pre></font>
<p>
<a name=%24VERSION%20%3D%2003a5fe2db></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 0.05; $DATE="10/19/1998";</b></font>
<font face="courier new" size=3><pre>
+Added PERFORMANCE doc, which includes benchmarks +hints.
+Better installation warnings and errors for other modules required.
-Turned off StatINC in eg/.htaccess, as not everyone installs Devel::Symdump
-Fixed AUTOLOAD state bug, which wouldn't let you each through state
objects, like %{$Session}, or each %$Session, (bug introduced in v.04)
+Parses ASP white space better. HTML output matches author's intent
site/changes.html view on Meta::CPAN
+Added include.t test script for includes.
+Script recompiles when included files change.
+Files can be included in script with
SSI <!--#include file="filename"--> syntax, needs to be
done in ASP module to allow compilation of included code and html
into script. Future chaining with Apache::SSI will allow static
html includes, and other SSI directives
</pre></font>
<p>
<a name=%24VERSION%20%3D%2009ffce1f9></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 0.04; $DATE="10/14/1998";</b></font>
<font face="courier new" size=3><pre>
+Example script eg/cgi.htm demonstrating CGI.pm use for output.
+Optimized ASP parsing, faster and more legible executing code
: try 'die();' in code with setting PerlSetVar Debug 2
+Cleaned up code for running with 'use strict'
-Fixed directory handle leak on Solaris, from not closing after opendir()
+StatINC overhaul. StatINC setting now works as it should, with
site/changes.html view on Meta::CPAN
+Improved Cookie implementation, more flexible and complete
- Domain cookie key now works
: Expire times now taken from time(), and relative time in sec
: Request->Cookies() reading more flexible, with wantarray()
on hash cookie values, %hash = $Request->Cookie('test');
-make test module naming correction, was t.pm, now T.pm for Unix
+POD / README cleanup, formatting and HTML friendly.
</pre></font>
<p>
<a name=%24VERSION%20%3D%200ec664faf></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 0.03; $DATE="09/14/1998";</b></font>
<font face="courier new" size=3><pre>
+Installation 'make test' now works
+ActiveX objects on Win32 implemented with $Server->CreateObject()
+Cookies implemented: $Response->Cookies() & $Request->Cookies()
-Fixed $Response object API, converting some methods to object members.
Deprecated methods, but backwards compatible.
+Improved error messaging, debug output
site/changes.html view on Meta::CPAN
+Begin implementation of $Server object.
+Implemented $Response->{Expires} and $Response->{ExpiresAbsolute}
+Added "PerlSetVar StatINC" config option
+$0 is aliased to current script filename
+ASP Objects ($Response, etc.) are set in main package
Thus notation like $main::Response->Write() can be used anywhere.
</pre></font>
<p>
<a name=%24VERSION%20%3D%20055b248f9></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 0.02; $DATE="07/12/1998";</b></font>
<font face="courier new" size=3><pre>
++Session Manager, won't break under denial of service attack
+Fleshed out $Response, $Session objects, almost full implementation.
+Enormously more documentation.
-Fixed error handling with Debug = 2.
-Documentation fixed for pod2man support. README now more man-like.
-Stripped \r\n dos characters from installation files
-755 mode set for session state directory when created
-Loads Win32/OLE properly, won't break with UNIX
</pre></font>
<p>
<a name=%24VERSION%20%3D%2009faee67f></a>
<font face=verdana><font class=title size=+0 color=#555555><b>$VERSION = 0.01; $DATE="06/26/1998";</b></font>
<font face="courier new" size=3><pre>
Syntax Support
--------------
Initial release, could be considered alpha software.
Allows developers to embed perl in html ASP style.
<!-- sample here -->
<html>
<body>
<% for(1..10) { %>
counting: <%=$_%> <br>
site/changes.html view on Meta::CPAN
$Session & $Application data is preserved using SDBM files.
$Session id's are tracked through the use of cookies.
Security
--------
Timeouts any attempt to use a session id that doesn't already
exist. Should stop hackers, since there is no wire speed guessing
cookies.
</pre></font>
</font>
</td>
<td bgcolor=white valign=top>
</td>
</tr>
</table>
</td></tr>
site/config.html view on Meta::CPAN
<html>
<head>
<title>Apache::ASP::Config</title>
<style type="text/css">
<!--
td { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px}
font { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px}
.title { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 16px}
-->
</style>
</head>
<body bgcolor=black link=#063678 alink=#ff5599 vlink=#993399
marginheight=0 marginwidth=0 leftMargin=0 topMargin=0>
site/config.html view on Meta::CPAN
<td align=right></td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor=#005196 align=center>
<b>
<font color=#ffffff><% Web Applications with Apache & mod_perl %></font>
</b>
</td>
</tr>
</table>
<table border=0 cellpadding=10 cellspacing=0 width=100% bgcolor=#005196>
<tr>
<td valign=top width=120 bgcolor=#005196>
<table cellpadding=5 cellspacing=0 border=1 bgcolor=white><tr><td>
<table border=0 cellpadding=0 cellspacing=0 width=105 bgcolor=white>
<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="index.html" style="text-decoration:none"><font color=#063678>INTRO</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="install.html" style="text-decoration:none"><font color=#063678>INSTALL</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><font color=#993399>CONFIG</font></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="syntax.html" style="text-decoration:none"><font color=#063678>SYNTAX</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="events.html" style="text-decoration:none"><font color=#063678>EVENTS</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="objects.html" style="text-decoration:none"><font color=#063678>OBJECTS</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="ssi.html" style="text-decoration:none"><font color=#063678>SSI</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="sessions.html" style="text-decoration:none"><font color=#063678>SESSIONS</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="xml.html" style="text-decoration:none"><font color=#063678>XML/XSLT</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="cgi.html" style="text-decoration:none"><font color=#063678>CGI</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="perlscript.html" style="text-decoration:none"><font color=#063678>PERLSCRIPT</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="style.html" style="text-decoration:none"><font color=#063678>STYLE GUIDE</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="faq.html" style="text-decoration:none"><font color=#063678>FAQ</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="tuning.html" style="text-decoration:none"><font color=#063678>TUNING</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="kudos.html" style="text-decoration:none"><font color=#063678>CREDITS</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="support.html" style="text-decoration:none"><font color=#063678>SUPPORT</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="sites.html" style="text-decoration:none"><font color=#063678>SITES USING</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="testimonials.html" style="text-decoration:none"><font color=#063678>TESTIMONIALS</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="resources.html" style="text-decoration:none"><font color=#063678>RESOURCES</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="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>
site/config.html view on Meta::CPAN
<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>
<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>
</pre></font>Most people agree that this level of security is unnecessary, thus
it is titled paranoid :)
<font face="courier new" size=3><pre>
PerlSetVar ParanoidSession 0
</pre></font>
<p>
<a name=SessionSeria0633b2a7></a>
<font face=verdana><font class=title size=-1 color=#555555><b>SessionSerialize</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 0, if true, locks $Session for duration of script, which
serializes requests to the $Session object. Only one script at
a time may run, per user $Session, with sessions allowed.
<font face="courier new" size=3><pre>
</pre></font>Serialized requests to the session object is the Microsoft ASP way,
but is dangerous in a production environment, where there is risk
of long-running or run-away processes. If these things happen,
a session may be locked for an indefinite period of time. A user
STOP button should safely quit the session however.
<font face="courier new" size=3><pre>
PerlSetVar SessionSerialize 0
</pre></font>
<p>
<a name=SessionCount></a>
<font face=verdana><font class=title size=-1 color=#555555><b>SessionCount</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 0, if true enables the $Application->SessionCount API
which returns how many sessions are currently active in
the application. This config was created
because there is a performance hit associated with this
count tracking, so it is disabled by default.
<font face="courier new" size=3><pre>
PerlSetVar SessionCount 1
</pre></font>
<p>
<a name=Cookieless%20S21cbf4f4></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Cookieless Sessions</b></font>
</font>
<p>
<a name=SessionQuery6920bb61></a>
<font face=verdana><font class=title size=-1 color=#555555><b>SessionQueryParse</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 0, if true, will automatically parse the $Session
session id into the query string of each local URL found in the
$Response buffer. For this setting to work therefore,
buffering must be enabled. This parsing will only occur
when a session cookie has not been sent by a browser, so the
first script of a session enabled site, and scripts viewed by
web browsers that have cookies disabled will trigger this behavior.
<font face="courier new" size=3><pre>
</pre></font>Although this runtime parsing method is computationally
expensive, this cost should be amortized across most users
that will not need this URL parsing. This is a lazy programmer's
dream. For something more efficient, look at the SessionQuery
setting. For more information about this solution, please
read the <a href=sessions.html><font size=-1 face=verdana><b>SESSIONS</b></font></a> section.
<font face="courier new" size=3><pre>
PerlSetVar SessionQueryParse 0
</pre></font>
<p>
<a name=SessionQueryd88d64b8></a>
<font face=verdana><font class=title size=-1 color=#555555><b>SessionQueryParseMatch</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 0, set to a regexp pattern that matches all URLs that you
want to have SessionQueryParse parse in session ids. By default
SessionQueryParse only modifies local URLs, but if you name
your URLs of your site with absolute URLs like <tt>http://localhost</tt>
then you will need to use this setting. So to match
<tt>http://localhost</tt> URLs, you might set this pattern to
^<tt>http://localhost.</tt> Note that by setting this config,
you are also setting SessionQueryParse.
<font face="courier new" size=3><pre>
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>
<p>
<a name=PodComments></a>
<font face=verdana><font class=title size=-1 color=#555555><b>PodComments</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 1. With pod comments turned on, perl pod style comments
and documentation are parsed out of scripts at compile time.
This make for great documentation and a nice debugging tool,
and it lets you comment out perl code and html in blocks.
Specifically text like this:
<font face="courier new" size=3><pre>
=pod
text or perl code here
=cut
</pre></font>will get ripped out of the script before compiling. The =pod and =cut
perl directives must be at the beginning of the line, and must
be followed by the end of the line.
<font face="courier new" size=3><pre>
PerlSetVar PodComments 1
</pre></font>
<p>
<a name=CollectionItb0343456></a>
<font face=verdana><font class=title size=-1 color=#555555><b>CollectionItem</b></font>
<font face="courier new" size=3><pre>
</pre></font>Enables <a href=http://www.activestate.com/ActivePerl/><font size=-1 face=verdana><b>PerlScript</b></font></a> syntax like:
<font face="courier new" size=3><pre>
$Request->Form('var')->Item;
$Request->Form('var')->Item(1);
$Request->Form('var')->Count;
</pre></font>Old PerlScript syntax, enabled with
<font face="courier new" size=3><pre>
use Win32::OLE qw(in valof with OVERLOAD);
</pre></font>is like native syntax
<font face="courier new" size=3><pre>
$Request->Form('var');
</pre></font>Only in Apache::ASP, can the above be written as:
<font face="courier new" size=3><pre>
$Request->{Form}{var};
</pre></font>which you would do if you _really_ needed the speed.</font>
<p>
<a name=XML%20%2F%20XSLT></a>
<font face=verdana><font class=title size=+0 color=#555555><b>XML / XSLT</b></font>
</font>
<p>
<a name=XMLSubsMatch></a>
<font face=verdana><font class=title size=-1 color=#555555><b>XMLSubsMatch</b></font>
<font face="courier new" size=3><pre>
</pre></font>default not defined, set to some regexp pattern
that will match all XML and HTML tags that you want
to have perl subroutines handle. The is Apache::ASP's
custom tag technology, and can be used to create
powerful extensions to your XML and HTML rendering.
<font face="courier new" size=3><pre>
</pre></font>Please see <a href=xml.html><font size=-1 face=verdana><b>XML/XSLT</b></font></a> section for instructions on its use.
<font face="courier new" size=3><pre>
PerlSetVar XMLSubsMatch my:[\w\-]+
</pre></font>
<p>
<a name=XMLSubsStric569463b3></a>
<font face=verdana><font class=title size=-1 color=#555555><b>XMLSubsStrict</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 0, when set XMLSubs will only take arguments
that are properly formed XML tag arguments like:
<font face="courier new" size=3><pre>
<my:sub arg1="value" arg2="value" />
</pre></font>By default, XMLSubs accept arbitrary perl code as
argument values:
<font face="courier new" size=3><pre>
<my:sub arg1=1+1 arg2=&perl_sub()/>
</pre></font>which is not always wanted or expected. Set
XMLSubsStrict to 1 if this is the case.
<font face="courier new" size=3><pre>
PerlSetVar XMLSubsStrict 1
</pre></font>
<p>
<a name=XMLSubsPerlA21dba3d7></a>
<font face=verdana><font class=title size=-1 color=#555555><b>XMLSubsPerlArgs</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 1, when set attribute values will be interpreted
as raw perl code so that these all would execute as one
would expect:
<font face="courier new" size=3><pre>
<my:xmlsubs arg='1' arg2="2" arg3=$value arg4="1 $value" />
</pre></font>With the 2.45 release, 0 may be set for this configuration
or a more ASP style variable interpolation:
<font face="courier new" size=3><pre>
<my:xmlsubs arg='1' arg2="2" args3="<%= $value %>" arg4="1 <%= $value %>" />
</pre></font>This configuration is being introduced experimentally in version 2.45,
as it will become the eventual default in the 3.0 release.
<font face="courier new" size=3><pre>
PerlSetVar XMLSubsPerlArgs Off
</pre></font>
<p>
<a name=XSLT></a>
<font face=verdana><font class=title size=-1 color=#555555><b>XSLT</b></font>
<font face="courier new" size=3><pre>
</pre></font>default not defined, if set to a file, ASP scripts will
be regarded as XML output and transformed with the given
XSL file with <a href=http://xmlxslt.sourceforge.net/><font size=-1 face=verdana><b>XML::XSLT</b></font></a>. This XSL file will also be
executed as an ASP script first, and its output will be
the XSL data used for the transformation. This XSL file
will be executed as a dynamic include, so may be located
in the current directory, Global, or IncludesDir.
<font face="courier new" size=3><pre>
</pre></font>Please see the <a href=xml.html><font size=-1 face=verdana><b>XML/XSLT</b></font></a> section for an explanation of its
use.
<font face="courier new" size=3><pre>
PerlSetVar XSLT template.xsl
</pre></font>
<p>
<a name=XSLTMatch></a>
<font face=verdana><font class=title size=-1 color=#555555><b>XSLTMatch</b></font>
<font face="courier new" size=3><pre>
</pre></font>default .*, if XSLT is set by default all ASP scripts
will be XSL transformed by the specified XSL template.
This regexp setting will tell XSLT which file names to
match with doing XSL transformations, so that regular
HTML ASP scripts and XML ASP scripts can be configured
with the same configuration block. Please see
<a href=eg/.htaccess>./site/eg/.htaccess</a> for an example of its use.
<font face="courier new" size=3><pre>
PerlSetVar XSLTMatch \.xml$
</pre></font>
<p>
<a name=XSLTParser></a>
<font face=verdana><font class=title size=-1 color=#555555><b>XSLTParser</b></font>
<font face="courier new" size=3><pre>
</pre></font>default <a href=http://xmlxslt.sourceforge.net/><font size=-1 face=verdana><b>XML::XSLT</b></font></a>, determines which perl module to use for
XSLT parsing. This is a new config as of 2.11.
Also supported is XML::Sablotron which does not
handle XSLT with the exact same output, but is about
10 times faster than XML::XSLT. XML::LibXSLT may
also be used as of version 2.29, and seems to be
about twice again as fast as XML::Sablotron,
and a very complete XSLT implementation.
<font face="courier new" size=3><pre>
PerlSetVar XSLTParser XML::XSLT
PerlSetVar XSLTParser XML::Sablotron
PerlSetVar XSLTParser XML::LibXSLT
</pre></font>
<p>
<a name=XSLTCache></a>
<font face=verdana><font class=title size=-1 color=#555555><b>XSLTCache</b></font>
<font face="courier new" size=3><pre>
</pre></font>Activate XSLT file based caching through CacheDB, CacheDir,
and CacheSize settings. This gives cached XSLT performance
near AxKit and greater than Cocoon. XSLT caches transformations
keyed uniquely by XML & XSLT inputs.
<font face="courier new" size=3><pre>
PerlSetVar XSLTCache 1
</pre></font>
<p>
<a name=XSLTCacheSiz6e7d9101></a>
<font face=verdana><font class=title size=-1 color=#555555><b>XSLTCacheSize</b></font>
<font face="courier new" size=3><pre>
</pre></font>as of version 2.11, this config is no longer supported.</font>
<p>
<a name=Caching></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Caching</b></font>
<font face="courier new" size=3><pre>
</pre></font>The output caching layer is a file dbm based output cache that runs
on top of the MLDBM::Sync so inherits its performance characteristics.
With CacheDB set to MLDBM::Sync::SDBM_File, the cache layer is
very fast at caching entries up to 20K in size, but for greater
cached items, you should set CacheDB to another dbm like DB_File
or GDBM_File.
<font face="courier new" size=3><pre>
</pre></font>In order for the cache layer
to function properly, whether for $Response->Include() output
caching, see <a href=objects.html><font size=-1 face=verdana><b>OBJECTS</b></font></a>, or XSLT caching, see <a href=xml.html><font size=-1 face=verdana><b>XML/XSLT</b></font></a>, then
Apache::ASP must be loaded in the parent httpd like so:
<font face="courier new" size=3><pre>
# httpd.conf
PerlModule Apache::ASP
-- or --
<Perl>
use Apache::ASP;
</Perl>
</pre></font>The cache layer automatically expires entries upon
server restart, but for this to work, a $ServerID
must be computed when the Apache::ASP module gets
loaded to store in each cached item. Without the
above done, each child httpd process will get its
own $ServerID, so caching will not work at all.
<font face="courier new" size=3><pre>
</pre></font>This said, output caching will not work in raw <a href=cgi.html><font size=-1 face=verdana><b>CGI</b></font></a> mode,
just running under <a href=http://perl.apache.org><font size=-1 face=verdana><b>mod_perl</b></font></a>.</font>
<p>
<a name=CacheDB></a>
<font face=verdana><font class=title size=-1 color=#555555><b>CacheDB</b></font>
<font face="courier new" size=3><pre>
</pre></font>Like StateDB, sets dbm format for caching. Since SDBM_File
only support key/values pairs of around 1K max in length,
the default for this is MLDBM::Sync::SDBM_File, which is very
fast for < 20K output sizes. For caching larger data than 20K,
DB_File or GDBM_File are probably better to use.
<font face="courier new" size=3><pre>
PerlSetVar CacheDB MLDBM::Sync::SDBM_File
</pre></font>Here are some benchmarks about the CacheDB when used
with caching output from $Response->Include(\%cache)
running on a Linux 2.2.14 dual PIII-450.
The variables are output size being cached & the CacheDB used,
the default being MLDBM::Sync::SDBM_File.
<font face="courier new" size=3><pre>
</pre></font><table class="noescape" border="0">
<tr><th>CacheDB</th><th>Output Cached</th><th>Operation</th><th>Ops/sec</th></tr>
<tr><td>MLDBM::Sync::SDBM_File</td> <td>3200 bytes</td> <td>read</td> <td>177</td></tr>
<tr><td>DB_File</td> <td>3200 bytes</td> <td>read</td> <td>59</td></tr>
<tr><td>MLDBM::Sync::SDBM_File</td> <td>32000 bytes</td> <td>read</td> <td>42</td></tr>
<tr><td>DB_File</td> <td>32000 bytes</td> <td>read</td> <td>53</td></tr>
<tr><td>MLDBM::Sync::SDBM_File</td> <td>3200 bytes</td> <td>write</td> <td>42</td></tr>
<tr><td>DB_File</td> <td>3200 bytes</td> <td>write</td> <td>39</td></tr>
</table>
<font face="courier new" size=3><pre>
</pre></font>For your own benchmarks to test the relative speeds of the
various DBMs under MLDBM::Sync, which is used by CacheDB,
you may run the ./bench/bench_sync.pl script from the
MLDBM::Sync distribution on your system.</font>
<p>
<a name=CacheDir></a>
<font face=verdana><font class=title size=-1 color=#555555><b>CacheDir</b></font>
<font face="courier new" size=3><pre>
</pre></font>By default, the cache directory is at StateDir/cache,
but CacheDir can be used to set the StateDir value for
caching purposes. One may want the CacheDir separate
from StateDir for example StateDir might be a centrally
network mounted file system, while CacheDir might be
a local file cache.
<font face="courier new" size=3><pre>
PerlSetVar CacheDir /tmp/asp_demo
</pre></font>On a system like Solaris where there is a RAM disk
mounted on the system like /tmp, I could put the CacheDir
there. On a system like Linux where files are cached
pretty well by default, this is less important.</font>
<p>
<a name=CacheSize></a>
<font face=verdana><font class=title size=-1 color=#555555><b>CacheSize</b></font>
<font face="courier new" size=3><pre>
</pre></font>By default, this is 10M of data per cache. When any cache,
like the XSLTCache, reaches this limit, the cache will be purged
by deleting the cached dbm files entirely. This is better for
long term running of dbms than deleting individual records,
because dbm formats will often degrade in performance with
lots of insert & deletes.
<font face="courier new" size=3><pre>
</pre></font>Units of M, K, and B are supported for megabytes, kilobytes, and bytes,
with the default unit being B, so the following configs all mean the
same thing;
<font face="courier new" size=3><pre>
PerlSetVar CacheSize 10M
PerlSetVar CacheSize 10240K
PerlSetVar CacheSize 10485760B
PerlSetVar CacheSize 10485760
</pre></font>There are 2 caches currently, the XSLTCache, and the
Response cache, the latter which is currently invoked
for caching output from includes with special syntax.
See $Response->Include() for more info on the Response cache.</font>
<p>
<a name=Miscellaneou387baf01></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Miscellaneous</b></font>
</font>
<p>
<a name=AuthServerVaa7584921></a>
<font face=verdana><font class=title size=-1 color=#555555><b>AuthServerVariables</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 0. If you are using basic auth and would like
$Request->ServerVariables set like AUTH_TYPE, AUTH_USER,
AUTH_NAME, REMOTE_USER, & AUTH_PASSWD, then set this and
Apache::ASP will initialize these values from Apache->*auth*
commands. Use of these environment variables keeps applications
cross platform compatible as other servers set these too
when performing basic 401 auth.
<font face="courier new" size=3><pre>
PerlSetVar AuthServerVariables 0
</pre></font>
<p>
<a name=BufferingOn></a>
<font face=verdana><font class=title size=-1 color=#555555><b>BufferingOn</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 1, if true, buffers output through the response object.
$Response object will only send results to client browser if
a $Response->Flush() is called, or if the asp script ends. Lots of
output will need to be flushed incrementally.
<font face="courier new" size=3><pre>
</pre></font>If false, 0, the output is immediately written to the client,
<a href=cgi.html><font size=-1 face=verdana><b>CGI</b></font></a> style. There will be a performance hit server side if output
is flushed automatically to the client, but is probably small.
<font face="courier new" size=3><pre>
</pre></font>I would leave this on, since error handling is poor, if your asp
script errors after sending only some of the output.
<font face="courier new" size=3><pre>
PerlSetVar BufferingOn 1
</pre></font>
<p>
<a name=InodeNames></a>
<font face=verdana><font class=title size=-1 color=#555555><b>InodeNames</b></font>
<font face="courier new" size=3><pre>
</pre></font>Default 0. Set to 1 to uses a stat() call on scripts and includes to
derive subroutine namespace based on device and inode numbers. In case of
multiple symbolic links pointing to the same script this will result
in the script being compiled only once. Use only on unix flavours
which support the stat() call that know about device and inode
numbers.
<font face="courier new" size=3><pre>
PerlSetVar InodeNames 1
</pre></font>
<p>
<a name=RequestParam25a784ba></a>
<font face=verdana><font class=title size=-1 color=#555555><b>RequestParams</b></font>
<font face="courier new" size=3><pre>
</pre></font>Default 0, if set creates $Request->Params object with combined
contents of $Request->QueryString and $Request->Form. This
is for developer convenience simlar to <a href=http://stein.cshl.org/WWW/software/CGI/cgi_docs.html><font size=-1 face=verdana><b>CGI.pm</b></font></a>'s param() method.
<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>
</pre></font>default 0. When true, script output that looks like HTTP / <a href=cgi.html><font size=-1 face=verdana><b>CGI</b></font></a>
headers, will be added to the HTTP headers of the request.
So you could add:
<font face="courier new" size=3><pre> Set-Cookie: test=message
<html>...
</pre></font>to the top of your script, and all the headers preceding a newline
will be added as if with a call to $Response->AddHeader(). This
functionality is here for compatibility with raw cgi scripts,
and those used to this kind of coding.
<font face="courier new" size=3><pre>
</pre></font>When set to 0, CgiHeaders style headers will not be parsed from the
script response.
<font face="courier new" size=3><pre>
PerlSetVar CgiHeaders 0
</pre></font>
<p>
<a name=Clean></a>
<font face=verdana><font class=title size=-1 color=#555555><b>Clean</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 0, may be set between 1 and 9. This setting determine how much
text/html output should be compressed. A setting of 1 strips mostly
white space saving usually 10% in output size, at a performance cost
of less than 5%. A setting of 9 goes much further saving anywhere
25% to 50% typically, but with a performance hit of 50%.
<font face="courier new" size=3><pre>
</pre></font>This config option is implemented via HTML::Clean. Per script
configuration of this setting is available via the $Response->{Clean}
property, which may also be set between 0 and 9.
<font face="courier new" size=3><pre>
PerlSetVar Clean 0
</pre></font>
<p>
<a name=CompressGzip></a>
<font face=verdana><font class=title size=-1 color=#555555><b>CompressGzip</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 0, if true will gzip compress HTML output on the
fly if Compress::Zlib is installed, and the client browser
supports it. Depending on the HTML being compressed,
the client may see a 50% to 90% reduction in HTML output.
I have seen 40K of HTML squeezed down to just under 6K.
This will come at a 5%-20% hit to CPU usage per request
compressed.
<font face="courier new" size=3><pre>
</pre></font>Note there are some cases when a browser says it will accept
gzip encoding, but then not render it correctly. This
behavior has been seen with IE5 when set to use a proxy but
not using a proxy, and the URL does not end with a .html or .htm.
No work around has yet been found for this case so use at your
own risk.
<font face="courier new" size=3><pre>
PerlSetVar CompressGzip 1
</pre></font>
<p>
<a name=FormFill></a>
<font face=verdana><font class=title size=-1 color=#555555><b>FormFill</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 0, if true will auto fill HTML forms with values
from $Request->Form(). This functionality is provided
by use of HTML::FillInForm. For more information please
see "perldoc HTML::FillInForm", and the
example <a href=eg/formfill.asp>./site/eg/formfill.asp</a>.
<font face="courier new" size=3><pre>
</pre></font>This feature can be enabled on a per form basis at runtime
with $Response->{FormFill} = 1
<font face="courier new" size=3><pre>
PerlSetVar FormFill 1
</pre></font>
<p>
<a name=TimeHiRes></a>
<font face=verdana><font class=title size=-1 color=#555555><b>TimeHiRes</b></font>
<font face="courier new" size=3><pre>
</pre></font>default 0, if set and Time::HiRes is installed, will do
sub second timing of the time it takes Apache::ASP to process
a request. This will not include the time spent in the
session manager, nor modperl or Apache, and is only a
rough approximation at best.
<font face="courier new" size=3><pre>
</pre></font>If Debug is set also, you will get a comment in your
HTML output that indicates the time it took to process
that script.
<font face="courier new" size=3><pre>
</pre></font>If system debugging is set with Debug -1 or -2, you will
also get this time in the Apache error log with the
other system messages.</font>
<p>
<a name=Mail%20Adminis1a4d2b59></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Mail Administration</b></font>
<font face="courier new" size=3><pre>
</pre></font>Apache::ASP has some powerful administrative email
extensions that let you sleep at night, knowing full well
that if an error occurs at the web site, you will know
about it immediately. With these features already enabled,
it was also easy to provide the $Server->Mail(\%mail) API
extension which you can read up about in the <a href=objects.html><font size=-1 face=verdana><b>OBJECTS</b></font></a> section.</font>
<p>
<a name=MailHost></a>
<font face=verdana><font class=title size=-1 color=#555555><b>MailHost</b></font>
<font face="courier new" size=3><pre>
</pre></font>The mail host is the smtp server that the below Mail* config directives
will use when sending their emails. By default Net::SMTP uses
smtp mail hosts configured in Net::Config, which is set up at
install time, but this setting can be used to override this config.
<font face="courier new" size=3><pre>
</pre></font>The mail hosts specified in the Net::Config file will be used as
backup smtp servers to the MailHost specified here, should this
primary server not be working.
<font face="courier new" size=3><pre>
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>
site/eg/counting.htm view on Meta::CPAN
#!/usr/bin/perl /usr/bin/asp-perl
<!--#include file=header.inc-->
<% if($Request->QueryString('transfer')) { %>
<font color=red>We just transferred from transfer.htm !!</font>
<p>
<% } %>
For loop decrementing font size:
<table cellpadding=3 border=0>
<% for my $num (reverse(1..6)) { %>
<tr>
<% for my $base (1..3) { %>
<td><font size=<%= $num %>><%= (10 ** $base) * $num %></font></td>
<% } %>
<td><font size=<%= $num %>>Size = <%= $num %></font></td>
</tr>
<% } %>
</table>
<!--#include file=footer.inc-->
site/eg/file_upload.asp view on Meta::CPAN
map {
($_, $Request->FileUpload('uploaded_file', $_))
} sort keys %$upload
);
close FILE;
while(@data) {
my($key, $value) = (shift @data, shift @data);
%>
<tr>
<td><b><font size=-1><%=$key%></font></b></td>
<td><font size=-1><%=$value%></font></td>
</tr>
<%
}
print "</table>";
%>
<pre>
UPLOADED DATA
=============
<%
site/eg/global.asa view on Meta::CPAN
sub Script_OnEnd {
$Response->Debug("Script_OnEnd $0 in global.asa");
$Session->{Ended}++;
}
# modify data on the way out
sub Script_OnFlush {
if($Response->{ContentType} eq 'text/html') {
my $data = $Response->{BinaryRef};
$$data =~ s/(\<(body|td).*?\>)/$1\<font $GlobalFont\>/isg;
}
my $data = $Response->{BinaryRef};
$Response->Debug("Script_OnFlush: about to flush ".length($$data)." bytes to client");
}
sub Session_OnStart {
$Session->{Count} = 10;
$Session->{onstart} = time();
$Application->{'Session'.$Session->SessionID} = '?';
$Response->AppendToLog("Session_OnStart! in ./eg/global.asa ". $Session->SessionID);
site/eg/global.asa view on Meta::CPAN
sub my::include {
my($args, $text) = @_;
# reference the $Response object in the package namespace
# since we are in the my:: package and not the GlobalPackage/global.asa
$main::Response->Include($args->{src}, title => $args->{title});
}
sub my::ttb {
my($args, $text) = @_;
print "<font face=courier size=-1><b>$text</b></font>";
}
sub my::table {
my($args, $text) = @_;
my $title = delete $args->{title};
my %args = (
# set defaults, and override with %$args
border => 0,
bgcolor => 'white',
width => '300',
cellpadding => 3,
cellspacing => 0,
%$args
);
print '<table '.join(' ',
map { "$_=$args{$_}" } keys %args,
). '>';
print ($title ? "<tr><td bgcolor=black><font color=white>$title</font></td></tr>" : '');
print "\n";
print "<tr><td>";
print $text;
print "</td></tr></table>";
}
site/eg/header.inc view on Meta::CPAN
<table border="0" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="#063678">
<td><img border="0" src="<%=$gifdir%>/asptitlelogo.gif" alt="Apache::ASP" /></td>
<td align="right" width="300">
<a href="http://perl.apache.org"><img src="<%=$gifdir%>/powered_by_modperl.gif" border="0" alt="Powered by ModPerl & Apache" /></a>
<a href="http://www.apache-asp.org"><img src="<%=$gifdir%>/powered_by_apache_asp.jpg" border="0" alt="Powered by Apache::ASP" /></a>
</td>
</tr>
<tr bgcolor="gray" width="100%">
<td><font size="+0" color="white"><b><%=$title || $demo->{title}%></b></font></td>
<td align="right">
<%
my $date = &Apache::ASP::Date::time2iso();
$date =~ s/\s*\d\d:\d\d:\d\d$//;
%>
<font color="white" size="-1"><%=$date %></font>
</td>
</tr>
</table>
<br />
site/eg/index.html view on Meta::CPAN
}
next unless $_->[0]; # last col / last row
# clean up the descriptions
$_->[1] =~ s/\s*\.\s*$//s;
$_->[1] .= '.';
%>
<td valign=top>
<nobr>
<font>
<b>
<a href=<%=$_->[0]%>><%=$_->[0]%></a>
<% if($_->[0] =~ /\.(htm|asp|ssi|xml)$/) { %>
 
<i>
(<a href=source.asp?file=<%=$_->[0]%>>source</a>)
</i>
<% } %>
</b>
</font>
</nobr>
<br>
<font size=-1><%=$_->[1]%></font>
</td>
<% } %>
</tr>
<% } %>
</table>
<!--#include file=footer.inc-->
site/eg/server.htm view on Meta::CPAN
($^O eq 'MSWin32') && push(@cmds, '$Server->CreateObject("MSWC.AdRotator")');
%>
<table width=100% border=0 cellpadding=0 cellspacing=0>
<tr><th colspan=2 align=center>The $Server methods in action</th><tr>
<% for my $cmd (@cmds) { %>
<tr><td colspan=2><hr size=1></td></tr>
<tr>
<td> <tt><%= $Server->HTMLEncode($cmd) %> </tt></td>
<td> <font size=+0> <pre><%= eval "$cmd" %></pre> </font> </td>
</tr>
<% } %>
<tr><td colspan=2><hr size=1></td></tr>
</table>
<!--#include file=footer.inc-->
site/eg/source.inc view on Meta::CPAN
$Response->End();
}
local $/ = undef;
my $data = <FILE>;
close FILE;
$data =~ s|^\#\!\/[^\n]+\n||sg;
$data =~ s/^\s+//s;
$data =~ s/\s+$//s;
my $escaped = $Server->HTMLEncode($data);
$escaped =~ s/(<%=?)(.*?)(%>)/
"<b><font color=#cc0000 face=\"courier new\">$1<font color=#000099>$2<\/font>$3<\/font><\/b>";
/egsx;
$escaped =~ s/(<\!\-\-\s*\#include\s*file\s*\=)(.*?)(\-\->)/
"<b><font color=#009900 face=\"courier new\">$1<font color=#555555>$2<\/font>$3<\/font><\/b>";
/egsx;
$escaped =~ s/(<\/?)([\w-]+:[\w-]+)/$1\<font color=\#008000\><b>$2<\/b>\<\/font\>/isg;
$escaped =~ s/(<\/?)([a-z]+)/$1\<font color=#007070\><b>$2<\/b>\<\/font\>/isg;
%>
<h3>Source of file <%=$file%>:</h3>
<pre>
<%= $escaped %>
</pre>
<%
} else {
$Response->Write("No file to be displayed");
site/events.html view on Meta::CPAN
<html>
<head>
<title>Apache::ASP::Events</title>
<style type="text/css">
<!--
td { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px}
font { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px}
.title { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 16px}
-->
</style>
</head>
<body bgcolor=black link=#063678 alink=#ff5599 vlink=#993399
marginheight=0 marginwidth=0 leftMargin=0 topMargin=0>
site/events.html view on Meta::CPAN
<td align=right></td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor=#005196 align=center>
<b>
<font color=#ffffff><% Web Applications with Apache & mod_perl %></font>
</b>
</td>
</tr>
</table>
<table border=0 cellpadding=10 cellspacing=0 width=100% bgcolor=#005196>
<tr>
<td valign=top width=120 bgcolor=#005196>
<table cellpadding=5 cellspacing=0 border=1 bgcolor=white><tr><td>
<table border=0 cellpadding=0 cellspacing=0 width=105 bgcolor=white>
<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="index.html" style="text-decoration:none"><font color=#063678>INTRO</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="install.html" style="text-decoration:none"><font color=#063678>INSTALL</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="config.html" style="text-decoration:none"><font color=#063678>CONFIG</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="syntax.html" style="text-decoration:none"><font color=#063678>SYNTAX</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><font color=#993399>EVENTS</font></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="objects.html" style="text-decoration:none"><font color=#063678>OBJECTS</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="ssi.html" style="text-decoration:none"><font color=#063678>SSI</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="sessions.html" style="text-decoration:none"><font color=#063678>SESSIONS</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="xml.html" style="text-decoration:none"><font color=#063678>XML/XSLT</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="cgi.html" style="text-decoration:none"><font color=#063678>CGI</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="perlscript.html" style="text-decoration:none"><font color=#063678>PERLSCRIPT</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="style.html" style="text-decoration:none"><font color=#063678>STYLE GUIDE</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="faq.html" style="text-decoration:none"><font color=#063678>FAQ</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="tuning.html" style="text-decoration:none"><font color=#063678>TUNING</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="kudos.html" style="text-decoration:none"><font color=#063678>CREDITS</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="support.html" style="text-decoration:none"><font color=#063678>SUPPORT</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="sites.html" style="text-decoration:none"><font color=#063678>SITES USING</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="testimonials.html" style="text-decoration:none"><font color=#063678>TESTIMONIALS</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="resources.html" style="text-decoration:none"><font color=#063678>RESOURCES</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="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>
site/events.html view on Meta::CPAN
<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>EVENTS</b></font>
</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 >
<font face="lucida console" size=-1>
<a href=#Overview>Overview</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Script_OnPar383e5cdf>Script_OnParse</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Script_OnSta6a4cfa7f>Script_OnStart & Script_OnEnd</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Application_61345d1d>Application_OnStart</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Session_OnSt3cfacd72>Session_OnStart</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Application_4bca009c>Application_OnEnd</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Session_OnEne9575396>Session_OnEnd</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Server_OnSta0d174f59>Server_OnStart ( pseudo-event )</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Script_OnFludc73a8d8>Script_OnFlush</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#mod_perl%20han02da5c9c>mod_perl handlers</a>
</font>
</td>
</tr>
</table>
<hr size=1>
<p>
<p>
<a name=Overview></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Overview</b></font>
<font face="courier new" size=3><pre>
</pre></font>The ASP platform allows developers to create Web Applications.
In fulfillment of real software requirements, ASP allows
event-triggered actions to be taken, which are defined in
a global.asa file. The global.asa file resides in the
Global directory, defined as a config option, and may
define the following actions:
<font face="courier new" size=3><pre>
Action Event
------ ------
Script_OnStart * Beginning of Script execution
Script_OnEnd * End of Script execution
Script_OnFlush * Before $Response being flushed to client.
Script_OnParse * Before script compilation
Application_OnStart Beginning of Application
Application_OnEnd End of Application
Session_OnStart Beginning of user Session.
Session_OnEnd End of user Session.
* These are API extensions that are not portable, but were
added because they are incredibly useful
</pre></font>These actions must be defined in the $Global/global.asa file
as subroutines, for example:
<font face="courier new" size=3><pre>
sub Session_OnStart {
$Application->{$Session->SessionID()} = started;
}
</pre></font>Sessions are easy to understand. When visiting a page in a
web application, each user has one unique $Session. This
session expires, after which the user will have a new
$Session upon revisiting.
<font face="courier new" size=3><pre>
</pre></font>A web application starts when the user visits a page in that
application, and has a new $Session created. Right before
the first $Session is created, the $Application is created.
When the last user $Session expires, that $Application
expires also. For some web applications that are always busy,
the Application_OnEnd event may never occur.</font>
<p>
<a name=Script_OnSta6a4cfa7f></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Script_OnStart & Script_OnEnd</b></font>
<font face="courier new" size=3><pre>
</pre></font>The script events are used to run any code for all scripts
in an application defined by a global.asa. Often, you would
like to run the same code for every script, which you would
otherwise have to add by hand, or add with a file include,
but with these events, just add your code to the global.asa,
and it will be run.
<font face="courier new" size=3><pre>
</pre></font>There is one caveat. Code in Script_OnEnd is not guaranteed
to be run when $Response->End() is called, since the program
execution ends immediately at this event. To always run critical
code, use the API extension:
<font face="courier new" size=3><pre>
$Server->RegisterCleanup()
</pre></font>
<p>
<a name=Session_OnSt3cfacd72></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Session_OnStart</b></font>
<font face="courier new" size=3><pre>
</pre></font>Triggered by the beginning of a user's session, Session_OnStart
gets run before the user's executing script, and if the same
session recently timed out, after the session's triggered Session_OnEnd.
<font face="courier new" size=3><pre>
</pre></font>The Session_OnStart is particularly useful for caching database data,
and avoids having the caching handled by clumsy code inserted into
each script being executed.</font>
<p>
<a name=Session_OnEne9575396></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Session_OnEnd</b></font>
<font face="courier new" size=3><pre>
</pre></font>Triggered by a user session ending, Session_OnEnd can be useful
for cleaning up and analyzing user data accumulated during a session.
<font face="courier new" size=3><pre>
</pre></font>Sessions end when the session timeout expires, and the StateManager
performs session cleanup. The timing of the Session_OnEnd does not
occur immediately after the session times out, but when the first
script runs after the session expires, and the StateManager allows
for that session to be cleaned up.
<font face="courier new" size=3><pre>
</pre></font>So on a busy site with default SessionTimeout (20 minutes) and
StateManager (10 times) settings, the Session_OnEnd for a particular
session should be run near 22 minutes past the last activity that Session saw.
A site infrequently visited will only have the Session_OnEnd run
when a subsequent visit occurs, and theoretically the last session
of an application ever run will never have its Session_OnEnd run.
<font face="courier new" size=3><pre>
</pre></font>Thus I would not put anything mission-critical in the Session_OnEnd,
just stuff that would be nice to run whenever it gets run.</font>
<p>
<a name=Script_OnFludc73a8d8></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Script_OnFlush</b></font>
<font face="courier new" size=3><pre>
</pre></font>API extension. This event will be called prior to flushing
the $Response buffer to the web client. At this time,
the $Response->{BinaryRef} buffer reference may be used to modify
the buffered output at runtime to apply global changes to scripts
output without having to modify all the scripts.
<font face="courier new" size=3><pre>
sub Script_OnFlush {
my $ref = $Response->{BinaryRef};
$$ref =~ s/\s+/ /sg; # to strip extra white space
}
</pre></font>Check out the <a href=eg/global.asa>./site/eg/global.asa</a> for an example of its use.</font>
<p>
<a name=Script_OnPar383e5cdf></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Script_OnParse</b></font>
<font face="courier new" size=3><pre>
</pre></font>This event allows one to set up a source filter on the script text,
allowing one to change the script on the fly before the compilation
stage occurs. The script text is available in the $Server->{ScriptRef}
scalar reference, and can be accessed like so:
<font face="courier new" size=3><pre>
sub Script_OnParse {
my $code = $Server->{ScriptRef}
$$code .= " ADDED SOMETHING ";
}
</pre></font>
<p>
<a name=Application_61345d1d></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Application_OnStart</b></font>
<font face="courier new" size=3><pre>
</pre></font>This event marks the beginning of an ASP application, and
is run just before the Session_OnStart of the first Session
of an application. This event is useful to load up
$Application with data that will be used in all user sessions.</font>
<p>
<a name=Application_4bca009c></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Application_OnEnd</b></font>
<font face="courier new" size=3><pre>
</pre></font>The end of the application is marked by this event, which
is run after the last user session has timed out for a
given ASP application.</font>
<p>
<a name=Server_OnSta0d174f59></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Server_OnStart ( pseudo-event )</b></font>
<font face="courier new" size=3><pre>
</pre></font>Some might want something like a Server_OnStart event, where
some code gets runs when the web server starts. In <a href=http://perl.apache.org><font size=-1 face=verdana><b>mod_perl</b></font></a>,
this is easy to achieve outside of the scope of an ASP
application, by putting some initialization code into
a <Perl> section in the httpd.conf file. Initializations
that you would like to be shared with the child httpds are
particularly useful, one such being the Apache::ASP->Loader()
routine which you can read more about in the <a href=tuning.html><font size=-1 face=verdana><b>TUNING</b></font></a> section -
Precompile Scripts subsection. It is could be called like:
<font face="courier new" size=3><pre>
# httpd.conf
<Perl>
Apache::ASP->Loader($path, $pattern, %config)
</Perl>
</pre></font>So a <Perl> section is your Server_OnStart routine!</font>
<p>
<a name=mod_perl%20han02da5c9c></a>
<font face=verdana><font class=title size=+0 color=#555555><b>mod_perl handlers</b></font>
<font face="courier new" size=3><pre>
</pre></font>If one wants to extend one's environment with <a href=http://perl.apache.org><font size=-1 face=verdana><b>mod_perl</b></font></a>
handlers, Apache::ASP does not stop this. Basic
use of Apache::ASP in fact only involves the content
handler phase of mod_perl's PerlHandler, like
<font face="courier new" size=3><pre>
SetHandler perl-script
PerlModule Apache::ASP
PerlHandler Apache::ASP
</pre></font>But mod_perl allows for direct access to many more
Apache event stages, for full list try "perldoc mod_perl"
or buy the mod_perl Eagle book. Some commonly used ones are:
<font face="courier new" size=3><pre>
PerlInitHandler
PerlTransHandler
PerlFixupHandler
PerlHandler
PerlLogHandler
PerlCleanupHandler
</pre></font>For straight Apache::ASP programming, there are some
equivalents, say Script_OnStart event instead of Init/Fixup
stages, or $Server->RegisterCleanup() for Log/Cleanup stages,
but you can do things in the mod_perl handlers that you
cannot do in Apache::ASP, especially if you want to handle
all files globally, and not just ASP scripts.
<font face="courier new" size=3><pre>
</pre></font>For many Apache::* modules for use with mod_perl, of which
Apache::ASP is just one, check out
<a href=http://perl.apache.org/src/apache-modlist.html>http://perl.apache.org/src/apache-modlist.html</a>
<font face="courier new" size=3><pre>
</pre></font>To gain access to the ASP objects like $Session outside
in a non-PerlHandler mod_perl handler, you may use this API:
<font face="courier new" size=3><pre>
my $ASP = Apache::ASP->new($r); # $r is Apache->request object
</pre></font>as in this possible Authen handler:
<font face="courier new" size=3><pre>
<Perl>
use Apache::ASP;
sub My::Auth::handler {
my $r = shift;
my $ASP = Apache::ASP->new($r)
my $Session = $ASP->Session;
}
</Perl>
</pre></font>Here are some examples of do-it-yourself mod_perl
handler programming...
<font face="courier new" size=3><pre>
=== Forbid Bad HSlide User Agent ===
# httpd.conf
PerlAccessHandler My::Access
<Perl>
sub My::Access::handler {
my $r = shift;
if($r->headers_in->{'USER_AGENT'} =~ /HSlide/) {
403;
} else {
200;
}
}
</Perl>
=== Runtime Path Parsing ===
</pre></font>This example shows how one might take an arbitrary
URL path /$path/$file.asp, and turn that into a runtime
config for your site, so your scripts get executed
always in your sites DocumentRoot.
<font face="courier new" size=3><pre>
INPUT URL /SomeCategory/
OUTPUT
Script: index.asp
$Server->Config('PATH') eq '/SomeCategory'
INPUT URL /SomeCategory/index.asp
OUTPUT
Script: index.asp
$Server->Config('PATH') eq '/SomeCategory'
site/events.html view on Meta::CPAN
$uri = '/index.asp';
}
$r->uri($uri);
$r->filename($r->document_root.$uri);
DECLINED;
}
1;
</pre></font>
</font>
</td>
<td bgcolor=white valign=top>
</td>
</tr>
</table>
</td></tr>
site/faq.html view on Meta::CPAN
<html>
<head>
<title>Apache::ASP::Faq</title>
<style type="text/css">
<!--
td { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px}
font { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px}
.title { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 16px}
-->
</style>
</head>
<body bgcolor=black link=#063678 alink=#ff5599 vlink=#993399
marginheight=0 marginwidth=0 leftMargin=0 topMargin=0>
site/faq.html view on Meta::CPAN
<td align=right></td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor=#005196 align=center>
<b>
<font color=#ffffff><% Web Applications with Apache & mod_perl %></font>
</b>
</td>
</tr>
</table>
<table border=0 cellpadding=10 cellspacing=0 width=100% bgcolor=#005196>
<tr>
<td valign=top width=120 bgcolor=#005196>
<table cellpadding=5 cellspacing=0 border=1 bgcolor=white><tr><td>
<table border=0 cellpadding=0 cellspacing=0 width=105 bgcolor=white>
<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="index.html" style="text-decoration:none"><font color=#063678>INTRO</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="install.html" style="text-decoration:none"><font color=#063678>INSTALL</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="config.html" style="text-decoration:none"><font color=#063678>CONFIG</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="syntax.html" style="text-decoration:none"><font color=#063678>SYNTAX</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="events.html" style="text-decoration:none"><font color=#063678>EVENTS</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="objects.html" style="text-decoration:none"><font color=#063678>OBJECTS</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="ssi.html" style="text-decoration:none"><font color=#063678>SSI</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="sessions.html" style="text-decoration:none"><font color=#063678>SESSIONS</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="xml.html" style="text-decoration:none"><font color=#063678>XML/XSLT</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="cgi.html" style="text-decoration:none"><font color=#063678>CGI</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="perlscript.html" style="text-decoration:none"><font color=#063678>PERLSCRIPT</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="style.html" style="text-decoration:none"><font color=#063678>STYLE GUIDE</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><font color=#993399>FAQ</font></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="tuning.html" style="text-decoration:none"><font color=#063678>TUNING</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="kudos.html" style="text-decoration:none"><font color=#063678>CREDITS</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="support.html" style="text-decoration:none"><font color=#063678>SUPPORT</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="sites.html" style="text-decoration:none"><font color=#063678>SITES USING</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="testimonials.html" style="text-decoration:none"><font color=#063678>TESTIMONIALS</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="resources.html" style="text-decoration:none"><font color=#063678>RESOURCES</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="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>
site/faq.html view on Meta::CPAN
<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>FAQ</b></font>
<font face="courier new" size=3><pre>
</pre></font>The following are some frequently asked questions
about Apache::ASP.</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=#Installation><font color=white>Installation</font></a></b></font>
</font>
</td>
<td valign=top bgcolor=#005196>
<font face="lucida console" size=-1>
<font color=white><b><a href=#Development><font color=white>Development</font></a></b></font>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Examples%20donf48a0968>Examples don't work, I see the ASP script in the browser?</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#VBScript%20or%20d51ff480>VBScript or JScript supported?</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Apache%20Expat3f8589db>Apache Expat vs. XML perl parsing causing segfaults, what do I do?</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#How%20is%20datab66fe735a>How is database connectivity handled?</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Why%20do%20varia68e97184>Why do variables retain their values between requests?</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#What%20is%20the%20ffd599fa>What is the best way to debug an ASP application ?</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Apache%20errorf0bcd572>Apache errors on the PerlHandler or PerlModule directives ?</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#How%20are%20file3e89fb5c>How are file uploads handled?</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Error%3A%20no%20reb1d13fcf>Error: no request object (Apache=SCALAR(0x???????):)</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#How%20do%20I%20acc6523fd95>How do I access the ASP Objects in general?</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#I%20am%20getting272ca0df>I am getting a tie or MLDBM / state error message, what do I do?</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Can%20I%20print%2874ba394b>Can I print() in ASP?</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=#Do%20I%20have%20aca178cfb4>Do I have access to ActiveX objects?</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>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#How%20can%20I%20us65e9eed9>How can I use $Session to store complex data structures.</a>
</font>
</td>
<td valign=top bgcolor=#005196>
<font face="lucida console" size=-1>
<font color=white><b><a href=#Support%20and%20b4365dac><font color=white>Support and Production</font></a></b></font>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#How%20can%20I%20ke601a6c31>How can I keep search engine spiders from killing the session manager?</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#How%20do%20I%20get45b324ef>How do I get things I want done?!</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#How%20can%20I%20us50054dc6>How can I use $Session to store a $dbh database handle ?</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#What%20is%20the%20bd2800a9>What is the state of Apache::ASP? Can I publish a web site on it?</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
</font>
</td>
<td> </td>
</tr>
</table>
<hr size=1>
<p>
<p>
<a name=Installation></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Installation</b></font>
</font>
<p>
<a name=Examples%20donf48a0968></a>
<font face=verdana><font class=title size=-1 color=#555555><b>Examples don't work, I see the ASP script in the browser?</b></font>
<font face="courier new" size=3><pre>
</pre></font>This is most likely that Apache is not configured to execute
the Apache::ASP scripts properly. Check the <a href=install.html><font size=-1 face=verdana><b>INSTALL</b></font></a> QuickStart
section for more info on how to quickly set up Apache to
execute your ASP scripts.</font>
<p>
<a name=Apache%20Expat3f8589db></a>
<font face=verdana><font class=title size=-1 color=#555555><b>Apache Expat vs. XML perl parsing causing segfaults, what do I do?</b></font>
<font face="courier new" size=3><pre>
</pre></font>Make sure to compile apache with expat disabled. The
./make_httpd/build_httpds.sh in the distribution will do
this for you, with the --disable-rule=EXPAT in particular:
<font face="courier new" size=3><pre>
cd ../$APACHE
echo "Building apache =============================="
./configure \
--prefix=/usr/local/apache \
--activate-module=src/modules/perl/libperl.a \
--enable-module=ssl \
--enable-module=proxy \
--enable-module=so \
--disable-rule=EXPAT
^^^^^
</pre></font>keywords: segmentation fault, segfault seg fault</font>
<p>
<a name=Why%20do%20varia68e97184></a>
<font face=verdana><font class=title size=-1 color=#555555><b>Why do variables retain their values between requests?</b></font>
<font face="courier new" size=3><pre>
</pre></font>Unless scoped by my() or local(), perl variables in <a href=http://perl.apache.org><font size=-1 face=verdana><b>mod_perl</b></font></a>
are treated as globals, and values set may persist from one
request to another. This can be seen in as simple a script
as this:
<font face="courier new" size=3><pre>
<HTML><BODY>
$counter++;
$Response->Write("<BR>Counter: $counter");
</BODY></HTML>
</pre></font>The value for $counter++ will remain between requests.
Generally use of globals in this way is a BAD IDEA,
and you can spare yourself many headaches if do
"use strict" perl programming which forces you to
explicity declare globals like:
<font face="courier new" size=3><pre>
use vars qw($counter);
</pre></font>You can make all your Apache::ASP scripts strict by
default by setting:
<font face="courier new" size=3><pre>
PerlSetVar UseStrict 1
</pre></font>
<p>
<a name=Apache%20errorf0bcd572></a>
<font face=verdana><font class=title size=-1 color=#555555><b>Apache errors on the PerlHandler or PerlModule directives ?</b></font>
<font face="courier new" size=3><pre>
</pre></font>You get an error message like this:
<font face="courier new" size=3><pre>
Invalid command 'PerlModule', perhaps mis-spelled or defined by a
module not included in the server configuration.
</pre></font>You do not have <a href=http://perl.apache.org><font size=-1 face=verdana><b>mod_perl</b></font></a> correctly installed for Apache. The PerlHandler
and PerlModule directives in Apache *.conf files are extensions enabled by mod_perl
and will not work if mod_perl is not correctly installed.
<font face="courier new" size=3><pre>
</pre></font>Common user errors are not doing a 'make install' for mod_perl, which
installs the perl side of mod_perl, and not starting the right httpd
after building it. The latter often occurs when you have an old apache
server without mod_perl, and you have built a new one without copying
over to its proper location.
<font face="courier new" size=3><pre>
</pre></font>To get mod_perl, go to <a href=http://perl.apache.org>http://perl.apache.org</a></font>
<p>
<a name=Error%3A%20no%20reb1d13fcf></a>
<font face=verdana><font class=title size=-1 color=#555555><b>Error: no request object (Apache=SCALAR(0x???????):)</b></font>
<font face="courier new" size=3><pre>
</pre></font>Your Apache + <a href=http://perl.apache.org><font size=-1 face=verdana><b>mod_perl</b></font></a> build is not working properly,
and is likely a RedHat Linux RPM DSO build. Make sure
you statically build your Apache + mod_perl httpd,
recompiled fresh from the sources.</font>
<p>
<a name=I%20am%20getting272ca0df></a>
<font face=verdana><font class=title size=-1 color=#555555><b>I am getting a tie or MLDBM / state error message, what do I do?</b></font>
<font face="courier new" size=3><pre>
</pre></font>Make sure the web server or you have write access to the eg directory,
or to the directory specified as Global in the config you are using.
Default for Global is the directory the script is in (e.g. '.'), but should
be set to some directory not under the www server document root,
for security reasons, on a production site.
<font face="courier new" size=3><pre>
</pre></font>Usually a
<font face="courier new" size=3><pre>
chmod -R -0777 eg
</pre></font>will take care of the write access issue for initial testing purposes.
<font face="courier new" size=3><pre>
</pre></font>Failing write access being the problem, try upgrading your version
of Data::Dumper and MLDBM, which are the modules used to write the
state files.</font>
<p>
<a name=Sessions></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Sessions</b></font>
</font>
<p>
<a name=How%20can%20I%20us65e9eed9></a>
<font face=verdana><font class=title size=-1 color=#555555><b>How can I use $Session to store complex data structures.</b></font>
<font face="courier new" size=3><pre>
</pre></font>Very carefully. Please read the $Session documentation in
the <a href=objects.html><font size=-1 face=verdana><b>OBJECTS</b></font></a> section. You can store very complex objects
in $Session, but you have to understand the limits, and
the syntax that must be used to make this happen.
<font face="courier new" size=3><pre>
</pre></font>In particular, stay away from statements that that have
more than one level of indirection on the left side of
an assignment like:
<font face="courier new" size=3><pre>
BAD: $Session->{complex}{object} = $data;
</pre></font>
<p>
<a name=How%20can%20I%20ke601a6c31></a>
<font face=verdana><font class=title size=-1 color=#555555><b>How can I keep search engine spiders from killing the session manager?</b></font>
<font face="courier new" size=3><pre>
</pre></font>If you want to disallow session creation for certain non web
browser user agents, like search engine spiders, you can use a <a href=http://perl.apache.org><font size=-1 face=verdana><b>mod_perl</b></font></a>
PerlInitHandler like this to set configuration variables at runtime:
<font face="courier new" size=3><pre>
# put the following code into httpd.conf and stop/start apache server
PerlInitHandler My::InitHandler
<Perl>
package My::InitHandler;
use Apache;
sub handler {
my $r = shift; # get the Apache request object
site/faq.html view on Meta::CPAN
unless($r->headers_in('User-Agent') =~ /^Mozilla/) {
$r->dir_config('AllowSessionState', 'Off');
}
return 200; # return OK mod_perl status code
}
1;
</Perl>
</pre></font>This will configure your environment before Apache::ASP executes
and sees the configuration settings. You can use the mod_perl
API in this way to configure Apache::ASP at runtime.
<font face="courier new" size=3><pre>
</pre></font>Note that the Session Manager is very robust on its own, and denial
of service attacks of the types that spiders and other web bots
normally execute are not likely to affect the Session Manager significantly.</font>
<p>
<a name=How%20can%20I%20us50054dc6></a>
<font face=verdana><font class=title size=-1 color=#555555><b>How can I use $Session to store a $dbh database handle ?</b></font>
<font face="courier new" size=3><pre>
</pre></font>You cannot use $Session to store a $dbh handle. This can
be awkward for those coming from the IIS/NT world, where
you could store just about anything in $Session, but this
boils down to a difference between threads vs. processes.
<font face="courier new" size=3><pre>
</pre></font>Database handles often have per process file handles open,
which cannot be shared between requests, so though you
have stored the $dbh data in $Session, all the other
initializations are not relevant in another httpd process.
<font face="courier new" size=3><pre>
</pre></font>All is not lost! Apache::DBI can be used to cache
database connections on a per process basis, and will
work for most cases.</font>
<p>
<a name=Development></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Development</b></font>
</font>
<p>
<a name=VBScript%20or%20d51ff480></a>
<font face=verdana><font class=title size=-1 color=#555555><b>VBScript or JScript supported?</b></font>
<font face="courier new" size=3><pre>
</pre></font>Only Perl scripting is supported with this module.</font>
<p>
<a name=How%20is%20datab66fe735a></a>
<font face=verdana><font class=title size=-1 color=#555555><b>How is database connectivity handled?</b></font>
<font face="courier new" size=3><pre>
</pre></font>Database connectivity is handled through perl's DBI & DBD interfaces.
In the UNIX world, it seems most databases have cross platform support in perl.
You can find the book on DBI programming at <a href=http://www.oreilly.com/catalog/perldbi/>http://www.oreilly.com/catalog/perldbi/</a>
<font face="courier new" size=3><pre>
</pre></font>DBD::ODBC is often your ticket on Win32. On UNIX, commercial vendors
like OpenLink Software (<a href=http://www.openlinksw.com/>http://www.openlinksw.com/</a>) provide the nuts and
bolts for ODBC.
<font face="courier new" size=3><pre>
</pre></font>Database connections can be cached per process with Apache::DBI.</font>
<p>
<a name=What%20is%20the%20ffd599fa></a>
<font face=verdana><font class=title size=-1 color=#555555><b>What is the best way to debug an ASP application ?</b></font>
<font face="courier new" size=3><pre>
</pre></font>There are lots of perl-ish tricks to make your life developing
and debugging an ASP application easier. For starters,
you will find some helpful hints by reading the
$Response->Debug() API extension, and the Debug
configuration directive.</font>
<p>
<a name=How%20are%20file3e89fb5c></a>
<font face=verdana><font class=title size=-1 color=#555555><b>How are file uploads handled?</b></font>
<font face="courier new" size=3><pre>
</pre></font>Please see the <a href=cgi.html><font size=-1 face=verdana><b>CGI</b></font></a> section. File uploads are implemented
through <a href=http://stein.cshl.org/WWW/software/CGI/cgi_docs.html><font size=-1 face=verdana><b>CGI.pm</b></font></a> which is loaded at runtime only for this purpose.
This is the only time that CGI.pm will be loaded by Apache::ASP,
which implements all other cgi-ish functionality natively. The
rationale for not implementing file uploads natively is that
the extra 100K in memory for CGI.pm shouldn't be a big deal if you
are working with bulky file uploads.</font>
<p>
<a name=How%20do%20I%20acc6523fd95></a>
<font face=verdana><font class=title size=-1 color=#555555><b>How do I access the ASP Objects in general?</b></font>
<font face="courier new" size=3><pre>
</pre></font>All the ASP objects can be referenced through the main package with
the following notation:
<font face="courier new" size=3><pre>
$main::Response->Write("html output");
</pre></font>This notation can be used from anywhere in perl, including routines
registered with $Server->RegisterCleanup().
<font face="courier new" size=3><pre>
</pre></font>You use the normal notation in your scripts, includes, and global.asa:
<font face="courier new" size=3><pre>
$Response->Write("html output");
</pre></font>
<p>
<a name=Can%20I%20print%2874ba394b></a>
<font face=verdana><font class=title size=-1 color=#555555><b>Can I print() in ASP?</b></font>
<font face="courier new" size=3><pre>
</pre></font>Yes. You can print() from anywhere in an ASP script as it aliases
to the $Response->Write() method. Using print() is portable with
<a href=http://www.activestate.com/ActivePerl/><font size=-1 face=verdana><b>PerlScript</b></font></a> when using Win32::ASP in that environment.</font>
<p>
<a name=Do%20I%20have%20aca178cfb4></a>
<font face=verdana><font class=title size=-1 color=#555555><b>Do I have access to ActiveX objects?</b></font>
<font face="courier new" size=3><pre>
</pre></font>Only under Win32 will developers have access to ActiveX objects through
the perl Win32::OLE interface. This will remain true until there
are free COM ports to the UNIX world. At this time, there is no ActiveX
for the UNIX world.</font>
<p>
<a name=Support%20and%20b4365dac></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Support and Production</b></font>
</font>
<p>
<a name=How%20do%20I%20get45b324ef></a>
<font face=verdana><font class=title size=-1 color=#555555><b>How do I get things I want done?!</b></font>
<font face="courier new" size=3><pre>
</pre></font>If you find a problem with the module, or would like a feature added,
please mail support, as listed in the <a href=support.html><font size=-1 face=verdana><b>SUPPORT</b></font></a> section, and your
needs will be promptly and seriously considered, then implemented.</font>
<p>
<a name=What%20is%20the%20bd2800a9></a>
<font face=verdana><font class=title size=-1 color=#555555><b>What is the state of Apache::ASP? Can I publish a web site on it?</b></font>
<font face="courier new" size=3><pre>
</pre></font>Apache::ASP has been production ready since v.02. Work being done
on the module is on a per need basis, with the goal being to eventually
have the ASP API completed, with full portability to ActiveState <a href=http://www.activestate.com/ActivePerl/><font size=-1 face=verdana><b>PerlScript</b></font></a>
and MKS PScript. If you can suggest any changes to facilitate these
goals, your comments are welcome.</font>
</font>
</td>
<td bgcolor=white valign=top>
</td>
</tr>
</table>
</td></tr>
site/index.html view on Meta::CPAN
Apache::ASP provides an Active Server Pages port to the
Apache Web Server with Perl scripting only, and enables developing
of dynamic web applications
with session management and embedded Perl code. There are also
many powerful extensions, including XML taglibs, XSLT rendering,
and new events not originally part of the ASP API!">
<style type="text/css">
<!--
td { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px}
font { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px}
.title { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 16px}
-->
</style>
</head>
<body bgcolor=black link=#063678 alink=#ff5599 vlink=#993399
marginheight=0 marginwidth=0 leftMargin=0 topMargin=0>
site/index.html view on Meta::CPAN
<td align=right></td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor=#005196 align=center>
<b>
<font color=#ffffff><% Web Applications with Apache & mod_perl %></font>
</b>
</td>
</tr>
</table>
<table border=0 cellpadding=10 cellspacing=0 width=100% bgcolor=#005196>
<tr>
<td valign=top width=120 bgcolor=#005196>
<table cellpadding=5 cellspacing=0 border=1 bgcolor=white><tr><td>
<table border=0 cellpadding=0 cellspacing=0 width=105 bgcolor=white>
<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><font color=#993399>INTRO</font></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="install.html" style="text-decoration:none"><font color=#063678>INSTALL</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="config.html" style="text-decoration:none"><font color=#063678>CONFIG</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="syntax.html" style="text-decoration:none"><font color=#063678>SYNTAX</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="events.html" style="text-decoration:none"><font color=#063678>EVENTS</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="objects.html" style="text-decoration:none"><font color=#063678>OBJECTS</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="ssi.html" style="text-decoration:none"><font color=#063678>SSI</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="sessions.html" style="text-decoration:none"><font color=#063678>SESSIONS</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="xml.html" style="text-decoration:none"><font color=#063678>XML/XSLT</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="cgi.html" style="text-decoration:none"><font color=#063678>CGI</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="perlscript.html" style="text-decoration:none"><font color=#063678>PERLSCRIPT</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="style.html" style="text-decoration:none"><font color=#063678>STYLE GUIDE</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="faq.html" style="text-decoration:none"><font color=#063678>FAQ</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="tuning.html" style="text-decoration:none"><font color=#063678>TUNING</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="kudos.html" style="text-decoration:none"><font color=#063678>CREDITS</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="support.html" style="text-decoration:none"><font color=#063678>SUPPORT</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="sites.html" style="text-decoration:none"><font color=#063678>SITES USING</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="testimonials.html" style="text-decoration:none"><font color=#063678>TESTIMONIALS</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="resources.html" style="text-decoration:none"><font color=#063678>RESOURCES</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="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>
site/index.html view on Meta::CPAN
<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>INTRO</b></font>
<font face="courier new" size=3><pre>
</pre></font>Apache::ASP provides an Active Server Pages port to the
Apache Web Server with Perl scripting only, and enables developing
of dynamic web applications
with session management and embedded Perl code. There are also
many powerful extensions, including XML taglibs, XSLT rendering,
and new events not originally part of the ASP API!
<font face="courier new" size=3><pre>
</pre></font><table class="noescape" border="0"><tr><td>
<b>Apache::ASP's features include:</b>
<font face=verdana,helvetica,arial size=-1>
<ul>
<li> Scripting <a href=syntax.html><font size=-1 face=verdana><b>SYNTAX</b></font></a> is Natural and Powerful
<li> Rich <a href=objects.html><font size=-1 face=verdana><b>OBJECTS</b></font></a> Developer API
<li> Web Application <a href=events.html><font size=-1 face=verdana><b>EVENTS</b></font></a> Model
<li> Modular <a href=ssi.html><font size=-1 face=verdana><b>SSI</b></font></a> Decomposition, Code Sharing
<li> User <a href=sessions.html><font size=-1 face=verdana><b>SESSIONS</b></font></a>, CIFS & NFS Cluster Ready
<li> <a href=xml.html><font size=-1 face=verdana><b>XML/XSLT</b></font></a> Rendering & Custom Tag Technology
<li> <a href=cgi.html><font size=-1 face=verdana><b>CGI</b></font></a> Compatibility
<li> <a href=perlscript.html><font size=-1 face=verdana><b>PERLSCRIPT</b></font></a> Compatibility
<li> Great Open Source <a href=support.html><font size=-1 face=verdana><b>SUPPORT</b></font></a>
</ul>
</font>
</table>
<font face="courier new" size=3><pre>
</pre></font>This module works under the Apache Web Server
with the <a href=http://perl.apache.org><font size=-1 face=verdana><b>mod_perl</b></font></a> module enabled. See <a href=http://www.apache.org>http://www.apache.org</a> and
<a href=http://perl.apache.org>http://perl.apache.org</a> for further information.
<font face="courier new" size=3><pre>
</pre></font>This is a portable solution, similar to ActiveState's <a href=http://www.activestate.com/ActivePerl/><font size=-1 face=verdana><b>PerlScript</b></font></a>
for <a href=http://www.microsoft.com/iis/><font size=-1 face=verdana><b>NT/IIS</b></font></a> ASP. Work has been done and will continue to make ports
to and from this implementation as smooth as possible.
<font face="courier new" size=3><pre>
</pre></font>For Apache::ASP downloading and installation, please read
the <a href=install.html><font size=-1 face=verdana><b>INSTALL</b></font></a> section. For installation troubleshooting
check the <a href=faq.html><font size=-1 face=verdana><b>FAQ</b></font></a> and the SUPPORT sections.
<font face="courier new" size=3><pre>
</pre></font>For database access, ActiveX, scripting languages, and other
miscellaneous issues please read the FAQ section.</font>
</font>
</td>
<td bgcolor=white valign=top>
<!-- index_extra.inc -->
</td>
site/install.html view on Meta::CPAN
<html>
<head>
<title>Apache::ASP::Install</title>
<style type="text/css">
<!--
td { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px}
font { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px}
.title { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 16px}
-->
</style>
</head>
<body bgcolor=black link=#063678 alink=#ff5599 vlink=#993399
marginheight=0 marginwidth=0 leftMargin=0 topMargin=0>
site/install.html view on Meta::CPAN
<td align=right></td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor=#005196 align=center>
<b>
<font color=#ffffff><% Web Applications with Apache & mod_perl %></font>
</b>
</td>
</tr>
</table>
<table border=0 cellpadding=10 cellspacing=0 width=100% bgcolor=#005196>
<tr>
<td valign=top width=120 bgcolor=#005196>
<table cellpadding=5 cellspacing=0 border=1 bgcolor=white><tr><td>
<table border=0 cellpadding=0 cellspacing=0 width=105 bgcolor=white>
<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="index.html" style="text-decoration:none"><font color=#063678>INTRO</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><font color=#993399>INSTALL</font></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="config.html" style="text-decoration:none"><font color=#063678>CONFIG</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="syntax.html" style="text-decoration:none"><font color=#063678>SYNTAX</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="events.html" style="text-decoration:none"><font color=#063678>EVENTS</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="objects.html" style="text-decoration:none"><font color=#063678>OBJECTS</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="ssi.html" style="text-decoration:none"><font color=#063678>SSI</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="sessions.html" style="text-decoration:none"><font color=#063678>SESSIONS</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="xml.html" style="text-decoration:none"><font color=#063678>XML/XSLT</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="cgi.html" style="text-decoration:none"><font color=#063678>CGI</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="perlscript.html" style="text-decoration:none"><font color=#063678>PERLSCRIPT</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="style.html" style="text-decoration:none"><font color=#063678>STYLE GUIDE</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="faq.html" style="text-decoration:none"><font color=#063678>FAQ</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="tuning.html" style="text-decoration:none"><font color=#063678>TUNING</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="kudos.html" style="text-decoration:none"><font color=#063678>CREDITS</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="support.html" style="text-decoration:none"><font color=#063678>SUPPORT</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="sites.html" style="text-decoration:none"><font color=#063678>SITES USING</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="testimonials.html" style="text-decoration:none"><font color=#063678>TESTIMONIALS</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="resources.html" style="text-decoration:none"><font color=#063678>RESOURCES</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="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>
site/install.html view on Meta::CPAN
<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>INSTALL</b></font>
<font face="courier new" size=3><pre>
</pre></font>The installation process for Apache::ASP is geared towards those
with experience with Perl, Apache, and unix systems. For those
without this experience, please understand that the learning curve
can be significant. But what you have at the end will be a web site
running on superior open source software.
<font face="courier new" size=3><pre>
</pre></font>If installing onto a Windows operating system, please see the section
titled Win32 Install.</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 >
<font face="lucida console" size=-1>
<a href=#Need%20Help>Need Help</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Quick%20Start>Quick Start</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Download%20andf39a0410>Download and CPAN Install</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Build%20static4ba3b0e9>Build static Apache and mod_perl for Apache 1.3.x</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Regular%20Perlec959bce>Regular Perl Module Install</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Win32%20%2F%20Wind0f21256e>Win32 / Windows Install</a>
</font>
</td>
</tr>
<tr>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#Modern%20Linuxee8c6645>Modern Linux Distributions</a>
</font>
</td>
<td valign=top >
<font face="lucida console" size=-1>
<a href=#WinME%20%2F%2098%20%2Fce25d199>WinME / 98 / 95 flock() workaround</a>
</font>
</td>
</tr>
</table>
<hr size=1>
<p>
<p>
<a name=Need%20Help></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Need Help</b></font>
<font face="courier new" size=3><pre>
</pre></font>Often, installing the <a href=http://perl.apache.org><font size=-1 face=verdana><b>mod_perl</b></font></a> part of the Apache server
can be the hardest part. If this is the case for you,
check out the <a href=faq.html><font size=-1 face=verdana><b>FAQ</b></font></a> and SUPPORT sections for further help,
as well as the "Modern Linux Distributions" notes in this section.
<font face="courier new" size=3><pre>
</pre></font>Please also see the mod_perl site at <a href=http://perl.apache.org/>http://perl.apache.org/</a>
which one ought to give a good read before undertaking
a mod_perl project.</font>
<p>
<a name=Download%20andf39a0410></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Download and CPAN Install</b></font>
<font face="courier new" size=3><pre>
</pre></font>You may download the latest Apache::ASP from your nearest CPAN,
and also:
<font face="courier new" size=3><pre>
<a href=http://search.cpan.org/dist/Apache-ASP/>http://search.cpan.org/dist/Apache-ASP/</a>
<a href=http://cpan.org/modules/by-module/Apache/>http://cpan.org/modules/by-module/Apache/</a>
</pre></font>As a Perl developer, you should make yourself familiar with
the CPAN.pm module, and how it may be used to install
Apache::ASP, and other related modules. The easiest way
to install Apache::ASP for the first time from Perl is to
fire up the CPAN shell like:
<font face="courier new" size=3><pre>
shell prompt> perl -MCPAN -e shell
... configure CPAN ...
... then upgrade to latest CPAN ...
cpan> install CPAN
...
cpan> install Bundle::Apache::ASP
</pre></font>Installing the Apache::ASP bundle will automatically install
all the modules Apache::ASP is dependent on as well as
Apache::ASP itself. If you have trouble installing the bundle,
then try installing the necessary modules one at a time:
<font face="courier new" size=3><pre>
cpan> install MLDBM
cpan> install MLDBM::Sync
cpan> install Digest::MD5 *** may not be needed for perl 5.8+ ***
cpan> install Apache::ASP
</pre></font>For extra/optional functionality in Apache::ASP 2.31 or greater, like
support for FormFill, XSLT, or <a href=ssi.html><font size=-1 face=verdana><b>SSI</b></font></a>, you can install this bundle via CPAN:
<font face="courier new" size=3><pre>
cpan> install Bundle::Apache::ASP::Extra
</pre></font>
<p>
<a name=Regular%20Perlec959bce></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Regular Perl Module Install</b></font>
<font face="courier new" size=3><pre>
</pre></font>If not doing the CPAN install, download Apache::ASP and install it using
the make or nmake commands as shown below. Otherwise, just
copy ASP.pm to $PERLLIB/site/Apache
<font face="courier new" size=3><pre>
> perl Makefile.PL
> make
> make test
> make install
* use nmake for win32
</pre></font>Please note that you must first have the Apache Web Server
& <a href=http://perl.apache.org><font size=-1 face=verdana><b>mod_perl</b></font></a> installed before using this module in a web server
environment. The offline mode for building static html at
./cgi/asp-perl may be used with just perl.</font>
<p>
<a name=Modern%20Linuxee8c6645></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Modern Linux Distributions</b></font>
<font face="courier new" size=3><pre>
</pre></font>If you have a modern Linux distribution like CentOS or Ubuntu,
you will likely have the easiest path by using the repository tools to
automatically install <a href=http://perl.apache.org><font size=-1 face=verdana><b>mod_perl</b></font></a> and Apache before installing Apache::ASP via CPAN.
<font face="courier new" size=3><pre>
</pre></font>For example for CentOS, this will install mod_perl into your apache httpd, the latter
likely being installed already by default on your server:
<font face="courier new" size=3><pre>
bash> sudo yum install mod_perl-devel.x86_64
</pre></font>For Ubuntu this would be done like this:
<font face="courier new" size=3><pre>
bash> sudo apt-get install libapache2-mod-perl2
</pre></font>
<p>
<a name=Quick%20Start></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Quick Start</b></font>
<font face="courier new" size=3><pre>
</pre></font>Once you have successfully built the Apache Web Server with <a href=http://perl.apache.org><font size=-1 face=verdana><b>mod_perl</b></font></a>,
copy the ./site/eg/ directory from the Apache::ASP installation
to your Apache document tree and try it out! You must put "AllowOverride All"
in your httpd.conf <Directory> config section to let the .htaccess file in the
./site/eg installation directory do its work. If you want a starter
config file for Apache::ASP, just look at the .htaccess file in the
./site/eg/ directory.
<font face="courier new" size=3><pre>
</pre></font>So, you might add this to your Apache httpd.conf file just to get
the scripts in ./site/eg working, where $DOCUMENT_ROOT represents
the DocumentRoot config for your apache server:
<font face="courier new" size=3><pre>
<Directory $DOCUMENT_ROOT/asp/eg >
Options FollowSymLinks
AllowOverride All
</Directory>
</pre></font>To copy the entire site, including the examples, you might
do a raw directory copy as in:
<font face="courier new" size=3><pre>
shell> cp -rpd ./site $DOCUMENT_ROOT/asp
</pre></font>So you could then reference the Apache::ASP docs at /asp/ at your site,
and the examples at /asp/eg/ .
<font face="courier new" size=3><pre>
</pre></font>This is not a good production configuration, because it is insecure
with the FollowSymLinks, and tells Apache to look for .htaccess
which is bad for performance but it should be handy for getting
started with development.
<font face="courier new" size=3><pre>
</pre></font>You will know that Apache::ASP is working normally if you
can run the scripts in ./site/eg/ without any errors. Common
problems can be found in the <a href=faq.html><font size=-1 face=verdana><b>FAQ</b></font></a> section.</font>
<p>
<a name=Build%20static4ba3b0e9></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Build static Apache and mod_perl for Apache 1.3.x</b></font>
<font face="courier new" size=3><pre>
</pre></font>For a quick build of apache, there is a script in the distribution at
./make_httpd/build_httpds.sh that can compile a statically linked
Apache with mod_ssl and <a href=http://perl.apache.org><font size=-1 face=verdana><b>mod_perl</b></font></a>. Just drop the sources into the
make_httpd directory, configure the environments as appropriate,
and execute the script like this:
<font face="courier new" size=3><pre>
make_httpd> ./build_httpds.sh
</pre></font>You might also find helpful a couple items:
<font face="courier new" size=3><pre>
<a href="http://perl.apache.org/guide/install.html">Stas's mod_perl guide install section</a>
<a href="http://www.apachetoolbox.com/">Apache Toolbox</a>
</pre></font>People have been using Apache Toolbox to automate their
complex builds of Apache 1.3.x with great success.</font>
<p>
<a name=Win32%20%2F%20Wind0f21256e></a>
<font face=verdana><font class=title size=+0 color=#555555><b>Win32 / Windows Install</b></font>
<font face="courier new" size=3><pre>
</pre></font>If you are on a Win32 platform, like WinNT or Windows 2000,
you can download the win32 binaries linked to from:
<font face="courier new" size=3><pre>
<a href=http://perl.apache.org/download/binaries.html#Win32>http://perl.apache.org/download/binaries.html#Win32</a>
</pre></font>and install the latest perl-win32-bin-*.exe file.
<font face="courier new" size=3><pre>
</pre></font>Randy Kobes has graciously provided these, which include
compiled versions perl, <a href=http://perl.apache.org><font size=-1 face=verdana><b>mod_perl</b></font></a>, apache, mod_ssl,
as well as all the modules required by Apache::ASP
and Apache::ASP itself.
<font face="courier new" size=3><pre>
</pre></font>After installing this distribution, in Apache2\conf\perl.conf
(pulled in via Apache2\conf\httpd.conf) there's directives that
have Apache::ASP handle files placed under the Apache2\asp\
directory. There should be a sample Apache::ASP script there,
printenv.html, accessed as <a href=http://127.0.0.1/asp/printenv.html>http://127.0.0.1/asp/printenv.html</a>
which, if working, will print out your environment variables.</font>
<p>
<a name=WinME%20%2F%2098%20%2Fce25d199></a>
<font face=verdana><font class=title size=+0 color=#555555><b>WinME / 98 / 95 flock() workaround</b></font>
<font face="courier new" size=3><pre>
</pre></font>For those on desktop Windows operation systems, Apache::ASP v2.25 and
later needs a special work around for the lack of flock() support
on these systems. Please add this to your Apache httpd.conf to
fix this problem after <a href=http://perl.apache.org><font size=-1 face=verdana><b>mod_perl</b></font></a> is installed:
<font face="courier new" size=3><pre>
<Perl>
*CORE::GLOBAL::flock = sub { 1 };
</Perl>
PerlModule Apache::ASP
</pre></font>Please be sure to add this configuration before Apache::ASP is loaded
via PerlModule, or a PerlRequire statement.</font>
</font>
</td>
<td bgcolor=white valign=top>
</td>
</tr>
</table>
</td></tr>