|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-07-10 13:27 UTC] tyrael@php.net
-Status: Open
+Status: Feedback
-PHP Version: str_size_and_int64 branch
+PHP Version: master
[2015-07-10 13:27 UTC] tyrael@php.net
[2015-07-19 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 02:00:01 2025 UTC |
Description: ------------ 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() ); }