DB Error: not found
| From: | Burhan Bozkurt | Date: | Thu, 18 Dec 2003 20:16:32 +0000 |
| Subject: | DB Error: not found | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-9686@lists.php.net to get a copy of this message | ||
Hi,
I was able to run my script at my previous server but
now I can not connect to my database with PEAR DB. I
can connect with the standart php connection
functions. Here is my connection script
------------
function &db_connect() {
require_once 'DB.php';
$db_host = 'localhost';
$db_user = 'myusername';
$db_pass = 'mypass';
$db_name = 'mydb';
$dsn =
"mysql://$db_user:$db_pass@$db_host/$db_name" or
die("dsn failed");
$db = DB::connect($dsn);
if(DB::isError($db)) {
die($db->getMessage());
}
$db->setFetchMode(DB_FETCHMODE_OBJECT);
$db->setErrorHandling(PEAR_ERROR_DIE);
return $db;
}
------------
and I get this error message:
DB Error: not found
I know my database is there and there is nothing wrong
with user, passwd, db name and table. What could be
the reason for that.
I would be very glad to have any kind of help. Thank
you.
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/