|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53496 strange bug with mcrypt, base64 and mysql
Submitted: 2010-12-08 12:44 UTC Modified: 2012-02-21 07:40 UTC
From: ulrich1992 at web dot de Assigned:
Status: Not a bug Package: mcrypt related
PHP Version: 5.3.1RC2 OS: Windows XP SP3 Professional
Private report: No CVE-ID: None
 [2010-12-08 12:44 UTC] ulrich1992 at web dot de
I'm doing a webshop system, and I think, I have found a strange bug in mcrypt.
I have to encrypt a string with a number(secret PIN), then encode it with base64, and insert it to a datebase (MySQL).

Then in the admin frontend for my shop, I have to decode and decrypt it, to show it to the shop administrator.
This works in the most of cases. But for example when the PIN is "1234" and the key is "ganzgehein", and I try to decrypt it, it only produces binary rubbish, instead of the expected PIN.
I can't reproduce this bug in a single example file, so i have to upload my complete project. Sorry it's in german language, but there is not very much text, so I think you can understand it by using a automatic translator like Googles.

PS: I am using XAMPP

Test script:

It's hosted on because I can't install a ftp client on this machine.

Expected result:
See notice_for_bugreport.txt for details.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-08 13:21 UTC]
-Status: Open +Status: Feedback
 [2010-12-08 13:21 UTC]
Please try with a decent version, like 5.3.4RC2 or 5.3.3.
 [2010-12-08 14:20 UTC]
Also, you need to provide a *short* reproducible script. Not your whole webshop.
 [2012-02-21 07:40 UTC]
No feedback for over a year and I highly doubt this is an actual bug.
 [2012-02-21 07:40 UTC]
-Status: Feedback +Status: Not a bug
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Dec 04 00:01:26 2023 UTC