Enable Mac Os X Apache And Php

http://dancewithnet.com/2010/05/09/run-apache-php-mysql-in-mac-os-x/

localhost:~ app$ sudo apachectl start
Password:
localhost:~ app$ sudo apachectl -v
Server version: Apache/2.2.22 (Unix)
Server built: Dec 9 2012 18:57:18
localhost:~ app$ sudo vi /etc/apache2/httpd.conf

  1. find load module php… and remove the comment to enable it

localhost:~ app$ sudo cp /etc/php.ini.default /etc/php.ini
localhost:~ app$ sudo vi /etc/php.ini

  1. find php errors setting and enable it

localhost:~ app$ sudo apachectl restart
localhost:~ app$ sudo cp -a /Library/WebServer/Documents/index.html.en /Library/WebServer/Documents/phpinfo.php
localhost:~ app$ sudo vi /Library/WebServer/Documents/phpinfo.php

  1. <?php phpinfo(); ?>