PHP GD on Leopard [note to self]
Article
PHP GD on Leopard [note to self]
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.confFind 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
cd /usr/local
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
rm php5-5.2.5-6-beta.tar.gz
sudo apachectl restartThat should get you all the GD goodness you need in PHP working. Thanks Sheldon!
Posted: Saturday July 05, 2008
Tagged with: php apache os x
















Comments
Number: 01
Date: 13.07.08
Great to see it presented so simply - worked a charm for me on a default install of 10.5.1 upgraded to 10.5.4 using combo update. Thanks a million.