As Nerdling points out, PHP must be compiled with the GD extension enabled, therefore there's no clean way of adding GD2 to the version of PHP that ships with Mac OS X.
This solution worked for me (Mac OS X 10.5.2, should work with any 10.5), but you'll have to make a new PHP installation. However, this will not undo your other installs of PEAR and MySQL, you'll just have to sudo
one extra line.
Before we start, if you've already enabled the built in PHP, you'll have to re-comment the PHP line (LoadModule php5_module libexec/apache2/libphp5.so) in (/etc/apache2/)httpd.conf. And now, the steps:
- In Terminal.app, type
sudo ln -s /etc/apache2 /etc/httpd
This makes a symlink so entropy's package can install and function correctly.
- Download entropy's PHP 5.2.4 for Apache 2 package and install it.
- Again in Terminal, type:
sudo cp /usr/sbin/httpd /usr/sbin/httpd-fat
sudo lipo /usr/sbin/httpd -thin i386 -output /usr/sbin/httpd
This downgrades Apache 2 to 32 bits so it can play nice with entropy's PHP package.
sudo ln -s /usr/local/php5 /usr/local/apache2
sudo ln -s /usr/lib/libexpat.dylib /usr/local/apache2/lib/libexpat.0.dylib
This fixes a misplaced file.
sudo mv /usr/bin/php /usr/bin/php_back
sudo ln -s /usr/local/php5/bin/php /usr/bin/php
This fixes possible errors with PEAR/PHP extensions.
- Restart Apache (can be done typing
sudo apachectl restart
).
- Upvote ;)
- Done.
Some reference: http://www.entropy.ch/phpbb2/viewtopic.php?t=3074