mod_perl cannot find startup.pl

Jim Garrison <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
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 ([email protected])
PGP Keys at http://www.jhmg.net RSA 0x04B73B7F DH 0x70738D88
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.