[rt-users] Error - Can't locate object method "connect" via package "DBI"

Tom Hukins tom at eborcom.com
Thu Jan 10 11:32:02 EST 2002


On Thu, Jan 10, 2002 at 10:01:17AM -0600, Adrian Galindo wrote:
> Sam Leibowitz escribió:
> > 
> > Yesterday, I got most of hte way through an install or RT on a SuSE 7.3
> > box. After a nagging problem where Apache wasn't able to find the DBI.pm
> > module was resolved (I copied it from one directory to another to fix it),
> > the server starts, but throws a 500 internal server error. The error in
> > the log reads:

That's because you haven't installed the module properly.  DBI, and
many other Perl modules, use various support files as well as the
basic DBI.pm file.

Try installing DBI properly, using CPAN.pm or the "perl Makefile.PL"
method.

If your Perl still can't find the DBI module, use "use lib" or the
PERL5LIB environment variable.

> You have to install the package DBI _after_ the Apache::DBI
> The order is important here. I've been looking too for this, and as far
> I got, is not documented. Maybe would be a good entry to the FAQ.

This is wrong.  In terms of installation, you should deal with DBI
before Apache::DBI.

However, if you're talking about using the modules in your Apache
configuration, then use/requiring DBI before Apache::DBI will cause
problems.  However, once you've done a "use Apache::DBI", there's no
need to do a "use DBI" because Apache::DBI does this for you and takes
over DBI's namespace.

For more details see
http://perl.apache.org/guide/databases.html#Apache_DBI_Initiate_a_persist

Tom




More information about the rt-users mailing list