Help With PEAR::DB Connection
| From: | php-list at xenonsolutions dot com | Date: | Sat, 11 Sep 2004 06:48:43 +0000 |
| Subject: | Help With PEAR::DB Connection | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-196389@lists.php.net to get a copy of this message | ||
Hello everyone,
I have a problem connecting to the Database. When I execute the code at the
bottom, it gives me this message: "DB Error: extension not found". It sees
the DB file and the parameters are correct. I checked the include path and
it was correct. Did I do something wrong? Any help would be greatly
appreciated. Thank you.
require_once 'DB.php';
$user = 'foo';
$pass = 'bar';
$host = 'localhost';
$db_name = 'clients_db';
$dsn = "mysql://$user:$pass@$host/$db_name";
$db = DB::connect($dsn);
if (DB::isError($db)) {
die ($db->getMessage());
}
-- Nilaab