errors when try to acces a database
| From: | fragorino88 | Date: | Sat, 24 Sep 2011 13:54:33 +0000 |
| Subject: | errors when try to acces a database | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-31235@lists.php.net to get a copy of this message | ||
Hi everybody
I'm using XAMPP on Ubuntu 10.10 and i installed PEAR.
I just wanna to connect to my database so i write down example.php
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();
when i use the script a lot of errors displayed:
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::parseDSN() 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
Any idea why
--
View this message in context: http://old.nabble.com/errors-when-try-to-acces-a-database-tp32503902p32503902.html
Sent from the Pear - General mailing list archive at Nabble.com.