Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

techound1

macrumors 68000
Original poster
Mar 3, 2006
1,977
7
I was raised on HTML and have just started mucking about with PHP. I want to set up a local testing server, rather than doing the upload-and-look routine (which is wearing thin:eek: ). What does everyone recommend for a thick-as-a-post (no pun intended) php-wannabe? Thanks! :D
 
Mac OS X has built-in support for PHP, but you must edit the httpd.conf file to turn on the php modules. There are probably some tools that will do this for you, but I always just open up /etc/httpd/httpd.conf in my favourite text editor and remove the # in front of these two lines a couple of hundred lines down in the file:

Code:
LoadModule php4_module        libexec/httpd/libphp4.so
...
AddModule mod_php4.c

You then need to (re)start Apache (System preferences -> Sharing -> Services -> Personal Web Sharing), and you should be able to access php content locally on your machine.

Taco HTML Edit is a nice, free html/php editor that supports php previewing.

php.net is an essential site when learning/developing php pages... :)
 
Also consider...

Also consider using MAMP from http://www.mamp.info/

It's nice as a little testing area. Plus it just involves installing an app, no more. Certainly I wouldn't use this to host the final version, but like you say - for local testing, it's nice. And you can use mysql with it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.