Sticky: How to Enable PHP in Leopard

whitesaint

cocoa love
I'm sure this question gets asked a lot so I thought I'd help. This is pretty simple to do too.

1. Go to the Finder, in the Go menu, go to "Go to Folder..."
2. Type in "/etc/apache2/" (without the quotes of course)
3. There should be a file named "httpd.conf"
4. Go ahead and copy this file to your desktop.
5. Open "httpd.conf" with TextEdit
6. Find the line entitled "#LoadModule php5_module libexec/apache2/libphp5.so"
7. Delete the "#" so it reads "LoadModule php5_module libexec/apache2/libphp5.so" (without the quotes of course)
8. Save the "httpd.conf" file.
9. Copy the file back to "/etc/apache2/" (it's okay to overwrite)
10. Restart your mac and voila!
 
I don't think this method worked for me.
When I look at my Testinfo.php file in my "Site" folder -- the php info is not rendered. Any suggestions. Pls keep it simple, I am a newbie.
 
Try installing something like MAMP (download from here: http://www.mamp.info/en/index.html). It will give you a possibility to run your own virtual PHP+MySQL enabled server. When done, put you site files in /htdocs of your MAMP installation. You can then view your site by typing localhost/yoursite.php in the browser.
If you need more help with mamp - PM me, or check the forumboards on their page.
 
Back
Top