|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32186 mysqli_real_escape_string
Submitted: 2005-03-04 10:58 UTC Modified: 2005-03-04 11:50 UTC
From: gabriel dot preda at amr dot ro Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5CVS-2005-03-04 (dev) OS: Fedora Core 2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
23 - 7 = ?
Subscribe to this entry?

 [2005-03-04 10:58 UTC] gabriel dot preda at amr dot ro
mysqli_real_escape_string is corrupted !

Reproduce code:
$u = $_POST['uname'];
$p = $_POST['pword'];
echo $u . "-" . $p;
$mysqli = new mysqli($MYSQL['server'], $MYSQL['username'], $MYSQL['password'], $MYSQL['database']);
$mysqli->query("SET NAMES '".$MYSQL['charset']."'");
print "<br />";
$u = $mysqli->real_escape_string($u);
echo "<br />-----".$u."----";

Expected result:
object(mysqli)#1 (0) { } 

Actual result:
object(mysqli)#1 (0) { } 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-04 11:50 UTC] gabriel dot preda at amr dot ro
Sorry... my mistake...
The problema was because MySQL introduced the ANONYMOUSE account... the MySQLi returned the object but I had no priviledges to any database !

Sorry ! Me culpa !
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Oct 05 00:05:52 2022 UTC