HOWTO: Add Socket Support to Acquia's DAMP Installer

Previously I've written about setting up APC and memcached on your desktop (or in my case laptop) using Acquia's handy stack installer (aka "DAMP"). This is another quick post in that vein.

The other main caching system I work with on a daily basis is the mind-blowingly-fast Varnish httpd accelerator. If you haven't checked it out yet, get on board (srsly; good MacOS instructions from Nate@lullabot here). I'm more than happy to maintain the Varnish integration module on, but I've been bugged by my inability to take this work with me on airplanes and other offline places.

See, DAMP ships without the required socket support needed to "talk" to the Varnish control terminal. I'm not saying this is Acquia's fault. They can't put the kitchen sink in there, and most regular users will never miss the socket extension. Those of us who might, well, we can help ourselves, right?

Right! To get rolling, grab the source and untar it. As of this article, we're working off PHP 5.2.13, but this should be pretty solid advice for any 5.2.x release.


cd php-5.2.13
./configure --with-sockets=shared
cp modules/ /Applications/acquia-drupal/php/ext/


Then add the following to the bottom of your /Applications/acquia-drupal/php/bin/php.ini:


; Sockets are useful!


Restart your DAMP application and hit up your friendly local phpinfo() and you should see a section for sockets. Enjoy talking directly to network interfaces! :)