One Comment on “Install PHP on OS X”

  1. 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/libphp5.so

    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

Your email address will not be published. Required fields are marked *