Getting the pre-complied PHP Apache Module from
Marc Liyanage's site was always the preferred way to get a fresh PHP distribution on your Mac. However, creating 4-way binaries (32- and 64-bit versions for G4/G5 and Intel CoreDuo / Core-2-Duo processors) seems to be broken and if Apache is running in the more efficient 64-bit mode, installing the PHP module not only doesn't work, it will also break Apache.
However, there is an easier way to get PHP working with your Apache Server on the Mac.
Apache Apache/2.2.8
Starting Apache is as easy as opening
System Preferences - Sharing and checking the box next to
Web Sharing. After that's done, open your Web browser and browser to http://127.0.0.1 (or http://localhost, or http://
computername.local) to see the global Apache start page or go to http://127.0.0.1/~
username (or http://localhost/~
username, or http://
computername.local/~
username) to browse the content of your own site folder (/Users/
username/Sites).
PHP 5.2.5
To enable PHP you need to edit Apache's
protected configuration file, which can be done using the terminal or an Editor application like TextWrangler.