Jim,

Thank you. Problem solved thanks to you. The moment you said that PEAR::DB
is not finding the MySQL extention I realized that the extension in php.ini
hasn't been commented out and the extension folder had not been recognized
by PHP. I forgot we had to do that in PHP5. Everything is working like a
charm now. I really appreciate your time and concern.

Nilaab


P.S. -- And sorry, I'm using Windows XP as the development environment and
Linux as the server. The Windows OS is where I was having the problem.
Thanks again...


-----Original Message-----
From: James Kaufman [mailto:[EMAIL PROTECTED] 
Sent: Saturday, September 11, 2004 7:50 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Help With PEAR::DB Connection

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

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

Reply via email to