When installing memcached on my CentOS 5.2 box using the rpmforge repo, I found apache/php complaining of API version problems.

To get round it I first used PECL to install memcached, then used yum to set memcached to work nicely with the Redhat style environment.
# pecl install memcache
# yum --enablerepo=rmpforge install memcached
# yum install php-pecl-memcache

Thinking back, I believe I needed libevent, libevent-devel, zlib and zlib-devel to get the PECL install to work too.
# yum install libevent libevent-devel zlib zlib-devel
I saw the errors initially when version checking PHP.. after restarting apache the following command seems happy…
# php -v
and there are a couple of config files you can play with here…
/etc/sysconfig/memcached
/etc/php.d/memcache.ini
Happy speed hunting!

Categories: LAMP

Jonathan Adjei

Jon's expertise in web development is legendary and he oversees all technical aspects of our projects from development to hosting (all through the command line!) Jon is excited by the latest techniques and keeps the company on track by finding ways to adopt new practices into our workflow.