You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Tom Kralidis <to...@hotmail.com> on 2001/01/07 00:53:53 UTC
mod_perl / SSI conflict?
Hi,
I am running Apache 1.3.14 w/ mod_perl 1.24 on a Linux RedHat 6.2 machine.
I have recently began to implement mod_perl to some of my content.
As per "Writing Apache Modules with Perl and C" book, I wrote a footer for
each page, with the following directive in httpd.conf:
<Files ~ "\.html?$">
SetHandler perl-script
PerlHandler Apache::Footer
</Files>
This puts the footer nicely to all files .htm or .html
However, I have a few .shtml pages as part of my site, which have worked
with no errors. After making this change:
<Files ~ "\.s?html?$">
SetHandler perl-script
PerlHandler Apache::Footer
</Files>
..I imagined that .shtml files would show a footer at the bottom of pages.
However, what I found is that, for the .shtml pages, while the mod_perl
footer works with no errors, the SSI does not work at all, and I can't find
anything strange regarding this in error_log.
Has anyone had any similar problem? Any advice / workarounds, etc. would be
valued.
Thanks alot
..Tom
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Re: mod_perl / SSI conflict?
Posted by Andrew Ho <an...@tellme.com>.
Tom,
TK>This puts the footer nicely to all files .htm or .html
TK>However, I have a few .shtml pages as part of my site, which have worked
TK>with no errors. After making this change:
TK>
TK> <Files ~ "\.s?html?$">
TK> SetHandler perl-script
TK> PerlHandler Apache::Footer
TK> </Files>
TK>
TK>..I imagined that .shtml files would show a footer at the bottom of pages.
TK>
TK>However, what I found is that, for the .shtml pages, while the mod_perl
TK>footer works with no errors, the SSI does not work at all, and I can't find
TK>anything strange regarding this in error_log.
The regular SSI mechanism (through mod_include) won't work with mod_perl,
e.g. you don't get mod_perl output run through SSI out of the box.
Basically, you've told Apache that .shtml files are now to be processed by
a mod_perl PerlHandler, NOT by mod_include. So naturally your SSI is not
showing up in the output.
There are a couple workarounds; see the documentation for Apache::SSI (you
can find it from CPAN) for more information/references.
Humbly,
Andrew
----------------------------------------------------------------------
Andrew Ho http://www.tellme.com/ andrew@tellme.com
Engineer info@tellme.com Voice 650-930-9062
Tellme Networks, Inc. 1-800-555-TELL Fax 650-930-9101
----------------------------------------------------------------------