Posted: Saturday July 05, 2008
Tagged with: php apache os x
This is more of a note to self than anything else and I do not intend to steal credit for this tip on how to get a custom PHP 5 working on Leopard with the GD library installed. Credit is due to Sheldon who posted this gold nugget of information as a comment at http://macoshelp.blogspot.com.
This requires use of the command line so be careful as it requires administator privileges. Open Terminal to continue:
sudo nano /etc/apache2/httpd.conf
Find this "LoadModule php5_module libexec/apache2/libphp5.so" and add a "#" (no quotes) at the front of the line to comment out Leopard's default PHP5 library
sudo curl -O http://www2.entropy.ch/download/php5-5.2.5-6-beta.tar.gz
sudo tar -xzf php5-*-beta.tar.gz
sudo ln -sf /usr/local/php5/entropy-php.conf /etc/apache2/other/+entropy-php.conf
sudo apachectl restart
That should get you all the GD goodness you need in PHP working. Thanks Sheldon!