Oliver Nassar

I can be reached at onassar@gmail.com.

For my open source work, check out github.com/onassar

Memcached/libmemcached for PHP

View more posts

I've been using libmemcached v0.39 for a really long time, despite it having progressed up to version 0.51, and it got me thinking why it is that I'm using that. I simply forgot.

Doing some quick googling, I "remembered" my reason: the latest stable version of the PECL memcached extension is 1.0.2 (released 2010-05-03). This extension for PHP seems to only have been directly tested against libmemcached v0.39 as can be seen via it's Package Information page.

Therefore despite there being a fairly recent release of the PECL extension (2.0.0b2; only a month or so old) which seems to work on libmemcached version 0.49 and below, I would be taking a gamble on one of two fronts:

  1. I install libmemcached 0.49 and use the PECL extension 2.0.0b2 which is not stable. I potentially run into issues with the extension itself (not libmemcached)
  2. I install libmemcached 0.x (up to 0.51) and use the PECL extension 1.0.2. I potentially (I feel like this would be likely since it was released so long ago) run into issues between the PECL extension and the libmemcached library (eg. not compiling properly against it)

Based on those two options, neither of which I like, I think sticking with libmemcached 0.39 and PECL memcached 1.0.2 seems like the smart move.