logo       

Re: Apache2 CWD Non-threaded MPM: msg#00259

apache.mod-perl

Subject: Re: Apache2 CWD Non-threaded MPM

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@xxxxxxxxxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise