On Mon, 4 Oct 1999, Owen Stenseth wrote:
> First thanks to Mike for figuring out how to use Embperl with
> Apache::Filter. A couple of subtle things are still causing problems. I
> have a solution for one but not for the others.
>
> The following line needs to be added as part of the params sent to
> Execute:
>
> $param{inputfile} = $r->filename;
This is true, and it *is* in my handler. Actually though, this will *fail*
if the input that your are filtering is actually generated dynamically (e.g.:
a Registry script that spits out html with embperl commands in it). This is
because of the caching mechanism of embperl. In my case, I can get away with
it by setting the $param{mtime} because all of the files I am filtering are
from real files. However, the value of $param{inputfile} can really be any
random string. This is how you can force a recompile. Before I release my
module, I plan to implement some mechanism to force a recompile. I will
probably resort to some PerlSetEnv directive to set EMBPERL_FILTER_RECOMPILE
or something and if that variable is set, then I'll just generate some random
string and pass that as the inputfile parameter.
> Onto the unsolved problems:
>
> 1. I get Stack Underflow errors every once in a while from Embperl on
> pages that work fine on a reload.
This sounds like a caching problem to me. Make sure you test with httpd -X
so you are getting the same server process for each request.
> 2. If I change the order of Apache::SSI and Apache::EmbperlFilter in the
> PerlHandler section of my configuration Apache::SSI outputs the server
> side includes and prints them to the browser instead of to Embperl. This
> is with Filter On. I am unsure what is going on here.
Apache::SSI needs to be the last module (someone else pointed this out
already).
Mike