shay has asked for the wisdom of the Perl Monks concerning the following question:
(See more details here: http://www.nntp.perl.org/group/perl.par/2009/05/msg4055.html)
I have an Apache2.2/mod_perl2 setup which runs fine as it is, but can easily be broken if an inappropriate PERL5LIB setting is put in the registry. (With a suitably bogus setting in place, pointing at a completely different version of perl installed elsewhere on my machine, I find that the Apache service no longer starts: It fails to load startup.pl, presumably because it is loading C extension modules and tries to load the wrong versions of DLLs from the location specified in the bogus PERL5LIB setting.)
How can I modify my httpd.conf and/or startup.pl files to protect against this? I've tried adding SetEnv and PerlSetEnv directives in httpd.conf, and use lib qw() and BEGIN { $ENV{PERL5LIB}='...' } lines in startup.pl, but Apache still can't load startup.pl and fails to start.
I need to make the Apache/mod_perl setup override any possible PERL5LIB setting in the registry in a self-contained way, so that it can be installed on other machines and not be affected by those other machines having PERL5LIB settings in the registry.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Overriding the registry's PERL5LIB in mod_perl on Win32
by perrin (Chancellor) on May 21, 2009 at 15:28 UTC | |
by shay (Beadle) on May 21, 2009 at 17:08 UTC | |
by perrin (Chancellor) on May 21, 2009 at 17:18 UTC | |
by shay (Beadle) on May 22, 2009 at 08:02 UTC | |
|
Re: Overriding the registry's PERL5LIB in mod_perl on Win32
by Anonymous Monk on May 21, 2009 at 11:30 UTC | |
by shay (Beadle) on May 21, 2009 at 11:47 UTC |