Install PHP on OS X

Mon, Sep 8, 2008

Server / Web Apps

This is a PHP module for the Apache web server included in Mac OS X.
PHP is a server-side, cross-platform, HTML embedded scripting language.

1. Download the PHP package here:

2. Install it, then test it at

Thanks to Marc Liyanage for the PHP package.

This post was written by:

- who has written 49 posts on Mac Lab: An Apple Macintosh OS X, Mac & PC Blog.

1 Comments For This Post

  1. Hectic Jeff Says:

    If you’re using OS X’s built in Apache2 server it comes with PHP5 compiled as a module, although it’s not enabled by default.

    To enable PHP on the OS X web-server open the file /etc/apache2/httpd.conf and find the line:

    #LoadModule php5_module libexec/apache2/

    Uncomment this line (remove the preceding hash), save it, then restart the internal Web Server (from System Preferences->Sharing then un-check and recheck the Web Sharing box).

    These steps are relevant for Leopard only, Tiger uses Apache 1 and PHP4, but is still a good dev environment.

Leave a Reply