Friday, November 5, 2010

How to Easily Enable PHP on Snow Leopard

These are instructions to quickly and easily enable PHP on Snow Leopard. I won't discuss any other configurations on this post beyond those necessary to get PHP running.

  1. Open Terminal.
  2. Open /etc/apache2/httpd.conf in your favourite command line editor using sudo. I did the following:
    sudo emacs /etc/apache2/httpd.conf
  3. After authenticating, the file will open. Scroll down to the line that says:
    #LoadModule php5_module libexec/apache2/
  4. Remove the hash mark (#) to uncomment that line, then save and close the file. In emacs, this is done by pressing Control-x Control-s (save) followed by Control-x Control-c (close).
  5. Restart the Apache web server.
  6. PHP should now be up and running!


Post a Comment