hakkr has asked for the wisdom of the Perl Monks concerning the following question:
I have spent many hours wrestling this problem.
I have source installs of mod_perl 1.29, apache 1.3.33 and perl 5.8.7.Under mod_perl this works fine, I just PerlSetEnv /dir in httpd.conf and that's it everything works.
The problem occurs whenever I run my scripts under mod_cgi they cannot find any code in my custom lib.
Everything works fine at command line and I have exported PERL5LIB as an environment variable in /etc/profile.
When I use CGI::Carp qw/fatalsToBrowser/;
I get 'Can't locate in @INC', @INC is then shown with my /dir proudly listed at the front laughing at me.
I have tried the follwing:This is driving me nuts,how can 'use lib' be ignored and unshifting onto @INC be ignored. I have tried using Module::Locate and printed %INC both to no avail. The only way it works is if I move my dir into the built in path /usr/local/lib/perl5/5.8.7/i686-linux /usr/local/lib/perl5/5.8.7 /usr/local/lib/perl5/site_perl/5.8.7/i686-linux /usr/local/lib/perl5/site_perl/5.8.7/ /usr/local/lib/perl5/site_perl/
I am using this same setup on other servers with the only difference being the perl version. the dir permissions are 755. This must be something todo with apache or taint but I am now at a loss what to try. grateful for any ideas thanks
update: fixed fatalsToBrowser typo
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: can't locate under mod_cgi
by Happy-the-monk (Canon) on Aug 11, 2005 at 11:07 UTC | |
Re: can't locate under mod_cgi
by extremely (Priest) on Aug 11, 2005 at 16:31 UTC | |
by hakkr (Chaplain) on Aug 11, 2005 at 23:39 UTC |