theirpuppet has asked for the wisdom of the Perl Monks concerning the following question:

Syntax error on line 129 of /opt/apache/conf/httpd.conf:
Wrong Apache.pm loaded: /usr/local/lib/perl5/site_perl/5.8.0/i686-linux/Apache.pm at /opt/apache/conf/startup.pl line 32.
Compilation failed in require at (eval 4) line 1.

The relevant code in startup.pl is:

unless ($INC{'Apache.pm'} =~ /blib/) { die "Wrong Apache.pm loaded: $INC{'Apache.pm'}"; }

I went into the mod_perl/Apache source, found a pm_to_blib which gave:
make: `pm_to_blib' is up to date.
Nothing about installing in there. What do I need to do? Apache et al is up-to-date according to CPAN, but it's just not in a blib directory. ???????

Replies are listed 'Best First'.
Re: Wrong Apache.pm loaded
by cees (Curate) on Jul 07, 2003 at 04:52 UTC

    Where did you get the code you placed in the startup.pl file?

    Did you copy it from the mod_perl installation scripts? The only reference to that code I can find is in the t/docs/startup.pl file in the mod_perl src tree. That filename might be misleading, since it mentions 'docs' and 'startup.pl', but the fact that it is in the 't' directory means it is part of the testing environment for mod_perl. Hence it is not supposed to be used as the startup.pl file for your real server, only for the installation testing phase.

    If you remove the startup.pl file and try again, everything should work OK. A startup.pl file is not required to run mod_perl.

    See this page for information on what should go into a startup.pl file.

    - Cees

Re: Wrong Apache.pm loaded
by chromatic (Archbishop) on Jul 07, 2003 at 00:22 UTC

    I've only ever seen blib/ used in Perl modules right before installing. I'm willing to say that that code in startup.pl is wrong, if you've installed everything correctly. If you delete it, what happens?

      It poops out on 'require "net/config.pl"' Something is not installed correctly, yet I followed the directions precisely from http://perl.apache.org
Re: Wrong Apache.pm loaded
by theirpuppet (Sexton) on Jul 06, 2003 at 23:54 UTC
    I'm installing from source, as you can see, but mod_perl isn't my buddy this time. Here's what I did to install it:
    1) Built and installed Perl 5.8.0 2) DL Apache-1.3.27 and mod_perl-1.28 3) cd /usr/local/src/apache/mod_perl-1.28 $ perl Makefile.PL APACHE_SRC=/usr/local/src/apache/apache_1.3.27/src +DO_HTTPD=1 USE_APACI=1 EVERYTHING=1 APACHE_PREFIX=/opt/apache $ make && make test && make install
    It looks like Apache::DBI is a problem as well. Tried installing from CPAN, got this: Running make test
    PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib/lib', 'blib/arch')" t/*.t t/10mysql....NOK 5# Failed test (t/10mysql.t at line 28) + # got: '4' # expected: '5' t/10mysql....ok 7/7# Looks like you failed 1 tests of 7. + t/10mysql....dubious + Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 5 Failed 1/7 tests, 85.71% okay Failed Test Stat Wstat Total Fail Failed List of Failed ---------------------------------------------------------------------- +--------- t/10mysql.t 1 256 7 1 14.29% 5
    PLEASE HELP. If you need more info, let me know.