php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61590 mysql_real_escape_string() doesn't like mysqlnd_ms
Submitted: 2012-04-01 07:06 UTC Modified: 2012-05-02 15:02 UTC
From: nick at ihighteam dot com Assigned: uw (profile)
Status: Closed Package: mysqlnd_ms (PECL)
PHP Version: 5.3.10 OS: FreeBSD
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nick at ihighteam dot com
New email:
PHP Version: OS:

 

 [2012-04-01 07:06 UTC] nick at ihighteam dot com
Description:
------------
This may already be known:  mysql_real_escape_string(), unlike mysql_escape_string(), requires a link identifier or an open connection to derive the character set.  So, mysql_real_escape_string() doesn't seem to work with mysqlnd_ms.  According to this comment, lazy_connections must be disabled:

"In order to use doctrine 2.1+ with mysqlnd_ms lazy_connections must be disabled. Otherwise a warning will be thrown & no query processed:
Warning: PDOStatement::execute(): (mysqlnd_ms) string escaping doesn't work without established connection."

From: http://php.net/manual/en/mysqlnd-ms.plugin-ini-json.php

What would be the best way to make these work together without disabling lazy connections?


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-05-02 15:02 UTC] uw@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: uw
 [2012-05-02 15:02 UTC] uw@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

Good one, Nick!

Fixed in 1.4. Please, see http://docs.php.net/manual/en/mysqlnd-ms.plugin-ini-json.php -> server_charset.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 05:01:30 2024 UTC