Running Apache 2, PHP5 (Entropy) with Postgresql on Leopard
Update: New post on installing from source here.
Getting Apache 2, PHP 5, MySQL 5 and Postgresql 8 on Leopard was not as easy as it was made to look, so I am noting it down so that it could help somebody later.
This does not deal with installing PHP or Apache from source which can be a bit hairy on OSX.
This was done on OSX Leopard, I have no idea if the same will work on Tiger, Panther etc.
Follow the instructions at your own risk. It did not blow up my Macbook Pro in doing this, but I can’t guarantee you that you’ll extract the same mileage.
All binaries have been downloaded from Marc Liyanage’s website (thanks Marc!):
- Download the respective packages from the website
- Install them according the instructions
- Stop the httpd that is shipped with leopard (sudo /usr/sbin/apachectl stop)
- Backup existing PHP module: cp /usr/local/apache2/modules/libphp5.so /usr/local/apache2/modules/libphp5.so.orig
- Replace with the Entropy version: sudo cp /usr/local/php5/libphp5.so /usr/local/apache2/modules/libphp5.so
- Backup existing php.ini: cp /private/etc/php.ini /private/etc/php.ini.orig
- Replace with the Entropy version: sudo cp /usr/local/php5/lib/php.ini /private/etc/php.ini
- Edit the httpd.conf in /usr/local/apache2/conf to load the PHP module
- Back up existing httpd.conf in /private/etc/httpd
- Replace it with the version in /etc/local/apache/conf
- Start Apache
I know it is not the best or the most proper way possible. But after many days of poking around, this was the easiest and I am not one to complain about that.