On Sat, Sep 11, 2004 at 01:48:43AM -0500, [EMAIL PROTECTED] wrote:
> 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:[EMAIL PROTECTED]/$db_name";
> $db = DB::connect($dsn);
> if (DB::isError($db)) {
>     die ($db->getMessage());
> }
> 
> -- Nilaab
> 

The message 'extension not found' means that PEAR couldn't find the mysql db
extension. Hmm. In cases like this, create a phpinfo.php file as documented on
this list and see what shows up. Or, you can type at the command prompt: php
-i, then look for the MySQL extension in the output.

Also, you neglected to tell us what OS you are running, etc.

-- 
Jim Kaufman
Linux Evangelist
public key 0x6D802619
---
A dog teaches a boy fidelity, perseverance, and to turn around three
times before lying down.
                -- Robert Benchley

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to