php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31938 mysqli_prepare + MD5 problem
Submitted: 2005-02-11 19:26 UTC Modified: 2005-03-20 18:09 UTC
From: stas at okean dot de Assigned:
Status: No Feedback Package: MySQLi related
PHP Version: 5.0.3 OS: Windows XP Professional
Private report: No CVE-ID: None
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:
MUST BE VALID
Solve the problem:
33 - 6 = ?
Subscribe to this entry?

 
 [2005-02-11 19:26 UTC] stas at okean dot de
Description:
------------
When using mysqli_perpare/execute/bind/fetch combination to retrieve a MD5 hash from the database php replaces the last character of the hash throug a hex(00) character. A mysqli_query/fetch_row works correctly.

Reproduce code:
---------------
$mysqli->prepare("SELECT MD5('a')");
$ps->execute();
$ps->bind_result($hash);
$ps->fetch();
$ps->close();

echo $hash;

Expected result:
----------------
0cc175b9c0f1b6a831c399e269772661

Actual result:
--------------
0cc175b9c0f1b6a831c399e26977266

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-28 20:43 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-03-20 18:09 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun May 11 10:01:27 2025 UTC