php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #62855 After upgrade to PHP 5.3.15 memcached key compression method changed.
Submitted: 2012-08-18 14:34 UTC Modified: 2021-06-09 11:52 UTC
Votes:3
Avg. Score:3.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: quentin389 at gmail dot com Assigned: cmb (profile)
Status: Closed Package: memcached (PECL)
PHP Version: Irrelevant OS: CentOS 5.8
Private report: No CVE-ID: None
 [2012-08-18 14:34 UTC] quentin389 at gmail dot com
Description:
------------
Hi,
when working on fixing problems with memcached after upgrading from PHP 5.3.13 to 5.3.15 recently (see bug 62801 I reported) we have discovered that we cannot use older PHP versions with the same memcached server any longer.

A simple situation:

PHP Server 1 has PHP 5.3.6 and cannot be upgraded

PHP Server 2 had PHP 5.3.13 but was upgraded to 5.3.15

Both of those servers connect to the same memcached server and use the same keys. Server 1 is a cron server so it uses CLI and server 2 is a frontend server so we connect via apache.

Before the server 2 upgrade everything was working fine - when we set some key on server 2 we were able to read it from memcached on server 1 without any problems.
After the upgrade each time we want to read on server 1 a key set by server 2 we get PAYLOAD FAILURE message from PHP memcached.

However, when we temporarily moved our cronjobs to a fresh server with 5.3.15, everything went back to normal.

My guess is that it means that some compression method was changed in PHP 5.3.14 or PHP 5.3.15 and users were not informed about it in any changelog.

Breaking backwards compatibility seems to me like a huge deal, something that you either shouldn't do or if you do you should inform about it with huge bold letters.


Additional info:

Along with PHP upgrade libmemcached was upgraded from libmemcached-1.0.2-1.el5.remi.x86_64 to libmemcached-1.0.4-1.el5.remi.x86_64

We set a following 3 options to PHP memcached (on both server 1 and server 2 of course):
$m->setOption(Memcached::OPT_SERIALIZER, Memcached::SERIALIZER_IGBINARY));
$m->setOption( Memcached::OPT_BINARY_PROTOCOL, true));
$m->setOption(Memcached::OPT_TCP_NODELAY, true));

Expected result:
----------------
There should have been a clear information about breaking comatiblity with previous PHP / libmemcached versions. 

Actual result:
--------------
There was no info at all.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-08-18 14:52 UTC] rasmus@php.net
PHP doesn't include any memcache-specific code at all. So if you keep your 
libmemcached and your PHP memcached extension the same from one PHP version to 
the next I don't see how this would break. Within PHP 5.3.x we maintain binary 
compatibility so there is no need to update your extensions when you update PHP. 
This might be something you end up doing due to distro dependencies or 
something, but it isn't something that is in any way forced by us.

So, as a test, try running 5.3.15 with the libmemcached library and memcached 
extension you are using on the 5.3.6 box. I bet that will work and it means 
something likely changed either in libmemcached or in the memcached extension.
 [2012-08-18 15:10 UTC] quentin389 at gmail dot com
Ah, I see, I thought that libmemcached upgrade was an integral part of the PHP upgrade.

I don't really want to test anything here, we're just gonna move our cronjobs to an upgraded PHP and libmemcached, as this seems like a good idea anyway.

Of course the libmemcached changelog also doesn't mention any change... but meh.
 [2021-06-09 11:52 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-06-09 11:52 UTC] cmb@php.net
The memcached bug tracker is now on Github[1].  If this is still
an issue with the current memcached version, please report there.

[1] <https://github.com/php-memcached-dev/php-memcached/issues>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC