You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jason Shaw <sh...@corp.hcst.com> on 2001/09/28 17:37:32 UTC
Apache::DBI fails to load
First off, if you could cc responses to me, that would be great.
On to the problem. I compiled apache 1.3.20 from sources, w/ the
following compiled statically:mm 1.1.3, mod_layout 3.0, mod_perl 1.25,
mod_ssl 2.8.4, and php 4.0.6. I am running perl 5.6.1, originally
installed from RPM and then upgraded via cpan.
Whenever I try to run apache I get the following errors. If I run
apachectl start or startssl, I get "Apache.pm failed to load!" in my
error_log, and "apachectl start: httpd could not be started" printed to
my console. If I run httpd -f httpd.conf.p4a (my configuration file,
working on a different machine that is to be migrated to this one) I
get:
Can't locate object method "module" via package "Apache" (perhaps you
forgot to load "Apache"?) at
/usr/lib/perl5/site_perl/5.6.1/Apache/DBI.pm line 202.
Compilation failed in require at /www/conf/httpd.conf.p4a line 287.
BEGIN failed--compilation aborted at /www/conf/httpd.conf.p4a line 287.
The block of code that encompasses line 287 is:
<snip>
<IfModule mod_perl.c>
PerlFreshRestart On
PerlModule Apache # I don't think that this line
does anything, but
#I get the same errors w/ and w/out it
PerlModule Apache::Status
PerlModule Apache::Registry
PerlModule Apache::ASP
PerlModule Apache::DBI
</IfModule>
</snip>
and line 202 in DBI.pm is:
<snip>
Apache::Status->menu_item(
'DBI' => 'DBI connections',
sub {
my($r, $q) = @_;
my(@s) =
qw(<TABLE><TR><TD>Datasource</TD><TD>Username</TD></TR>);
for (keys %Connected) {
push @s, '<TR><TD>', join('</TD><TD>', (split($;,
$_))[0,1]), "</TD></TR>\n";
}
push @s, '</TABLE>';
return \@s;
}
) if ($INC{'Apache.pm'} && Apache->module('Apache::Status'));
1;
</snip>
httpd -l lists mod_perl as being loaded. I compile all of apache w/out
any errors, and all of my perl/cpan installs have went smoothly.
Apache::DBI is installed and is at version number 1.20.
To verify that it is not just my apache install, I try to run perl
/www/conf/startup/pl and get the same DBI error. my startup.pl file is
as follows:
<snip>
use strict;
die "no mod_perl :(" unless $ENV{MOD_PERL};
$ENV{'GATEWAY_INTERFACE'} =~ /^CGI-Perl/ or die "GATEWAY_INTERFACE not
Perl!";
use Apache::Registry;
use Apache::DBI;
use LWP::UserAgent();
1;
</snip>
Any possible hints/clues will be greatly appreciated!
Thank you,
-jason shaw.
http://www.hcst.com