You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Andrew McCall <it...@oldham.gov.uk> on 2002/10/07 11:03:55 UTC

Another "Apache.pm failed to load!." question....

Hi All,

I have searched around the archives, but haven't been able to find an answer 
to my problem (flame me if I have totally overlooked something! :) )

I have two machines, ones a Dell 1650 dual P4 processor 1Gb RAM, and the 
second is a Dell 2450 dual P3 processor 1Gb RAM, both have RAID etc, and are 
very similar machines, other than one being older than the other.

The idea is that the Dell 2450 is my primary Apache web server, and I have an 
identical Apache web server set up on the Dell 1650 that acts as a backup - if the 2450 goes down for some reason, I can manually point our firewall to 
the 1650 while I fix the 2450.

I have done identical installations of SuSE Linux 8.0 Professional on both machines, leaving out all apahce, mod_*'s and php rpms.

I then downloaded Apache 1.3.26, mod_perl 1.27, mod_ssl 2.8.10-1.3.26, OpenSSL 
0.9.6g and PHP 4.2.2.

I started on the backup 1650 server, and installed all the software using these rules for mod_perl and Apache (I can post the configure rules for the 
other software if its needed)

perl Makefile.PL EVERYTHING = 1 APACHE_SRC = ../apache_1.3.26/src/ USE_APACI = 
1 PREP_HTTPD = 1 DO_HTTPD = 1

...and didn't compile as its going to get done with Apache's make later....

SSL_BASE=../openssl-0.9.6g ./configure --prefix=/usr/local/apache/ 
--enable-module=env --enable-module=setenvif --enable-module=mime 
--enable-module=mime_magic --enable-module=negotiation --enable-module=alias 
--enable-module=userdir --enable-module=dir --enable-module=autoindex --enable-module=access --enable-module=auth --enable-module=asis 
--enable-module=include --enable-module=cgi --enable-module=actions --enable-module=status --enable-module=info --enable-module=log_config 
--enable-module=imap --activate-module=src/modules/perl/libperl.a 
--enable-module=ssl --enable-shared=max --disable-shared=perl

Then did my make, make certificates, make install....

This worked great on the Dell 1650 and I have had it running my sites for a few weeks now.

I have now started to do the same install for the Dell 2450... I followed my 
instructions and everything compiles and installs great....

....however, when I try to start the server I get the "Apache.pm failed to load!." error in my error_log file!

I have re-configured/make'd etc. around 3 times just to make sure that I 
haven't done any thing differently.

I am 99% confident that these installs are identical other than the hardware, 
and the Apache install works on one, and not the other!

I have tried 
http://perl.apache.org/docs/1.0/guide/troubleshooting.html#_Apache_pm_failed_to_load__ 
and it then gives a different error :

Starting Apache : [Mon Oct  7 09:01:34 2002] [error] Can't locate Apache.pm in 
@INC (@INC contains: /usr/lib/perl5/5.6.1/i586-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i586-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl . /usr/local/apache/ /usr/local/apache/lib/perl) at 
(eval 2) line 3.

Syntax error on line 293 of /usr/local/apache/conf/httpd.conf:
Can't locate Apache.pm in @INC (@INC contains: /usr/lib/perl5/5.6.1/i586-linux 
/usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i586-linux 
/usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl . /usr/local/apache/ 
/usr/local/apache/lib/perl) at (eval 3) line 3.

I have no idea why this isn't working. As far as I am concerned, its a brand 
new install, identical to the pervious one, and I have used the exact same process as before, one worked, the other didn't!

Can anyone help me work out whats broken?

-- 
Thanks,

Andrew McCall
Internet/Linux System Administrator
I.C.T. Division
Oldham MBC
Civic Centre
West Street
Oldham
OL1 1UU

Tel : 0161 911 3990
Fax : 0161 911 3998
Email : it.andrew.mccall@oldham.gov.uk


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.oldham.gov.uk
**********************************************************************


Re: Another "Apache.pm failed to load!." question....

Posted by Andrew McCall <it...@oldham.gov.uk>.
On Monday 07 October 2002 11:05 am, Axel Gerstmair wrote:
> Hello Andrew,
>
> it seems like the Perl side of mod_perl is not installed. As far as I
> know, you must always do a "make" and "make install" in the directory
> where you untarred your mod_perl sources, so that the Perl modules get
> installed correctly.
>
> If you want to make Apache separately, you must leave out the option
> DO_HTTPD (when running perl Makefile.PL ...) or set it to 0.

Thats really weird :)

It has indeed fixed my problem, but what I don't understand is how.

I have used the same script to build my Apache web servers for about a year, 
and it has worked for version 1.3.20,1.3.22 and on other servers for 1.3.26 and 1.3.27. Its strange that this problem has only showed on this server...

-- 
Thanks,

Andrew McCall
Internet/Linux System Administrator
I.C.T. Division
Oldham MBC
Civic Centre
West Street
Oldham
OL1 1UU

Tel : 0161 911 3990
Fax : 0161 911 3998
Email : it.andrew.mccall@oldham.gov.uk




**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.oldham.gov.uk
**********************************************************************


Re: Another "Apache.pm failed to load!." question....

Posted by Axel Gerstmair <an...@web.de>.
Hello Andrew,

it seems like the Perl side of mod_perl is not installed. As far as I
know, you must always do a "make" and "make install" in the directory
where you untarred your mod_perl sources, so that the Perl modules get
installed correctly.

If you want to make Apache separately, you must leave out the option
DO_HTTPD (when running perl Makefile.PL ...) or set it to 0.

Best regards,
Axel


> [...]
> Starting Apache : [Mon Oct  7 09:01:34 2002] [error] Can't locate Apache.pm in
> @INC (@INC contains: /usr/lib/perl5/5.6.1/i586-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i586-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl . /usr/local/apache/
> /usr/local/apache/lib/perl) at 
> (eval 2) line 3.

> Syntax error on line 293 of /usr/local/apache/conf/httpd.conf:
> Can't locate Apache.pm in @INC (@INC contains: /usr/lib/perl5/5.6.1/i586-linux 
> /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i586-linux 
> /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl . /usr/local/apache/ 
> /usr/local/apache/lib/perl) at (eval 3) line 3.

> I have no idea why this isn't working. As far as I am concerned, its a brand 
> new install, identical to the pervious one, and I have used the exact same process as before, one worked, the other didn't!

> Can anyone help me work out whats broken?