You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jim Garrison <jh...@jhmg.net> on 2015/07/09 01:38:00 UTC
mod_perl cannot find startup.pl
Running Centos 6.6 with Apache 2.2.15 and mod_perl 2.0.4
I'm trying to add a startup script (startup.pl) but cannot seem to get
mod_perl to find it. I've reduced the config down to the bare minimum
that still reproduces the issue for me.
Perl apache configuration:
LoadModule perl_module modules/mod_perl.so
PerlRequire /home/web/pdxep/startup.pl
PerlSwitches -wT
Contents of /home/web/pdxep/startup.pl
use lib qw(/home/web/pdxep);
1;
When attempting to start Apache:
[Wed Jul 08 16:13:02 2015] [error] Can't locate
/home/web/pdxep/startup.pl in @INC (@INC contains:
/usr/local/lib64/perl5
/usr/local/share/perl5
/usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl
/usr/lib64/perl5
/usr/share/perl5
/etc/httpd) at (eval 2) line 1.\n
[Wed Jul 08 16:13:02 2015] [error] Can't load Perl file:
/home/web/pdxep/startup.pl for server perseus.jhmg.pvt:0,
exiting...
As a sanity check to show I've verified permissions:
[jhg@perseus pdxep]$ ls -ld / /home /home/web /home/web/pdxep
dr-xr-xr-x. 24 root root 4096 May 26 11:18 /
drwxr-xr-x. 5 root root 4096 Jul 8 14:42 /home
drwxr-xr-x. 3 root root 4096 Jul 8 14:43 /home/web
drwxr-xr-x. 3 jhg apache 4096 Jul 8 16:04 /home/web/pdxep
[jhg@perseus pdxep]$ ls -l /home/web/pdxep/startup.pl
-rwxr-xr-x. 1 jhg apache 33 Jul 8 16:04 /home/web/pdxep/startup.pl
Also as a sanity check, su to apache and load the startup script:
[jhg@perseus pdxep]$ sudo -s -u apache
bash-4.1$ cd
bash-4.1$ pwd
/var/www
bash-4.1$ perl -de0
Loading DB routines from perl5db.pl version 1.32
Editor support available.
Enter h or `h h' for help, or `man perldebug' for more help.
main::(-e:1): 0
DB<1> require '/home/web/pdxep/startup.pl';
DB<2> x @INC
0 '/home/web/pdxep'
1 '/usr/local/lib64/perl5'
2 '/usr/local/share/perl5'
3 '/usr/lib64/perl5/vendor_perl'
4 '/usr/share/perl5/vendor_perl'
5 '/usr/lib64/perl5'
6 '/usr/share/perl5'
7 '.'
The fact that element [0] in @INC has that value shows the script
executed successfully.
Any suggestions on further troubleshooting?
--
Jim Garrison (jhg@acm.org)
PGP Keys at http://www.jhmg.net RSA 0x04B73B7F DH 0x70738D88
Re: mod_perl cannot find startup.pl
Posted by "Kevin A. McGrail" <KM...@PCCC.com>.
On 7/8/2015 8:01 PM, Jim Garrison wrote:
> D'OH!!! I was sure I had turned off selinux, but had not.
>
> That was a very good call.
No worries, we've all been there.
regards,
KAM
Re: mod_perl cannot find startup.pl
Posted by Jim Garrison <jh...@jhmg.net>.
On 7/8/2015 4:44 PM, Kevin A. McGrail wrote:
> Anything like selinux?
>
> If you put the startup.pl in the same dir as the config file and chown
> to the same user apache is using?
>
> Regards,
> KAM
>
> On 7/8/2015 7:38 PM, Jim Garrison wrote:
>> Running Centos 6.6 with Apache 2.2.15 and mod_perl 2.0.4
>>
>> I'm trying to add a startup script (startup.pl) but cannot seem to get
>> mod_perl to find it. I've reduced the config down to the bare minimum
>> that still reproduces the issue for me.
>>
>> Perl apache configuration:
[snip]
D'OH!!! I was sure I had turned off selinux, but had not.
That was a very good call.
Thank you!
--
Jim Garrison (jhg@acm.org)
PGP Keys at http://www.jhmg.net RSA 0x04B73B7F DH 0x70738D88