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
 [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

Pull Requests

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: Sun Nov 03 08:01:28 2024 UTC