// post · 624

How to enable PHP on Mac OS Leopard

·

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).

// comments

· rider guest
Step 4 should say 'httpd.conf' instead of 'httpd.config'

· LS guest
Very useful tip, thanks !
· Palle guest
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...
· flamman -- guest
Superb, this is the best instruction on the net for this purpose. It is working.. Yeahhhh :-)
· Tapas sarangi guest
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 ?

// leave a comment

> click for comments help

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.