RE: [PEAR] problem using Pear's DB layer
| From: | Frisket | Date: | Fri, 04 Apr 2003 19:37:27 +0000 |
| Subject: | RE: [PEAR] problem using Pear's DB layer | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-4649@lists.php.net to get a copy of this message | ||
Hi Tim,
It happened something similar to me one time, all worked fine before the
DB::connect call, but after that, nothing... no errors just a blank
page.
I seems that the problem (in my case) it was that DB wasn't finding
PEAR.php so what I did was: ini_set('include_path',
"path_to_your_pear_installation"); and problem solved, all worked fine.
Try this, it might work for you too.
Eduardo Morales
> -----Original Message-----
> From: Tim [mailto:tfletcher@netfactoriel.com]
> Sent: Friday, April 04, 2003 6:37 AM
> To: Christian Joergensen; pear-general@lists.php.net
> Subject: RE: [PEAR] problem using Pear's DB layer
>
> this is what i have so far:
> --snip--
> require_once 'DB.php';
> $user = 'root';
> $pass = 'zigomushy';
> $host = '192.168.0.23';
> $db_name = 'spip_marcou';
> // Data Source Name: This is the universal connection string $dsn =
> "mysql://$user:$pass@$host/$db_name";
> print($dsn);
> // DB::connect will return a PEAR DB object on success
> // or an PEAR DB Error object on error
> $db=DB::connect($dsn); // **This is where the problem is**
>
> if (DB::isError($db)) {
> die ($db->getMessage());
> }
> print("connection OK");
> --snip--
>
> it prints out the dsn string, but no error is printed afterwards or
> the string "connection OK". i have no problem connecting to the mySQL
> server with the above access codes.
>
> Thanks
> Tim
>