Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Oct 2005 07:57:55 +0300
From:      Vladimir Tsvetkov <npacemo@gmail.com>
To:        Cody Holland <cholland@redmoonbroadband.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Apache::DBI Problems
Message-ID:  <666bdb140510272157p1e848ef3r@mail.gmail.com>
In-Reply-To: <4B3EE484EEA4F344BBB62F8316489986467D6F@corpsrv.RedMoon.local>
References:  <4B3EE484EEA4F344BBB62F8316489986467D6F@corpsrv.RedMoon.local>

next in thread | previous in thread | raw e-mail | index | archive | help
> I'm having some major issues with perl site I'm trying to get working.
> I'm running FreeBSD 5.4 stable using Apache 2.0.55 and perl 5.8.7.  The
> error I'm getting is:
> Can't locate object method "connect_on_init" via package "Apache::DBI"
> (perhaps you forgot to load "Apache::DBI"?)
>
> I do have
> LoadModule perl_module libexec/apache2/mod_perl.so
> PerlModule Apache::DBI
> in my httpd.conf file.  I'm pretty new to perl and have no idea what
> I've done wrong.  Any help would greatly be appreciated.  If you need
> more info from me, don't hesitate to ask.

Maybe you should inspect the Perl script you're trying to run, and you
should look for the following Perl statement:

use Apache::DBI;

I think it's also good to read the documentation for the Apache::DBI
module in CPAN:
http://search.cpan.org/~pgollucci/Apache-DBI-0.9901/DBI.pm
You could also try to add

PerlModule Apache::DBI  # this comes before all other modules using DBI

to start.pl. You should pay attention to the comment!!!
THIS MODULE SHOULD BE LOADED BEFORE ALL OTHER MODULES USING DBI.

What can you do next if you had configured everything correctly and
the Perl scripts are OK?
Maybe you just dont't have the Apache::DBI module installed on your
machine, and you should download it and install it then:

% perl -MCPAN -e "shell"

install Apache::DBI

Best Regards,
CASIUS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?666bdb140510272157p1e848ef3r>