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/mod_perl.so
 <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
Listen 0.0.0.0:8533
<VirtualHost _default_:8533>
    PerlOptions +Enable
    <Location /foo>
        SetHandler modperl
        PerlResponseHandler foo
    </Location>
</VirtualHost>

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
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to