Ciao a tutti.. ho un grossissimo problema da una settimana e non so proprio come risolverlo
questo sorgente:
#! /usr/bin/perl
use lib '/sw/lib/perl5/5.8.6/darwin-thread-multi-2level';
use DBI;
$username = '';$password = 'andrea';$database = 'andrea';$hostname = 'localhost';
$dbh = DBI->connect("dbi:mysql:database=$database;" .
"host=$hostname;port=3306", $username, $password);
$SQL= "create table user(ID integer primary key " .
"auto_increment, username text not null," .
" password text not null, email text not null)";
$CreateTable = $dbh->do($SQL);
print "Content-type:text/html\n\n\n";
if($CreateTable){
print "Success";
}
else{
print "Failure
$DBI::errstr";
}
e quando lo faccio girare mi da questo messaggio di errore
install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /sw/lib/perl5/5.8.6/darwin-thread-multi-2level /sw/lib/perl5/darwin-thread-multi-2level /sw/lib/perl5 /sw/lib/perl5/darwin /System/Library/Perl/5.8.8/darwin-thread-multi-2level /System/Library/Perl/5.8.8 /Library/Perl/5.8.8/darwin-thread-multi-2level /Library/Perl/5.8.8 /Library/Perl /Network/Library/Perl/5.8.8/darwin-thread-multi-2level /Network/Library/Perl/5.8.8 /Network/Library/Perl /System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.8 /Library/Perl/5.8.6 /Library/Perl/5.8.1 .) at (eval 3) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Pg, Proxy, SQLite, Sponge.
at ./esempio2.pl line 6
ho già provato ad installare di tutto (DBI-1.607, DBD-mysql-4.010 e questo mi da problemi ad installarlo) ma non mi funziona... qualcuno ha suggerimenti? io ho un Mac con Leopard come sistema operativo.... NON SO PIù DOVE SBATTERE LA TESTA
GRAZIE!!!!

Rispondi quotando
