php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69066 Mysql connect fails when using double quotes with parameters and dollar sign
Submitted: 2015-02-17 14:15 UTC Modified: 2015-02-18 10:17 UTC
From: webframes at gmail dot com Assigned:
Status: Not a bug Package: mysql (PECL)
PHP Version: 5.4.37 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: webframes at gmail dot com
New email:
PHP Version: OS:

 

 [2015-02-17 14:15 UTC] webframes at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.mysql-connect
---
Mysql connect fails when using double quotes with parameters that have the dollar sign. This can be reproduced using the following:
mysql_connect("localhost","test","test$password");
Although this works when you use the single quote, however it fails with the double quote.



Test script:
---------------
mysql_connect("localhost","test","test$password");


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-02-18 10:17 UTC] ab@php.net
-Status: Open +Status: Not a bug
 [2015-02-18 10:17 UTC] ab@php.net
When double quoted, the string will interpret $ as a variable start. Please read more here about the strings http://php.net/manual/de/language.types.string.php 

Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 22:01:30 2024 UTC