php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58022 Invalid handling of non-ascii keys on 64-bit systems
Submitted: 2008-01-30 06:50 UTC Modified: 2008-02-05 15:03 UTC
From: erikg at codepoet dot no Assigned:
Status: Duplicate Package: memcache (PECL)
PHP Version: 5.2.1 OS: ArchLinux
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:
Package:
Bug Type:
Summary:
From: erikg at codepoet dot no
New email:
PHP Version: OS:

 

 [2008-01-30 06:50 UTC] erikg at codepoet dot no
Description:
------------
On 64-bit systems, keys with non-ascii characters aren't handled correctly. The following code returns false on 32-bit systems, but "value" on 64-bit systems.

It seems like non-ascii characters are simply replaced with _.

Reproduce code:
---------------
$c = new MemCache();
$c->connect("localhost");
$c->flush();

$c->set("?", "value");
var_dump($c->get("?"));

Expected result:
----------------
false

Actual result:
--------------
"value"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-01-30 15:02 UTC] mikael at synd dot info
This sounds like a duplicate of Bug #12883 (http://pecl.php.net/bugs/bug.php?id=12883), please checkout and try the latest source from CVS and re-open the bug if the problem persists. You can build from CVS like:

 cvs -d :pserver:cvsread@cvs.php.net:/repository co pecl/memcache
 cd pecl/memcache
 phpize
 ./configure
 make && make install

//Mikael
 [2008-02-05 08:59 UTC] erikg at codepoet dot no
Confirmed, fixed in cvs
 [2008-02-05 15:03 UTC] mikael at synd dot info
Fixed in release 2.2.3
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Apr 17 05:01:24 2021 UTC