mod_perlite
mod_perlite copied to clipboard
Working directory not in search path
I am using the Apache mod_setenv to set an environment varibable in order to get MT running under mod_perlite.
The mt.pl script looks like this:
use strict;
use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
use MT::Bootstrap App => 'MT::App::CMS';
That's it.
My error logs show this:
[Fri Jan 15 23:41:34 2010] [error] Can't locate MT/Bootstrap.pm in @INC (@INC contains: lib . /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 /etc/httpd) at /var/www/vhosts/testing.majordojo.com/httpdocs/mt/mt.pl line 16.\nBEGIN failed--compilation aborted at /var/www/vhosts/testing.majordojo.com/httpdocs/mt/mt.pl line 16.\n
By making this change it works:
BEGIN {
$ENV{MT_HOME} = '/var/www/vhosts/testing.majordojo.com/httpdocs/mt';
}
use strict;
use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
use MT::Bootstrap App => 'MT::App::CMS';
However it is replaced by this error (see other ticket about mod_perl dependency):
Got an error: Can't locate Apache/Request.pm in @INC (@INC contains: /var/www/vhosts/testing.majordojo.com/httpdocs/mt/plugins/CommunityActionStreams/lib
So it appears on one level mod_perlite need to see the INC search path with the working directory.
Related issue: $ENV does not reflect changes from SetEnv
Last night when I resolved my conflict with mod_perl, this went away. However, this morning I am having difficulty again. Will close if I am able to figure this out. This might just be an apache config issue.