I'm getting this error from some code that is attempting to connect to
mysql via DBI. The same snippet of code works fine from the command. I did
not install any of the software, but given that this works form the
command line I tend to believe that mysql and the perl DBI module are
installed and working properly. this leaves the apache / mod_perl
configuration I guess?
I can give more specifics about the versions if need be, but it's a Red
Hat Linux 6.0 box with apache_1.3.11, mod_perl-1.19 and mysql-3.22.30
This is my first experience with mod_perl, so please be gentle :)
thanks
charles
The exact error
install_driver(mysql) failed: Can't locate
loadable object for module Mysql in @INC
(@INC contains: /usr/local/apache/lib
/usr/local/lib/perl5/5.00503/i686-linux
/usr/local/lib/perl5/5.00503
/usr/local/lib/perl5/site_perl/5.005/i686-linux
/usr/local/lib/perl5/site_perl/5.005 .
/usr/local/apache/ /usr/local/apache/lib/perl)
at (eval 27) line 3 Perhaps a module that
DBD::mysql requires hasn't been fully
installed at /usr/local/apache/lib/MP3/DB.pm
line 29
The command line stuff
#less test.pl
#!/usr/local/bin/perl -w
use strict;
use DBI;
my $dsn = 'DBI:mysql:MP3:host=myhost';
my $user = 'user';
my $password = 'pssst';
my $db = DBI->connect($dsn, $user, $password, { RaiseError => 1 });
($db) ? print "db connection ok\n" : print "db connection bad\n";
$db->disconnect;
# ./test.pl
db connection ok
# perl -e 'print "@INC"'
/usr/local/lib/perl5/5.00503/i686-linux
/usr/local/lib/perl5/5.00503
/usr/local/lib/perl5/site_perl/5.005/i686-linux
/usr/local/lib/perl5/site_perl/5.005
.
mysql via DBI. The same snippet of code works fine from the command. I did
not install any of the software, but given that this works form the
command line I tend to believe that mysql and the perl DBI module are
installed and working properly. this leaves the apache / mod_perl
configuration I guess?
I can give more specifics about the versions if need be, but it's a Red
Hat Linux 6.0 box with apache_1.3.11, mod_perl-1.19 and mysql-3.22.30
This is my first experience with mod_perl, so please be gentle :)
thanks
charles
The exact error
install_driver(mysql) failed: Can't locate
loadable object for module Mysql in @INC
(@INC contains: /usr/local/apache/lib
/usr/local/lib/perl5/5.00503/i686-linux
/usr/local/lib/perl5/5.00503
/usr/local/lib/perl5/site_perl/5.005/i686-linux
/usr/local/lib/perl5/site_perl/5.005 .
/usr/local/apache/ /usr/local/apache/lib/perl)
at (eval 27) line 3 Perhaps a module that
DBD::mysql requires hasn't been fully
installed at /usr/local/apache/lib/MP3/DB.pm
line 29
The command line stuff
#less test.pl
#!/usr/local/bin/perl -w
use strict;
use DBI;
my $dsn = 'DBI:mysql:MP3:host=myhost';
my $user = 'user';
my $password = 'pssst';
my $db = DBI->connect($dsn, $user, $password, { RaiseError => 1 });
($db) ? print "db connection ok\n" : print "db connection bad\n";
$db->disconnect;
# ./test.pl
db connection ok
# perl -e 'print "@INC"'
/usr/local/lib/perl5/5.00503/i686-linux
/usr/local/lib/perl5/5.00503
/usr/local/lib/perl5/site_perl/5.005/i686-linux
/usr/local/lib/perl5/site_perl/5.005
.