You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Trevor Phillips <ph...@central.murdoch.edu.au> on 2000/08/15 05:31:55 UTC

Multiple PerlAccessHandlers problem.

I'm having problems with a mix of PerlAccessHandlers. I have two handlers, and
it is required that one be defined in a <Location> block, and the other
currently in .htaccess' as required.

The problem is that the one in the .htaccess is being completely ignored when I
have the one in the Locate block. ie;

In httpd.conf:

<Location />
PerlAccessHandler XXX
</Location>

In a .htaccess:

PerlAccessHandler YYY

So, XXX takes effect, but YYY is ignored.

If I take out the Location one and have both in the .htaccess:

PerlAccessHandler XXX YYY

Or even on separate lines:

PerlAccessHandler XXX
PerlAccessHandler YYY

Then it all works, but when XXX is in a Location, it overrides all .htaccess
references.

Is this supposed to be the correct behaviour? How do I get the behaviour I
want? (One in a Location, and one in .htaccess).

OS is Linux, mod_perl is still 1.21.x on these servers.

Thanks in advance...

-- 
. Trevor Phillips             -           http://jurai.murdoch.edu.au/ . 
: CWIS Systems Administrator     -           T.Phillips@murdoch.edu.au : 
| IT Services                       -               Murdoch University | 
 >------------------- Member of the #SAS# & #CFC# --------------------<
| On nights such as this, evil deeds are done. And good deeds, of     /
| course. But mostly evil, on the whole.                             /
 \      -- (Terry Pratchett, Wyrd Sisters)                          /

Re: Multiple PerlAccessHandlers problem.

Posted by Doug MacEachern <do...@covalent.net>.
On Tue, 15 Aug 2000, Trevor Phillips wrote:

> I'm having problems with a mix of PerlAccessHandlers. I have two handlers, and
> it is required that one be defined in a <Location> block, and the other
> currently in .htaccess' as required.
> 
> The problem is that the one in the .htaccess is being completely ignored when I
> have the one in the Locate block. ie;
> 
> In httpd.conf:
> 
> <Location />
> PerlAccessHandler XXX
> </Location>
> 
> In a .htaccess:
> 
> PerlAccessHandler YYY
> 
> So, XXX takes effect, but YYY is ignored.
> 
> If I take out the Location one and have both in the .htaccess:
> 
> PerlAccessHandler XXX YYY
> 
> Or even on separate lines:
> 
> PerlAccessHandler XXX
> PerlAccessHandler YYY
> 
> Then it all works, but when XXX is in a Location, it overrides all .htaccess
> references.
> 
> Is this supposed to be the correct behaviour? How do I get the behaviour I
> want? (One in a Location, and one in .htaccess).

it is the expected behavior, the config merge routine just checks if the
new config Perl*Handler array exists, if so, uses that, otherwise points
at the base config Perl*Handler array.  it does not attempt to merge the
values of both arrays.  it was in the ToDo file at one point to merge the
arrays as you expected, but it now lives in the 2.0 ToDo file.