When I save some data on one server using the memcached PHP client library, and try to read it from another server using the memcache (no D) PHP client library, it seems to get a lot of garbage characters in there.
I've tried setOption(Memcached::OPT_BINARY_PROTOCOL, true)
on the memcached side of things, to no avail.
Here are the settings we have for the memcached library:
$memcache_obj->setOption(Memcached::OPT_DISTRIBUTION, Memcached::DISTRIBUTION_CONSISTENT);
$memcache_obj->setOption(Memcached::OPT_LIBKETAMA_COMPATIBLE, true);
$memcache_obj->setOption(Memcached::OPT_CONNECT_TIMEOUT, 50);
$memcache_obj->setOption(Memcached::OPT_SERVER_FAILURE_LIMIT, 2);
$memcache_obj->setOption(Memcached::OPT_NO_BLOCK, true);
Why do we need this? We used a mixed server environment, where we require Windows and Linux web servers. However, there is no precompiled memcached PHP client DLL for Windows (see Does memcached.dll exist?). We want to switch from storing sessions in MySQL to memcached. Switching to a unified Linux environment is not an option due to specialized software that we need on our Windows machines.