Gossamer Forum
Home : Products : Gossamer Links : Discussions :

strange DBI error

Quote Reply
strange DBI error
This happens when i tried to use the dynamic mode page.cgi

A fatal error has occured:
Can't locate object method "connect" via package "Apache::DBI::connect" at /usr/lib/perl5/site_perl/5.6.0/i386-linux/DBI.pm line 416.

Quote Reply
Re: [xpert] strange DBI error In reply to
Problem solved, stupid me, LSQL requires the Apache::DBI instead of the regular DBI bundle. Just add

use Apache::DBI ();

in my startup.pl, and LSQL would use the Apache::DBI

Quote Reply
Re: [xpert] strange DBI error In reply to
Apache::DBI should be required automatically in mod_perl.pm if mod_perl is "switched on" so you need to double check what's going on.
Quote Reply
Re: [Paul] strange DBI error In reply to
Hmmm, yeah rather strange, double checked the mod_perl.pm and did foudn that it requires apache::dbi. Anyway, everything seems to work fine right now, so i think it's not under major concern unless some errors start appearing!

BEGIN { if ($MOD_PERL) { require Apache::DBI; } }

Quote Reply
Re: [xpert] strange DBI error In reply to
The error suggests that mod_perl is not working properly and that $MOD_PERL is 0 ....some of the code in other modules uses $MOD_PERL and so you might find strange things happening.
Quote Reply
Re: [Paul] strange DBI error In reply to
I think this is because i setup mod_perl to run only in one dir, the folder where i put all the userside cgis.

So then the admin side scripts is not running under mod_perl, and that's why the environment there is 0 as Paul said.

But anyway i check the script environ for all user side scripts and they're all running under 1.

I assume and hope that it'll work fine!

Last edited by:

xpert: Aug 13, 2002, 2:55 AM