Skip to content

Binary protocol is broken #77

Closed
Closed
@ziadloo

Description

@ziadloo

I've been having trouble using binary protocol in very simple scenarios. For instance:

<?php
$mc = new \Memcached();
$mc->setOption(\Memcached::OPT_BINARY_PROTOCOL, true);
$mc->addServer("127.0.0.1", 11211);

$mc->touch("key", time() + 600);
$touchResult = $mc->getResultCode();
$mc->set("key", 1, time() + 600);
$setResult = $mc->getResultCode();

echo "<pre>";
echo "Touch result: $touchResult\n";
echo "Set result: $setResult\n";
echo "</pre>";

The first run outputs:

Touch result: 16 [RES_NOTFOUND]
Set result: 0 [RES_SUCCESS]

And the second run forth will output:

Touch result: 0 [RES_SUCCESS]
Set result: 5 [RES_WRITE_FAILURE]

Here are my system's configurations:

  • Ubuntu 12.04 64bit
  • PHP 5.3.14
  • memcached 2.1.0 (PECL module)
  • libmemcached 1.0.8
  • Memcached sever 1.4.13

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions