Asinine Monkey

The ramblings of a systems administrator

PHP

PHP on Mac OS X

To enable PHP 4.x on an installation of Mac OS X Tiger, just follow these 8 simple steps:

  1. Launch Terminal which can be found in Applications > Utilities
  2. Launch Nano (a simple command line text editor) by entering the following command at the prompt (you will be prompted for your password): sudo nano -w /etc/httpd/httpd.conf
  3. Locate the following line by pressing CTRL+W and entering the following text: #LoadModule php4_module
  4. Remove the # from the beginning of the line.
  5. Locate the following line by pressing CTRL+W and entering the following text: #AddModule mod_php4.c
  6. Remove the # from the beginning of the line.
  7. Save the file and exit Nano by pressing CTRL+X
  8. Finally restart Apache by entering the following command at the prompt: sudo apachectl restart

PHP has now been enabled.