All,
  I've noticed some odd behavior (or maybe just
errant thinking on my part) concerning PerlInitHandler
and PerlSetEnv. While walking through the demo of
HTML::EmbperlObject, things were just not working as
advertised. This configuration:

<Location /foo>
   PerlSetEnv EMBPERL_OBJECT_BASE base.htm
   PerlSetEnv EMBPERL_FILESMATCH "\.htm.?|\.epl$"
   SetHandler perl-script
   PerlHandler HTML::EmbperlObject
   Options ExecCGI
</Location>

caused problems (error log had messages about being unable to
find EMBPERL_OBJECT_BASE)

This configuration works fine:

PerlSetEnv EMBPERL_OBJECT_BASE base.htm
PerlSetEnv EMBPERL_FILESMATCH "\.htm.?|\.epl$"

<Location /foo>
   SetHandler perl-script
   PerlHandler HTML::EmbperlObject
   Options ExecCGI
</Location>

I somewhat traced the problem down to a PerlInitHandler:
PerlInitHandler         Apache::StatINC

If that is set (or any other PerlInitHandler is set), PerlSetEnv's
inside Location directives (or Directory directives) do not work.
If there are no PerlInitHandlers, the PerlSetEnv's inside Location
directives do work. It's not an embperl thing - I have a simple 
script that just spits out ENV that will demonstrate the issue.
Is this normal expected behavior? The docs lead me to believe not
but ...

I've tried this on two configurations and both produce the same 
results:

Configuration one:  Digital OSF1 V4.0
                    Apache/1.3.20
                    perl 5.6.1
                    mod_perl 1.21

Configuration two:  PowerPC DebianGnu Linux
                    Apache/1.3.9
                    perl 5.5.3
                    mod_perl 1.21.03

Any pointers to further info would be greatly appreciated, -MikeB.

Reply via email to