php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59136 Problem with prefix and binary protocol
Submitted: 2010-03-29 08:20 UTC Modified: 2010-04-01 13:19 UTC
From: wedgedkc at hotmail dot com Assigned:
Status: Closed Package: memcached (PECL)
PHP Version: 5.3.0 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
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:
34 - 29 = ?
Subscribe to this entry?

 
 [2010-03-29 08:20 UTC] wedgedkc at hotmail dot com
Description:
------------
I'm having the same issue as this person[1]. Is this a bug with the extension or libmemcached?

[1] http://lists.tangent.org/pipermail/libmemcached/2010-March/001058.html


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-29 11:31 UTC] andrei@php.net
This was fixed in the following commit on GitHub:

http://github.com/andreiz/php-memcached/commit/6abbe4b9f486224b4174764a4e7de15a73a6fa16
 [2010-04-01 09:27 UTC] wedgedkc at hotmail dot com
Are you sure that fix is relevant? Shouldn't the third get 
below return "hello1"? I get "hello2". Latest rev from git.

    $memcache = new Memcached();
    $memcache->setOption(Memcached::OPT_BINARY_PROTOCOL, 
true);
    $memcache->setOption(Memcached::OPT_PREFIX_KEY, 
'prefix1');
    $memcache->addServer('127.0.0.1', 11211);
    $memcache->set('test', "hello1", 120);
    var_dump($memcache->get('test'));

    $memcache2 = new Memcached();
    $memcache2->setOption(Memcached::OPT_BINARY_PROTOCOL, 
true);
    $memcache2->setOption(Memcached::OPT_PREFIX_KEY, 
'prefix2');
    $memcache2->addServer('127.0.0.1', 11211);
    $memcache2->set('test', "hello2", 120);
    var_dump($memcache2->get('test'));

    var_dump($memcache->get('test'));
 [2010-04-01 13:19 UTC] andrei@php.net
This is a bug in libmemcached. I notified them, so as soon as they fix it, you will be able to use key prefixes with binary protocol.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 14:01:29 2024 UTC