[mp2] working directory of scripts
[prev]
[thread]
[next]
[Date index for 2005/01/15]
I've got mod_perl (version 1.99.11) all up and running on Apache (version
2.0.52), but the working directory of my scripts is always set to / when
mod_perl runs them, instead of being the directory the script is in. This
wreaks havoc if the scripts are using relative pathnames. I was able to
solve the problem with loading extra Perl modules by adding *use lib
qw(/var/www/localhost/perl/mt/lib);* to my mod_perl startup script, but
that doesn't help if my site scripts uses relative paths for other things.
I looked through the docs and configuration directives but didn't find
anything appropriate, please tell me if I'm missing something. I asked in
my distro's (Gentoo) forum but haven't gotten a reply (or even many
views :P). I also browsed this list but didn't turn up anything that
looked related. How do I make mod_perl set the working directory of each
script the way I want? Or is there a reason that it always sets the
working directory to /?
--Geoff Mishkin <gmishkin@xx.xxx>
 |
[mp2] working directory of scripts
Geoff Mishkin 16:08 on 15 Jan 2005
|