You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Joshua Bernstein <jo...@engr.arizona.edu> on 2002/07/30 11:38:32 UTC

Apache2 CWD Non-threaded MPM

Hey All,

	After much hassle, I blew away my threaded MPM under Apache2 
because mod_perl didn't seem to be accepting or processing the . 
(period) in my @INC path so that scripts called like:

require "blah.cgi"

were not being found in the include path. I understand there are still 
issues with SafeCWD'ing in a threading enviroment, but now that the MPM 
is prefork, it isn't threaded anymore. Any reason why mod_perl 2, still 
doesn't recognize the . in my @INC path?

-Joshua Bernstein
Systems Analyst
University of Arizona
Tucson, Arizona, USA


Re: Apache2 CWD Non-threaded MPM

Posted by Stas Bekman <st...@stason.org>.
Joshua Bernstein wrote:
> Hey All,
> 
>     After much hassle, I blew away my threaded MPM under Apache2 because 
> mod_perl didn't seem to be accepting or processing the . (period) in my 
> @INC path so that scripts called like:
> 
> require "blah.cgi"
> 
> were not being found in the include path. I understand there are still 
> issues with SafeCWD'ing in a threading enviroment, but now that the MPM 
> is prefork, it isn't threaded anymore. Any reason why mod_perl 2, still 
> doesn't recognize the . in my @INC path?

You are talking about ModPerl::Registry, not mod_perl 2.0 in general.

ModPerl::Registry will always do the same thing, be it the prefork mpm 
or the threaded mpm. Because the same code should run identically no 
matter what the mpm is used. Therefore if chdir() cannot be used with 
the threaded mpm it won't work with the prefork mpm as well.

Solution 1: Subclass ModPerl::Registry as ModPerl::RegistryPreFork and 
do whatever is fine with prefork. Subclassing the new registry family is 
extremely easy, though the API hasn't been frozen yet. See 
ModPerl::RegistryCooker for more info.

Solution 2: Arthur Bergman is working on ex::threads::safecwd, which 
should resolve the problem for threaded mpms. So once it's available we 
can use chdir() in ModPerl::Registry again.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com