In my (very) limited experience with PEAR::DB, I've found that getMessage() doesn't give very verbose error messages :). So if I'm really having a problem, I do all 4 of these: echo 'Standard Message: ' . $db->getMessage() . "<br>\n"; echo 'Standard Code: ' . $db->getCode() . "<br>\n"; echo 'DBMS/User Message: ' . $db->getUserInfo() . "<br>\n"; echo 'DBMS/Debug Message: ' . $db->getDebugInfo() . "<br>\n"; At least for me, this gives me a lot more useful information (DB 1.6.8, but PHP 5.0.3). Hope this helps. On Thu, 6 Jan 2005 11:42:03 -0500, Jason Davis <cephme@xxxxxxxxx> wrote: > Pear DB version is 1.6.8 > > > "Jason Davis" <cephme@xxxxxxxxx> wrote in message > news:20050106162049.40208.qmail@xxxxxxxxxxxxxxx > > MySQL 4.1 > > PHP 4.3.10 > > PEAR 0.5.0 (I think, not sure how to test that) > > > > On two different boxes > > one is an XP Pro box > > one is an Win2K Pro Box > > > > both running IIS > > > > "Richard Hutchins" <Richard.Hutchins@xxxxxxxxxxxxxx> wrote in message > > news:1EA7D3AE70ACD511BE6D006097A78C1E0588813B@xxxxxxxxxxx > > > What version of PHP? > > > What version of MySQL? > > > > > > -----Original Message----- > > > From: Jason Davis [mailto:cephme@xxxxxxxxx] > > > Sent: Thursday, January 06, 2005 10:42 AM > > > To: php-db@xxxxxxxxxxxxx > > > Subject: Trying to connext to MySQL with PEAR > > > > > > > > > Hi all I am new to PHP and am trying to connect to mysql for the first > > time. > > > I get activity on the mysql monitor when I run it, but get the following > > > error. > > > > > > DB Error: connect failed > > > > > > The lines of code are: > > > require_once( "DB.php" ); > > > $dsn = "mysql://".DB_USER.":".DB_PASS."@".DB_SERVER."/".DB_NAME; > > > echo $dsn; > > > $isPersistant = TRUE; > > > $db = DB::connect($dsn, $isPersistant); > > > > > > if ( DB::isError( $db ) ) { > > > die ($db->getMessage()); > > > } > > > > > > The constants are properly defined and passing through to this page > > (checked > > > with echo), the database is created, the user has an account, and the > > > account has rights to do all funcitons on the db. Any thoughts on what > > might > > > be wrong? > > > > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php