Re: DB::connect problem

From: Date: Wed, 17 Nov 2004 14:49:50 +0000
Subject: Re: DB::connect problem
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-15594@lists.php.net to get a copy of this message
> ----- Original Message ----- > From: Justin Patrin > To: Gastón > Cc: pear-general@lists.php.net > Sent: Tuesday, November 16, 2004 10:42 PM > Subject: Re: [PEAR] DB::connect problem > > > On Tue, 16 Nov 2004 19:23:49 -0300, Gastón <lkpo2004-gas@yahoo.com.ar> wrote: >> Hi! I've got this code: >> <?php >> require_once 'DB.php'; >> >> $user = 'aUser'; >> $pass = 'thePass'; >> $host = 'localhost'; >> $db_name = 'test'; >> $dsn = "mysql://$user:$pass@$host/$db_name"; >> >> echo "CONNECTING"; >> $db = DB::connect($dsn); >> >> echo "CHECKING ERRORS"; >> if (DB::isError($db)) { >> die("ERROR: ".$db->getMessage()); >> } >> >> echo "CONNECTED"; >> ?> >> But as result i've got this: >> CONNECTING >> >> But nothing else!! What could be the problem? I've tested the pear >> package date and it works fine. Could be a bug on DB? >> > > Check for a segfault in the apache log. Set error reporting to E_ALL. > Set a PEAR error callback which die()s with the error message. > > In addition, you should output the user info when getting PEAR errors, > especially from DB. > > die($err->getMessage().' '.$err->getUserInfo()); > > -- > Justin Patrin > Check for a segfault in the apache log. I've checked and there is no such error. > Set error reporting to E_ALL. I don't know how to do that... Could you tell me what file i have to modify? > In addition, you should output the user info when getting PEAR errors, especially from DB. > die($err->getMessage().' '.$err->getUserInfo()); I've done that but nothing changed. Thank you Justin and excuse me for my english. I don't speak it very good. I still don't know what the problem is... Gastón Fournier

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