Running Apache and PHP on OS X 10.6.4

Posted on August 31, 2010

Apache and PHP are there, but not started.   To enable it:

1> Fire up and cd /etc/apache2
2> sudo pico httpd.conf
3> Within httpd.conf, use ctrl-w and find LoadModule php
4> Uncomment LoadModule php5_module and LoadModule fastcgi_module lines
5> Right below that, add the following 2 lines:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

6> Save httpd.conf and close pico.

7> Goto System Preferences > Sharing and check the box for “Web Sharing”.

8> At this point, there should be a main machine website (http://localhost) and user(s) sites (http://localhost/~user)

9> Create a simple php file, containing the phpinfo() function, to see what is available within php.

Filed Under General | Leave a Comment

Leave a Comment

If you would like to make a comment, please fill out the form below.

You must be logged in to post a comment.

© Copyright Jeff's Blog • Powered by Wordpress • Using Detour theme created by Brian Gardner.