|  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
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:
Bug Type:
From: gabriel dot preda at amr dot ro
New email:
PHP Version: OS:


 [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-2024 The PHP Group
All rights reserved.
Last updated: Fri Feb 23 01:01:30 2024 UTC