April 17, 2007
Installing PHP on Mac OS X
I'm still using Mac OS X 10.3 (Panther). It came with Apache and PHP4 installed, but I'm starting to use some of the features in PHP5 and wanted to upgrade.
Downloading PHP5 and compiling wasn't difficult, but I had some hurdles to overcome. To make things easier and for completeness I used the configure options shown by the phpinfo() function as a starting point. The configure script ran successfully, but make failed immediately because xmlsave.h could not be found. Not wanting to install any more new libraries than I had to; I avoided installing a new libxml2 and disabled all of the XML options and all was well.
Once I did that I broke down I decided I truly couldn't live without XML support and installed libxml2 via fink and reconfigured the PHP build to use that installation. I also had to install an updated copy of MySQL to resolve some linking issues with the MySQL client extension.
After I was satisfied that it was complete I installed the module and reconfigured Apache to use the shiny new PHP5 module instead of the bundled PHP4 module and life is good.

