terminal

7 tips to power up MAMP on OSX 10.6 (Snow Leopard)

First off I don't really like to go with extra apps on my Mac. So with Leopard I'd use (mark's) PHP (as 10.5.x didn't have GD support at least) and official MySQL distribution. With Snow Leopard (OS X 10.6) Apple did a great job rolling out quite a nice http server but to the date it's way too advanced for my normal dev life. None of the web apps I do develop with (Druapl, ExpressionEngine, Joomla, WP ... ) are ready for PHP 5.3 yet. So the only choice was downgrade.

I've tried a few ways as MacProts, compiling my own PHP (and libs) but that was not even 90% successful or buggy. So I looked to MAMP again. Here are a few tips to get MAMP running nicely at OS X 10.6 (Snow Leopard):

Delete .svn folders on your Mac

Sometimes you need to get rid of .svn hidden folders on your Mac. In my case it was about resyncing my local working copy with client subversion repository. Everything was broken at both ends.

A couple of terminal commands to get rid of unneeded svn tracks:

cd /some/of/your/folders/
rm -rf `find . -type d -name .svn`

It will delete any .svn folders under your current.

For lazy typists: don't forget that you can drag and drop folder from finder to terminal to populate path.

Configuring terminal to work with MAMP mysql on Leopard

I've decided to try MAMP on new Mac OS X 10.5. Mostly because PHP bundled with Leopard doesn't have GD library (otherwise it has quite cool set of modules). The other reason that is better Marc Liyanage's PHP installer is not yet ready for Leopard.

But after backing up all my MySQL databases (around 200Mb dump) it turned out that you can't acces MAMP's mysql via terminal to restore it (or I was something terribly missing from FAQs).