memcached append() php ubuntu - bad protocol

Posted by awongh on Server Fault See other posts from Server Fault or by awongh
Published on 2010-03-29T01:47:10Z Indexed on 2010/03/29 1:53 UTC
Read the original article Hit count: 612

Filed under:
|
|
|
|

I am running ubuntu gutsy(7.1) , php5 and I am trying to get memcached running locally. I installed everything as per the docs: memcached daemon, php PECL extension, libevent, etc.

But now I can only run half of the example script for memcached append():

<?php
$m = new Memcached();
$m->addServer('localhost', 11211);
$m->setOption(Memcached::OPT_COMPRESSION, false);

$m->set('foo', 'abc');
$m->append('foo', 'def');
var_dump($m->get('foo'));
?>

the script terminates @ append() with an RES_BAD_PROTOCOL error message. It still runs the get(). I don't know why memcached would otherwise be working fine (connect, set, get - with the correct value of 'abc') and not work for append.

it also doesnt work with prepend.

I believe I have the setup correct, but I am not sure. Maybe there are compatibility problems between the versions of the dependecies?

thanks much

© Server Fault or respective owner

Related posts about php

Related posts about memcached