There are a few different options for installing PHP with Apache on Mac OS X, including building from source as described in the previous section. However, the simplest method is to install PHP from a precompiled binary package, namely the ones distributed by a developer named Marc Liyanage.
By the Way
If you would like to build PHP from the source and are comfortable with the Mac OS X operating system and using the terminal, feel free to follow the instructions in the PHP Manual, at http://www.php.net/manual/en/install.macosx.php.
To obtain the PHP installation package, go to http://www.entropy.ch/software/macosx/php/ and look for the section titled "Installation Instructions." Once there, follow the link to download PHP 5 for your version of Mac OS X. It is likely that this version of PHP will be a few versions behind the current Linux/UNIX build files or Windows installer.
When the download is complete, mount the disc image and double-click on the *.pkg file. Perform the following installation steps to complete the process:
The PHP installation program has made all the necessary changes to your Apache configuration, so there's nothing left for you to do except skip ahead to the "Testing Your Installation" section.