Ciao a tutti
Uso XAMPP su Ubuntu 10.10 e sto cercando di usare PEAR.
Come primo passo voglio solo connettermi al database, cosa che sono in grado di fare con la classica sintassi PHP, invece voglio imparare a farlo con PEAR, ecco il codice PEAR
include ('db_login.php');
require_once ('DB.php');
$connection = DB::connect ("mysql://$db_username:$db_password@$db_host/$db_database");
if (DB::isError($connection)) {
die ("connection failed" .DB::errorMessage($connection));
}
$connection->disconnect();
ecco cosa succede
Deprecated: Assigning the return value of new by reference is deprecated in /opt/lampp/lib/php/DB.php on line 470
Deprecated: Assigning the return value of new by reference is deprecated in /opt/lampp/lib/php/DB.php on line 547
Deprecated: Assigning the return value of new by reference is deprecated in /opt/lampp/lib/php/DB.php on line 1124
Strict Standards: Non-static method DB::connect() should not be called statically in /opt/lampp/htdocs/prove/select_pear (copy).php on line 6
Strict Standards: Non-static method DB:arseDSN() should not be called statically in /opt/lampp/lib/php/DB.php on line 520
Strict Standards: Non-static method DB::isError() should not be called statically in /opt/lampp/lib/php/DB.php on line 557
Strict Standards: Non-static method DB::isError() should not be called statically in /opt/lampp/htdocs/prove/select_pear (copy).php on line 7
Forse queste istruzioni PEAR sono obsolete?