No, I didn't write it. It's "Adding GD library for Mac OS X Leopard" from the Mac OS help and tips website.

Let me explain. Mac OS X 10.5 (Leopard) ships with PHP 5.2 installed, but without the useful GD graphics library. Most of the GD installation tutorials I found on the web involve an intimidating series of steps that require downloading a bunch of supporting libraries, compiling them, then re-compiling PHP. Although Kénior's tutorial "Adding GD Library for Mac OS X Leopard" seems to have worked for many people, it never quite worked for me; after many careful tries, I kept getting Apache errors (as seen in /var/error/apache2/error_log) that prevented GD from successfully loading:

PHP Warning: PHP Startup: Unable to load dynamic library     '/usr/lib/php/extensions/no-debug-non-zts-20060613/gd.so' -     (null) in Unknown on line 0

So, after much hair-pulling, I finally found the wonderfully simple tutorial on Mac OS help and tips: Adding GD library for Mac OS X Leopard. It calls for simply (1) downloading a fresh PHP installation that has GD already compiled-in, and (2) using it to replace the existing PHP folder in /usr/local. I had PHP up and running with GD in about one minute.

What could be simpler?