Bluetrait (Program)
                IBM N2200 8363

Sat, 27 Oct 2007 4:42 PM

How to enable PHP on Mac OS Leopard

Michael Dale

To enable php:

  1. open terminal
  2. cd /etc/
  3. sudo cp php.ini.default php.ini
  4. cd /private/etc/apache2/
  5. sudo nano httpd.conf
  6. uncomment the two modules: php5_module and fastcgi_module. They were at line 114 and 115 for me.
  7. Use ctrl and o to save
  8. reload apache (can be done from system preferences).


On Sat, 17 Nov 2007 at 4:55 PM, rider wrote

Step 4 should say 'httpd.conf' instead of 'httpd.config'

1: Comment Link

On Sat, 17 Nov 2007 at 5:03 PM, Michael Dale (of wrote

Thanks, I've updated the post.

2: Comment Link

On Tue, 04 Dec 2007 at 12:23 AM, LS wrote

Very useful tip, thanks !

3: Comment Link

On Sat, 05 Jan 2008 at 3:05 AM, Palle wrote

Thanks! It's not always eay to remember how to tiurn on php: I only seem to do it once every two years - and php.ini seems to have been moved since Tiger...

4: Comment Link

On Sat, 05 Jan 2008 at 5:17 AM, flamman -- wrote

Superb, this is the best instruction on the net for this purpose. It is working.. Yeahhhh :-)

5: Comment Link

On Tue, 06 May 2008 at 7:48 AM, Tapas sarangi wrote

Hi, I am using 10.5.2 Leopard. I tried all the easy stuff to enable php, but when I check the php code in the browser it shows he whole code just like any other text file. Can you help ?

6: Comment Link


HTML allowed: <a href="" title="" rel=""></a> <b></b> <blockquote cite=""></blockquote> <em></em> <i></i> <strike></strike> <strong></strong> <li></li> <ol></ol> <ul></ul>
ie: <b>bold</b>

Your comment may need to be reviewed before it is published.



Email (not shown)

WWW (optional)

Allow contact form email

Remember details