RE: [PEAR] problem using Pear's DB layer

From: Date: Mon, 07 Apr 2003 10:46:10 +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-4675@lists.php.net to get a copy of this message
Thanks Eduardo, is working fine now :) exaclty what i was after Tim. > -----Message d'origine----- > De : Frisket [mailto:frisket@softhome.net] > Envoye : vendredi 4 avril 2003 21:37 > A : tfletcher@netfactoriel.com; pear-general@lists.php.net > Objet : RE: [PEAR] problem using Pear's DB layer > > > 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 > > > > > > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.pear.general (#4675) next »