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.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

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 restart

That should get you all the GD goodness you need in PHP working. Thanks Sheldon!

Comments

No comments have been posted yet. Please be the first to post a comment!

Post a comment

Comment details
anti-spam code. you need to be able to view images to post a comment. sorry.