Has anybody gotten Apache-DBI to work under CentOS4?
My installed rpms are:
httpd-2.0.52-12.1.ent.centos4 (came with CentOS4)
mod_perl-1.99_16-4.centos4 (came with CentOS4)
perl-Apache-DBI-0.94-1.2.el4.rf (from Dag's site) --this includes Apache::DBI and Apache::AuthDBI
In my '/etc/httpd/conf/httpd.conf' file, I added:
PerlModule Apache::DBI PerlModule Apache::AuthDBI
..but when I restart Apache I get:
----------------------------------------------------------------------------- Can't locate Apache/Constants.pm in @INC... ... BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.5/Apache/AuthDBI.pm line 21. ... Can't load Perl module Apache::AuthDBI -----------------------------------------------------------------------------
I read that there is a conflict between Apache2 (httpd-2.0.52-12.1) and mod_perl which v1.99 (still pre-v2).
------------------------------------------------------------------------------ Any help would be greatly appreciated.
---- David Hiltz dhiltz@whsun1.wh.whoi.edu
On 20/09/05, David Hiltz dhiltz@whsun1.wh.whoi.edu wrote:
Has anybody gotten Apache-DBI to work under CentOS4?
My installed rpms are: httpd-2.0.52-12.1.ent.centos4 (came with CentOS4) mod_perl-1.99_16-4.centos4 (came with CentOS4) perl-Apache-DBI-0.94-1.2.el4.rf (from Dag's site) --this includes Apache::DBI and Apache::AuthDBI
..but when I restart Apache I get:
Can't locate Apache/Constants.pm in @INC... ... BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.5/Apache/AuthDBI.pm line 21. ... Can't load Perl module Apache::AuthDBI
Have you got perl-DBI from the CentOS repos installed too?
It's highly unlikely that Apache 2 won't work with anything that's supplied by CentOS/RH.
rpm -qp --requires perl-Apache-DBI-0.94-1.2.el4.rf.noarch.rpm perl(Carp) perl(DBI) perl(constant) perl(strict) rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Will.
Will McDonald wrote:
On 20/09/05, David Hiltz dhiltz@whsun1.wh.whoi.edu wrote:
Has anybody gotten Apache-DBI to work under CentOS4?
My installed rpms are: httpd-2.0.52-12.1.ent.centos4 (came with CentOS4) mod_perl-1.99_16-4.centos4 (came with CentOS4) perl-Apache-DBI-0.94-1.2.el4.rf (from Dag's site) --this includes Apache::DBI and Apache::AuthDBI
..but when I restart Apache I get:
Can't locate Apache/Constants.pm in @INC... ... BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.5/Apache/AuthDBI.pm line 21. ... Can't load Perl module Apache::AuthDBI
Have you got perl-DBI from the CentOS repos installed too?
Yes, perl-DBI-1.40-8
It's highly unlikely that Apache 2 won't work with anything that's supplied by CentOS/RH.
rpm -qp --requires perl-Apache-DBI-0.94-1.2.el4.rf.noarch.rpm perl(Carp) perl(DBI) perl(constant) perl(strict) rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
I have the perl-Apache-DBI-0.94-1.2.el4.rf rpm installed.
I have the same setup on an RHEL4 box and CentOS4 box and I get the same error. It's as if there is a mix of Apache2 and mod_perl1 (v1.99) stuff.
Maybe somebody can simply install the perl-DBI and perl-Apache-DBI rpms and try starting their Apache2 server.
Thanks
David Hiltz
On 21/09/05, David Hiltz dhiltz@whsun1.wh.whoi.edu wrote:
I have the perl-Apache-DBI-0.94-1.2.el4.rf rpm installed.
I have the same setup on an RHEL4 box and CentOS4 box and I get the same error. It's as if there is a mix of Apache2 and mod_perl1 (v1.99) stuff.
Maybe somebody can simply install the perl-DBI and perl-Apache-DBI rpms and try starting their Apache2 server.
According to /usr/share/doc/mod_perl-1.99_16/README (rpm -qd mod_perl pointed me there) the version of mod_perl supplied *is* intended for Apache 2.x
<----------------------------------------------------------------------------------------------------> This is mod_perl version 2.0-tobe *** Prerequisites *** Apache: The DSO version of mod_perl works with Apache versions 2.0.47 - 2.0.50. The static version -- with Apache versions 2.0.51 - 2.0.51. Newer Apache versions may work with this version of mod_perl. If not, the cvs version likely will, which can be obtained from: http://perl.apache.org/download/source.html#Development_mod_perl_2_0_Source_... Perl: Perl version 5.6.1 or higher is required. Perl version 5.8.0 or higher is required for threaded MPMs (worker, winnt, etc.). <---------------------------------------------------------------------------------------------------->
I've installed:
mod_perl-1.99_16-4 perl-Apache-DBI-0.94-1.2.el4.rf perl-DBI-1.40-8
With:
LoadModule perl_module modules/mod_perl.so PerlModule Apache2 PerlModule Apache::DBI
... in /etc/httpd/conf.d/perl.conf httpd restarts no problem. It's only when:
PerlModule Apache::AuthDBI
... is added that Apache starts to barf. /usr/lib/perl5/vendor_perl/5.8.5/Apache/AuthDBI.pm is looking for Apache/Constants.pm in the perl search path and can't find it. There's no Apache/Constants.pm installed anywhere on this system.
http://www.google.co.uk/search?hl=en&q=Can%27t+locate+Apache%2FConstants...
Ah, if you add Apache::compat to conf.d/perl.conf that fixes it!
LoadModule perl_module modules/mod_perl.so PerlModule Apache2 PerlModule Apache::compat PerlModule Apache::DBI PerlModule Apache::AuthDBI
See here for an explanation http://www.masonhq.com/?OldApacheModPerl2.
Will.