#35764 [Opn->Bgs]: Showing connectiondata if driver are missing

From: Date: Wed, 21 Dec 2005 15:41:00 +0000
Subject: #35764 [Opn->Bgs]: Showing connectiondata if driver are missing
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-90820@lists.php.net to get a copy of this message
 ID:               35764
 Updated by:       tony2001@php.net
 Reported By:      thorny at meisterderspiele dot de
-Status:           Open
+Status:           Bogus
 Bug Type:         PDO related
 Operating System: Mandriva Linux 2006
 PHP Version:      5.1.1
 New Comment:

Error messages are not supposed to be shown to the users, they are for
debug purposes only.


Previous Comments:
------------------------------------------------------------------------

[2005-12-21 16:31:50] thorny at meisterderspiele dot de

Description:
------------
Sorry for me bad English - i hope you can understand me:

I created a PHP without the drivers for PDO-MySQL and tryed to use the
PDO-MYSQL. Then an error-message occurs:

Uncaught exception 'PDOException' with message 'could not find driver'
in $file:5 Stack trace: #0 $file(5):
PDO->__construct('mysql:host=loca...', 'username', 'password') #1
{main} thrown in $file on line 5

It is not really a bug, but it is not to nice, to show the user my
MySQL username and password.

Reproduce code:
---------------
$user = "username";
$pass = "password";
$dbh = new PDO('mysql:host=localhost;dbname=test', $user, $pass);

Expected result:
----------------
Error Message like:
Uncaught exception 'PDOException' with message 'could not find driver'
in $file:5 Stack trace: #0 $file(5):
PDO->__construct('mysql:host=loca...', 'username', 'password') #1
{main} thrown in $file on line 5



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35764&edit=1


Thread (2 messages)

« previous php.bugs (#90820) next »