Bug #13923 Updated: The PEAR error object returned by DB::connect is not recognized as such

From: Date: Mon, 05 Nov 2001 03:06:37 +0000
Subject: Bug #13923 Updated: The PEAR error object returned by DB::connect is not recognized as such
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-2546@lists.php.net to get a copy of this message
ID: 13923 Updated by: cox Reported By: vigna@dsi.unimi.it Old Status: Open Status: Closed Bug Type: PEAR related Operating System: Red Hat Linux PHP Version: 4.0.6 New Comment: Seems that MySQL always let you connect with any user (even if it doesn't exist) when you don't suply a password, and only throw the no permissions error when you want to access the data (ie. doing a query). It's a MySQL behaviour, sorry can't do anything on that. Tomas V.V.Cox Previous Comments: ------------------------------------------------------------------------ [2001-11-04 18:09:57] vigna@dsi.unimi.it My PHP setup is a standard RH 7.2 PHP installation. After trying to open a MySQL database using the PEAR database abstraction layer, using a username that does not exists and no password (but an existing database), I get the following error object: db_error Object ( [error_message_prefix] => [error_prepend] => [error_append] => [mode] => 1 [level] => 1024 [code] => -1 [message] => DB Error: unknown error [debuginfo] => [userinfo] => mysql://webuser@localhost/DSI [callback] => ) However, db::isError() returns *FALSE* on this object. Thus, I cannot distinguish whether the database connection has been established or not. ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=13923&edit=1

« previous php.pear.dev (#2546) next »