I'm trying to use the Perl module HTML::Mason under
CGI. The instructions in the HTML::Mason::CGIHandler
manual turned out to be all wrong, so I was advised
to use the following:
I have an .htaccess file that looks like this:
#Define the html-mason handler (server root relative)
Action html-mason /home/melroch/masonhandler.pl
#Public
<FilesMatch "\.mhtml$">
Options +ExecCGI
SetHandler html-mason
</FilesMatch>
#Private
<FilesMatch ".mas$">
Order allow,deny
Deny from all
</FilesMatch>
But when I point to an *.mhtml I get an error:
"The requested URL
/home/melroch/masonhandler.pl/test.mhtml was not found
on this server."
It seems Apache thinks masonhandler.pl is a directory
rather than a script that should handle requests for
*.mhtml files.
FYI the masonhandler.pl looks like this:
#!/usr/bin/perl -T
use warnings;
#Untainting: Explicitly add programs as needed
$ENV{PATH} = undef;
use strict;
use HTML::Mason::CGIHandler;
#Get a new Mason handler object
my $h = HTML::Mason::CGIHandler->new
(
#preamble => 'my $p = MasonX::Profiler->new($m, $r);',
#MasonX::Profiler object
allow_globals => [qw( $ROOT $ThisUser )], #globals
per child
code_cache_max_size => 0, #Turn off
caching while testing
);
#Pass the request to the handler. Ta-da!
$h->handle_request;
--
/BP 8^)>
--
Benct Philip Jonsson -- melroch at melroch dot se
a shprakh iz a dialekt mit an armey un flot
(Max Weinreich)
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]