[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

dbi connect - was mod_perl and mysql



I'm working down my issues one by one.  I seem (or at least hope) I 
am approaching the end of the road.  I have a web server at home that 
I use to run a web based golf club.  Most member functions (add 
courses, add new score, etc) are driven by mod_perl scripts using a 
mysql db.  A couple of months ago, in a fit of incompetence, I royally 
screwed up my debian install.  After fighting the issue for 3 weeks I 
gave up and performed a clean install of the current debian stable 
release 3.0r1.

I've got the server back up and configured.  Apache is serving content 
just fine but when I try to execute my scripts I receive the following 
error in the apache-perl log file.  I've included what I hope is the 
necessary information.  I've researched this extensively but am not 
coming up with any good leads.  Pointers would be most welcome.

TIA

apache-perl log:
[Thu May 22 20:20:25 2003] [error] Can't locate object
method "connect" via package "Apache::DBI::connect" at
/usr/lib/perl5/DBI.pm line 471. BEGIN failed--compilation
aborted at /usr/local/lib/site_perl/Apache/Golf.pm line 38.
Compilation failed in require at
/usr/lib/perl-bin/HC_summary.pl line 5. BEGIN
failed--compilation aborted at
/usr/lib/perl-bin/HC_summary.pl line 5.

dpkg -l '*dbi*':
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Installed/Config-files/Unpacked/Failed-config/Hal
f-installed |/
Err?=(none)/Hold/Reinst-required/X=both-problems
(Status,Err: uppercase=bad) ||/ Name           Version      
 Description
+++-==============-==============-
==========================
================== pn  dbishell       <none>         (no
description available) ii  libapache-dbi- 0.88-5        
Connect apache server to database via perl's pn 
libapache-dbil <none>         (no description available) pn 
libapache-dbil <none>         (no description available) ii 
libdbi-perl    1.21-2         The Perl5 Database Interface
by Tim Bunce pn  libdbix-cgi-pe <none>         (no
description available) pn  libdbix-dataso <none>         (no
description available) pn  libdbix-dbsche <none>         (no
description available) pn  libdbix-easy-p <none>         (no
description available) pn  libdbix-passwo <none>         (no
description available) pn  libdbix-profil <none>         (no
description available) pn  libdbix-record <none>         (no
description available) pn  libdbix-search <none>         (no
description available) pn  libdbix-xml-rd <none>         (no
description available) pn  libdbix-xmlmes <none>         (no
description available) pn  libgdbi-dev    <none>         (no
description available) pn  libgdbi0       <none>         (no
description available)

find / -name DBI.pm:
/usr/share/perl5/Apache/DBI.pm
/usr/lib/perl5/Apache/DBI.pm
/usr/lib/perl5/Bundle/DBI.pm
/usr/lib/perl5/DBI.pm

perl -v:
This is perl, v5.6.1 built for i386-linux

Copyright 1987-2001, Larry Wall

Perl may be copied only under the terms of either the
Artistic License or the GNU General Public License, which
may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should
be found on this system using `man perl' or `perldoc perl'. 
If you have access to the Internet, point your browser at
http://www.perl.com/, the Perl Home Page.

perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 1)
configuration:
  Platform:
    osname=linux, osvers=2.4.19, archname=i386-linux
    uname='linux cyberhq 2.4.19 #1 smp sun aug 4 11:30:45
    pdt 2002 i686 unknown ' config_args='-Dccflags=-DDEBIAN
    -Dcccdlflags=-fPIC -Darchname=i386-linux -Dprefix=/usr
    -Dprivlib=/usr/share/perl/5.6.1
    -Darchlib=/usr/lib/perl/5.6.1 -
Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5
-Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local
-Dsitelib=/usr/local/share/perl/5.6.1
-Dsitearch=/usr/local/lib/perl/5.6.1
-Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3
-Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager
-Uafs -Ud_csh -Uusesfio -Duseshrplib -
Dlibperl=libperl.so.5.6.1 -Dd_dosuid -des'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef
    usemultiplicity=undef useperlio=undef d_sfio=undef
    uselargefiles=define usesocks=undef use64bitint=undef
    use64bitall=undef uselongdouble=undef
  Compiler:
    cc='cc', ccflags ='-DDEBIAN -fno-strict-aliasing
    -I/usr/local/include -D_LARGEFILE_SOURCE
    -D_FILE_OFFSET_BITS=64', optimize='-O2',
    cppflags='-DDEBIAN -fno-strict-aliasing
    -I/usr/local/include' ccversion='', gccversion='2.95.4
    20011002 (Debian prerelease)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8,
    byteorder=1234 d_longlong=define, longlongsize=8,
    d_longdbl=define, longdblsize=12 ivtype='long',
    ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
    lseeksize=8 alignbytes=4, usemymalloc=n,
    prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lgdbm -ldb -ldl -lm -lc -lcrypt
    perllibs=-ldl -lm -lc -lcrypt
    libc=/lib/libc-2.2.5.so, so=so, useshrplib=true,
    libperl=libperl.so.5.6.1
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef,
    ccdlflags='-rdynamic' cccdlflags='-fPIC',
    lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: USE_LARGE_FILES
  Built under linux
  Compiled at Nov 30 2002 17:31:55
  @INC:
    /usr/local/lib/perl/5.6.1
    /usr/local/share/perl/5.6.1
    /usr/lib/perl5
    /usr/share/perl5
    /usr/lib/perl/5.6.1
    /usr/share/perl/5.6.1
    /usr/local/lib/site_perl
    .

Package libapache-dbi-perl = 0.88-5
Package libdbi-perl = 1.21-2

Using database mysql.

error.log:
Reloading apache-perl modules[Thu May 22 20:43:54 2003]
[error] Can't locate object method "connect_on_init" via
package "Apache::DBI" (perhaps you forgot to load
"Apache::DBI"?) at /etc/apache-perl/startup.pl line 15.
Compilation failed in require at (eval 5) line 1.

Syntax error on line 880 of /etc/apache-perl/httpd.conf:
Can't locate object method "connect_on_init" via package
"Apache::DBI" (perhaps you forgot to load "Apache::DBI"?) at
/etc/apache-perl/startup.pl line 15. Compilation failed in
require at (eval 5) line 1.

failed

>From httpd.conf:
# If the perl module is installed, this will be enabled.
PerlModule Apache::DBI
<IfModule mod_perl.c>
  Alias /perl-bin/ /usr/lib/perl-bin/
  PerlRequire /etc/apache-perl/startup.pl
  PerlFreshRestart on
  <Location /perl-bin>
    SetHandler perl-script
    PerlHandler Apache::Registry
    AllowOverride None
    AllowOverride AuthConfig
    Options +ExecCGI
  </Location>
</IfModule>


------- End of forwarded message -------



Reply to: