php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42905 @ sign in mysql password will not connect
Submitted: 2007-10-09 16:35 UTC Modified: 2010-08-18 12:36 UTC
From: kyrian at ore dot org Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.2.4 OS: Fedora release 7 (Moonshine)
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: kyrian at ore dot org
New email:
PHP Version: OS:

 

 [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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-09 16:59 UTC] scottmac@php.net
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');
?>
 [2007-10-17 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2010-08-18 12:36 UTC] andrey@php.net
-Status: No Feedback +Status: Bogus
 [2010-08-18 12:36 UTC] andrey@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Nothing wrong in the code.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 13:01:30 2024 UTC