|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-10-09 16:35 UTC] kyrian at ore dot org
Description: ------------ @ sign in mysql password will not connect. If you try exactly the same code without an '@' sign in the password, and change things at the MySQL side, things work again. My guess is that something internal to PHP creates a DSN out of the supplied data and uses that to connect to the server, but the '@' in the password interferes with the DSN's structure, hence reporting it here as a PHP bug instead of a MySQL one. Reproduce code: --------------- I came accross this in a class I have been writing and can't post the whole class, the issue is simple enough to reproduce code for though... Expected result: ---------------- A connection to work. Actual result: -------------- Connection fails, a warning is logged to the error log of apache. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 20 21:00:02 2025 UTC |
Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. Even a small functional one, I can't reproduce this myself with a simple <?php mysql_connect('localhost', 'user', 'p@ss'); ?>