developing smarter web applications...

Apache, MySQL and PHP on Snow Leopard

Snow Leopard comes with PHP 5.3 installed by default. Since I do a lot of Drupal development, I can't actually use that version of PHP and I needed to downgrade to PHP 5.2.x. I personally do not like the way that Apple has setup their AMP stack, so this is how I was able to get an acceptable one setup.

Note: This method uses MacPorts, so you will need to install that first.

sudo port clean php52
sudo port -f uninstall installed
sudo port installed
sudo port install grep
sudo port install apache2
sudo port install mysql5-server
sudo port install php52 +apache2 +mysql5