|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67612 Unable to handle passwords with certain characters
Submitted: 2014-07-13 23:08 UTC Modified: 2015-07-19 04:22 UTC
From: twood at edao dot biz Assigned:
Status: No Feedback Package: PDO MySQL
PHP Version: master OS: Ubuntu 14
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2014-07-13 23:08 UTC] twood at edao dot biz
Attempting to connect to a mysql database with a password containing ")!" (e.g. 1234)!56) fails as if it is the wrong password.

Connecting to MySql directly (at the command line) with the same username and password works.

When the password is changed --just by removing the two characters-- connections at both the command line and from php work.

PHP version 5.5.9-1ubuntu4.3
mysql  Ver 14.14 Distrib 5.5.37, for debian-linux-gnu (x86_64) using readline 6.3
Both running on the same machine

Test script:
define('DB_HOST', 'localhost');
define('DB_NAME', 'nootcards');
define('DB_USERNAME', 'nootsite');
define('DB_PASSWORD', '3kDo3)!9a4X');
# Alphanumerics characters have been changed from the actual password
# but the password contains exactly the same number of passwords
# as the one that results in a failed connection

try {
	$dbh = new PDO('mysql:host='.DB_HOST.';dbname='.DB_NAME, DB_USERNAME, DB_PASSWORD);
} catch (PDOException $e) {
	return returnResult( 1000, "Database error: " . $e->getMessage() );


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-07-10 13:27 UTC]
-Status: Open +Status: Feedback -PHP Version: str_size_and_int64 branch +PHP Version: master
 [2015-07-10 13:27 UTC]
Can you still reproduce the problem with the laster PHP7 qa release?
 [2015-07-19 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Feb 25 06:01:26 2024 UTC