php.net |  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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
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
Description:
------------
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 />";
var_dump($mysqli);
$u = $mysqli->real_escape_string($u);
echo "<br />-----".$u."----";

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


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

Patches

Pull Requests

History

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: Sat Dec 21 15:01:29 2024 UTC