List:MySQL and Perl« Previous MessageNext Message »
From:Garth Webb Date:April 6 2004 7:36pm
Subject:Re: Can't locate object method "connect" via package "DBI"
View as plain text  
Your problem is one of:

1) The DBI module is not installed
2) DBI is installed, but @INC does not have the correct path for
   it, so perl can't find it
3) DBI is installed, @INC is correct, but you module does not do
   'use DBI'

On Mon, 2004-04-05 at 21:09, 영우 wrote:
> Hi all...
> I am getting this error message.. 
> I dont know how I solve this problem. help me please
>  
> When I go to webpage I get following CGI error
> ------ Error message ------
> Can't locate object method "connect" via package "DBI" at
> /home/moonbw/public_html/mt/lib/MT/ObjectDriver/DBI/mysql.pm line 48.
> --------------------------
>  
>  
> mysql.pm line 48 is below
>  
> 41>sub init {
> 42>    my $driver = shift;
> 43>    $driver->SUPER::init(@_);
> 44>    my $cfg = $driver->cfg;
> 45>    my $dsn = 'dbi:mysql:database=' . $cfg->Database;
> 46>   $dsn .= ';hostname=' . $cfg->DBHost if $cfg->DBHost;
> 47>    $dsn .= ';mysql_socket=' . $cfg->DBSocket if $cfg->DBSocket;
> 48>    $driver->{dbh} = DBI->connect($dsn, $cfg->DBUser,
> $cfg->DBPassword,
> 49>        { RaiseError => 0, PrintError => 0 })
> 50>        or return $driver->error(MT->translate("Connection error:
> [_1]",
> 51>             $DBI::errstr));
> 52>    $driver;
> 53>}
>  
> what's the matter?
>  
-- 

 |- Garth Webb       -|
 |- garth@stripped -|

Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
Thread
Can't locate object method "connect" via package "DBI"6 Apr
Re: Can't locate object method "connect" via package "DBI"Garth Webb6 Apr