Page 1 of 1

Can't locate dbi.pm in @INC

PostPosted: 11. March 2005 05:40
by arun
i am working with xampp

while connect to database i got the following error

[Fri Mar 11 10:03:58 2005] [error] [client 127.0.0.1] Can't locate dbi.pm in @INC (@INC contains: /opt/lampp/lib/perl5/5.8.6/i686-linux /opt/lampp/lib/perl5/5.8.6 /opt/lampp/lib/perl5/site_perl/5.8.6/i686-linux /opt/lampp/lib/perl5/site_perl/5.8.6 /opt/lampp/lib/perl5/site_perl .) at /usr/almeorg/public_html/cgi-bin/test_db.pl line 3.
[Fri Mar 11 10:03:58 2005] [error] [client 127.0.0.1] BEGIN failed--compilation aborted at /usr/almeorg/public_html/cgi-bin/test_db.pl line 3.
[Fri Mar 11 10:03:58 2005] [error] [client 127.0.0.1] Premature end of script headers: test_db.pl

how to solve this

Following are my test_db .pl code

#!/usr/bin/perl

use dbi;
use CGI;

my $driver = "mysql";
my $server = "localhost";
my $database = "test";
my $url = "DBI:$driver:$database:$server";
my $user = "";
my $password = "";
DBI->connect( $url, $user, $password ) or die "Failure!\n";
print "Success!\n";


any help...

PostPosted: 11. March 2005 15:53
by Dave_L
My Perl skills are rusty, but I think it's case-sensitive. Try changing:

use dbi;

To:

use DBI;