JavaScript Editor Javascript source editor     Web programming 

Team LiB
Previous Section Next Section

Installing PHP on Mac OS X

There are a few different options for installing PHP with Apache on Mac OS X, including building from source. 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

To obtain the PHP installation package, go to and look for the section titled "Installation Instructions." Once there, follow the link to download PHP 5 on Mac OS X 10.3.

When the download is complete, mount the disc image and double-click on the *.pkg file. Follow the installation steps below to complete the process.

The PHP installer will launch automatically, as shown in Figure 4.1. Click Continue to move to the next step.

Figure 4.1. The PHP Installer has started.

The next screen will ask you to select the destination. Select the drive, as shown in Figure 4.2, then click Continue.

Figure 4.2. Select the installation location.

You will be prompted for the Administration username and password unless you are installing as root. If so, enter these values and press the Continue button.

The installation process will continue, installing PHP and optimizing the system. When the process is complete, the installation program will say so, as shown in Figure 4.3.

Figure 4.3. PHP installation is complete!

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.

    Team LiB
    Previous Section Next Section

    JavaScript Editor Javascript source editor     Web programming