|  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
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.
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-2022 The PHP Group
All rights reserved.
Last updated: Tue Oct 04 22:05:52 2022 UTC