php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35764 Showing connectiondata if driver are missing
Submitted: 2005-12-21 16:31 UTC Modified: 2005-12-21 16:40 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: thorny at meisterderspiele dot de Assigned:
Status: Not a bug Package: PDO related
PHP Version: 5.1.1 OS: Mandriva Linux 2006
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: thorny at meisterderspiele dot de
New email:
PHP Version: OS:

 

 [2005-12-21 16:31 UTC] 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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-21 16:40 UTC] tony2001@php.net
Error messages are not supposed to be shown to the users, they are for debug purposes only.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jan 05 04:01:29 2025 UTC