Using memcached with stock OS X Apache

I wanted to use memcached but didn't want to compile all the dependencies by hand and wanted to use the stock version of Apache that ships with OS X so I cobbled together the following instructions.

  1. Install MacPorts
  2. Use MacPorts to install memcached:
    sudo port install memcached
  3. Use pecl to download the latest version of memcached and uncompress it:
    cd /tmp
    pecl download memcached
    tar xvzf memcached-*.tgz
  4. Build the extension using MacPort's version of libmemcached (which was installed as a dependency of memcached):
    cd memcached-*/
    phpize
    ./configure --with-libmemcached-dir=/opt/local/
    sudo make install
  5. Enable it by editing php.ini and adding the following line:
    extension=memcached.so
  6. Restart Apache:
    sudo apachectl graceful

References:

Dilemma

I was really impressed with your decision to boycott Amazon for pulling the plug on Wikileaks. Would you do that same with Apple now that they did the same thing in app store?

http://voices.washingtonpost.com/fasterforward/2010/12/wikileaks_app_pul...