
Here are few quick steps to turn on PHP5 on your mac. This an easy modification allowing you to work with in your WebServer folder.
Note: To use this method 10.5+ is required.
- With your favorite text editor (I recommend Textmate) open Macintosh HD/private/etc/apache2/httpd.conf. You must allow hidden files to be seem to view and open.
- Once the httpd.conf file has been opened go to line #114 and edit the following
#LoadModule php5_module libexec/apache2/libphp5.soremove the “#” sign and save the file. You will be prompted to enter root password. - With Terminal open, type the following series of commands, each followed by Return:
cd /private/etc
sudo cp php.ini.default php.ini - Now open the file with your text editor.
- Go to line #305 and change “error_reporting = E_ALL & ~E_NOTICE” to error_reporting = “E_ALL” and save the file and enter your root password.
- Open your System Preferences click on Sharing and then turn on Web sharing.
After the above steps have been completed PHP5 will be working with in your WebServer folder located in “Macintosh HD/Library/WebServer/Documents”.
To confirm everything has been configured correct create a php file with the following:
- <?php phpinfo(); ?>
- Save the file with the documents folder as info.php.
- In a browser window go to: http://localhost/info.php and you will see your php settings.


