Skip to main content

enable php in Apache on Mac OS X 10.6.7 Snow leopard to read index.php

Posted in
No votes yet

Enable your mac os x 10.6 Snow Leopard to process php files like index.php from your Sites folder.

 

1. cd /etc/apache2

2. su root  < -  you could also sudo all commands. I just like super user control for a while..

3. make a backup copy of your httpd.conf

4. edit httpd.conf

Find:

 

#LoadModule php5_module        libexec/apache2/libphp5.so

 

and uncomment it. ( remove the #). so it looks like:

LoadModule php5_module        libexec/apache2/libphp5.so

 

Find:

 

Include /private/etc/apache2/other/*.conf

and verify that its uncommented.

 

5.  cd /etc

6. cp php.ini.default php.ini

restart apache.

test it out..

make a php file called phpinfo.php in your Sites folder and put the following in it:

<?php

phpinfo ();

?>


Open a browser and go to: http://localhost/~username/phpinfo.php
 

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
If you math.. you're in..
9 + 2 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.