PHP memcache extension version problem #2541

Closed
karptonite opened this Issue Jul 18, 2014 · 11 comments

3 participants

@karptonite

The installed version of the memcache (not memcached) PECL extension appears to be incompatible with something else on the system (libmemcached?). The bug I encounter is that if you put an integer into cache, a string (with the same number) is returned. Upgrading to the 3.0.8 PECL Memcache package (technically beta, but it's been maintained for a while) appears to solve the problem.

Here is a failing test run with some tests specifically designed to test this issue:
https://travis-ci.org/karptonite/geekcache/jobs/30278152

And here is a passing test run, with the same tests, with the Memcache package upgraded.
https://travis-ci.org/karptonite/geekcache/jobs/30286686

@BanzaiMan
Travis CI member

Hmm. There is an imminent PHP image upgrade, and I wonder if it's fixed. How do I test if the correct version is installed?

@BanzaiMan BanzaiMan self-assigned this Jul 18, 2014
@karptonite

pecl list will list the installed packages. If it is 2.2.7, it has not been changed from the version that was giving me a problem.

@BanzaiMan
Travis CI member

I have bad news for you; it is still 2.2.7 on the new image. And I am afraid we do not have time to squeeze this in for the next VM update.

Is this line https://github.com/travis-ci/travis-cookbooks/blob/fbcbe43bd63400d48fa1ddfead55d9b2bc3fd239/ci_environment/php/attributes/default.rb#L18 supposed to install pecl extension 2.2.7? (I'm not familiar with PHP ecosystem, so I can't say for sure.)

We welcome patches to the cookbooks, of course!

(paging @loicfrering)

@loicfrering

@BanzaiMan this line is related to the memcached extension which is different from the memcache extension.

I could have a look in a few hours at updating our cookbooks to install the beta version of the memcache extension. This beta has been around for more than a year but never released.

@karptonite are you aware of any backward compatibility or instability problems with this version 3.0.8?

@loicfrering

I did a rapid test and the beta version is not compatible with 5.2.17. I could either remove this preinstalled extension for 5.2 or try to install different versions of the extension depending on the PHP version. The second solution may take a bit more time though.

@karptonite

@loicfrering I'm not really aware of any problems going from version 2.2.7 to 3.0.8 of the pecl package, but I I don't know the details.

Honestly, I'm not too concerned about it, because now that I've tracked down the bug, I just added a line to my .travis.yml switching out the pecl package before I run the tests.
- printf "\n" | pecl install -f memcache-3.0.8
I don't want to speak for 5.2 users, but it isn't as if Memcache 2.2.7 crashes--is just improperly casts integers to strings. Not good, but if you are using 5.2, perhaps better than nothing.

Oh, by the way--that 3.x branch has been in beta since 2008. :)

@loicfrering loicfrering added a commit to loicfrering/travis-cookbooks that referenced this issue Jul 18, 2014
@loicfrering loicfrering Update PHP memcache extension to 3.0.8 beta for PHP >= 5.3. 9a30ada
@loicfrering

Just pushed an update to the cookbooks: travis-ci/travis-cookbooks@9a30ada.

On next provisioning, memcache extension v3.0.8 will be available for PHP >= 5.3. PHP 5.2 will still come with memcache extension 2.2.7.

Thanks for reporting @karptonite!

@karptonite

Great! When is the next provisioning likely to be? I'll take my hack out then.

@BanzaiMan
Travis CI member

The cutoff for the next week's planned update has unfortunately passed. Given the low impact of this issue, I am inclined to include this one for the next update. I can't promise schedule, unfortunately, but we are working on internal tooling to make VM provisioning easier and more frequent in the future.

Thank you.

@karptonite

No hurry for me. I was just curious.

@BanzaiMan
Travis CI member

This will be rolled out next week. I'm closing this optimistically.

If the problem persists after that, do let us know.

@BanzaiMan BanzaiMan closed this Aug 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment