I'll make this as easy as I know how for everyone. :)
Go grab http://homepage.mac.com/sluzynsk/PHPGDModule.sitx. Unstuff it
to your Desktop.
Open Terminal.
Type:
ls /usr/lib/php/extensions.
You'll see a directory called something like
no-debug-non-zts-20020429. Remember that name.
Type:
sudo cp gd.so /usr/lib/php/extensions/no-debug-non-zts-20020429 (or
whatever it was above)
sudo cp gd.a /usr/lib/php/extensions/no-debug-non-zts-20020429
That puts the PHP GD module (which I compiled against the stock
Panther PHP and statically linked against GD) into the PHP modules
directory.
Finally,
sudo vi /etc/php.ini
(If you've never used vi before, it's a bit unfriendly...)
You're wanting to add the line
extension=gd.so
to the file. If you don't know how:
Press "esc", then ":", then "/". Type "Dynamic Extensions" (w/o
quotes).
Press "j", then "o". Type the "extension=gd.so" line (try not to mess
up, vi editing is tricky) and press "esc" ":" "wq" and hit "return".
From system preferences, stop web sharing and then start it again. Run
that phpinfo() script and you should see GD listed.
I have not tested this on any other machine (I only have the one) and
only on Panther (10.3.4 specifically) client, not server. But it
should theoretically work on any PHP 4.3.x install.
If this works for you, you don't have to replace your Apple provided
PHP, install any extra junk, or attempt to get through a compile of
PHP.
I should probably bundle that up into a .pkg installer. Maybe
someday... :)
Good luck. If it doesn't work I'll try to help if I can.
-Steve