perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: segfault on global disable of mod_perl
Date Wed, 07 Jul 2004 19:04:00 GMT
Stas Bekman wrote:
> Phil Pennock wrote:
>> -------------8<---------- Start Bug Report ------------8<----------
>> 1. Problem Description:
>> If "PerlOptions -Enable" is set in global context in Apache config,
>> mod_perl segfaults.
>> I was experimenting, because of the support for cloned Perl instances
>> for differing vhosts, to see if the Perl handling could be enabled in 
>> only
>> the vhosts which explicitly required it, by disabling in global context
>> and explicit enabling.  Apparently not.  An error message and "don't be
>> stupid, and here's why it's stupid" is perhaps preferable to a 
>> segfault of
>> Apache.
>> Config to replicate, using Apache2 setup:
>>  LoadModule perl_module libexec/apache2/
>>  <IfModule mod_perl.c>
>>    PerlModule Apache2
>>    PerlOptions -Enable
>>  </IfModule>
>> This using the relevant ports installed under FreeBSD, with whatever
>> test framework that invokes.  Removing "PerlOptions -Enable" avoids
>> the problem.
> Thank you, Phil, for the proper bug report. It was easy to reproduce the 
> problem.
> For now, I think to just add an assert when one tries to do that on the 
> top level. This is because we do many things on the top level. It's 
> possible that will be able to still disable mod_perl for the top-level, 
> but may try to look at that later.

Actually it was pretty easy to add a real fix, if you try the current 
cvs you should be able to say:

PerlOptions -Enable
<VirtualHost _default_:8533>
     PerlOptions +Enable
     <Location /foo>
         SetHandler modperl
         PerlResponseHandler foo

none of the handlers will be executed at the top level, but perl will be 
available. Of course I did very basic testing, so it's possible that you 
will spot some other issues with it. Let us know whether the current cvs 
works for you.

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message