Matt Sergeant wrote: > On Fri, 12 Jul 2002, Stas Bekman wrote: > > >>Josh Bernstein wrote: >> >>> After just upgrading to mod_perl2 with Apache2. My current @INC path >>>includes a "." on the end, which should reference the current working >>>directory, and therefore correctly locate include locate in the script's >>>working directory. The problem is that the Working Directory is set to >>>"/". My question is how can I set the working directory to be the >>>location of where the script is running..... (This would make mod_perl >>>correctly locate file that I have included in the running script ie: >>>require "./file.pl") Can this be done from within Apache? >>> >>> I've tried variations of PerlSetEnv but I can't seem to get it to >>>work. I've even read the mod_perl2 user's guide. Thanks for your help.. >> >>chdir is not a thread-safe function, (there is only one CWD per >>application) therefore the new ModPerl::Registry doesn't chdir to the >>dir of the script. We have discussed various workarounds on the dev >>list, but none of them has been applied yet. >>http://mathforum.org/discussions/epi-search/modperl-dev.html >>(search for 'chdir thread') > > > Arthur told me he either had, or was going to fix this (on IRC).
Yup, Arthur is working on an external package (ex::threads::safecwd?) which should solve this problem. Viva Arthur! I'll keep you updated once it gets released. __________________________________________________________________ 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