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

My sysadmin just setup mod_perl for the first time on my server.

From the O'Reilly mod_perl book I'm trying to get the Hello World script working.

I put the following lines in my httpd.conf file:

PerlRequire /usr/local/apache/conf/startup.pl PerlFreshRestart On <Location /hello/world> SetHandler perl-script PerlHandler Apache::Hello </Location>

Then when I try to restart Apache it croaks as follows:

root:/usr/local/apache/bin# ./apachectl graceful ./apachectl graceful: httpd not running, trying to start [Sat Dec 15 02:14:54 2001] [error] Perl lib version (v5.6.0) doesn't m +atch executable version (v5.6.1) at /usr/lib/perl5/i386-linux/Config. +pm line 21. Compilation failed in require at /usr/lib/perl5/lib.pm line 4. BEGIN failed--compilation aborted at /usr/lib/perl5/lib.pm line 4. Compilation failed in require at /usr/local/apache/conf/startup.pl lin +e 5. BEGIN failed--compilation aborted at /usr/local/apache/conf/startup.pl + line 5. Compilation failed in require at (eval 1) line 1. Syntax error on line 40 of /usr/local/apache/conf/httpd.conf: Perl lib version (v5.6.0) doesn't match executable version (v5.6.1) at + /usr/lib/perl5/i386-linux/Config.pm line 21. Compilation failed in require at /usr/lib/perl5/lib.pm line 4. BEGIN failed--compilation aborted at /usr/lib/perl5/lib.pm line 4. Compilation failed in require at /usr/local/apache/conf/startup.pl lin +e 5. BEGIN failed--compilation aborted at /usr/local/apache/conf/startup.pl + line 5. Compilation failed in require at (eval 1) line 1. ./apachectl graceful: httpd could not be started

It looks like it has something to do with a Perl 5.6.0 vs Perl 5.6.1 issue, but that is a big guess. Anyone been through this before?

Replies are listed 'Best First'.
Re: Getting mod_perl working
by IlyaM (Parson) on Dec 15, 2001 at 19:22 UTC
    I think your sysadmin should reinstall mod_perl. It looks like it was compiled with one version of perl while another version is installed on your server.

    Update: Did he use binary package for mod_perl? Probably it is better to recompile mod_perl from sources on that server.

    --
    Ilya Martynov (http://martynov.org/)

      The mod_perl installation was compiled from source on a staging server running Perl 5.6.1 and then transported to my server, which was running the older Perl 5.6.0.

      We upgraded my perl installation to 5.6.1 and it now works.

      Thanks for your help all.

Re: Getting mod_perl working
by maverick (Curate) on Dec 15, 2001 at 22:54 UTC
    I agree that it looks like a recompilation is in order. Using Apache Toolbox will make this a very straight forward task.

    /\/\averick
    perl -l -e "eval pack('h*','072796e6470272f2c5f2c5166756279636b672');"

      My personal favorite is apacompile :)

      Greetz
      Beatnik
      ... Quidquid perl dictum sit, altum viditur.