Enable PHP on Mac OS XPosted by Matt Thommes on November 27, 2008 | Post type: Gain Mac OS X "Leopard" (10.5) ships with PHP already installed - all you have to do is enable it. I found this a bit tricky at first, since this is not a global system preference. Go to the Finder, and choose Go > Go to Folder, or hit Command + Shift + G.
Type
You'll then be taken to a private folder location, where you'll see a file called httpd.conf.
Open that file in any text editor. Scroll down to line 114, which will initially look like this:
Notice the preceding "#" character at the beginning of the line. This indicates that the line is commented out, meaning it is ignored. We'll want to change it so this line is not ignored. Simple remove the "#" character, and save your changes.
You've just enabled PHP. Turn on Web SharingIn order for PHP to be used, you'll need to take one more step and make sure Web Sharing is turned on. In System Preferences, click on Sharing under the Internet & Network section.
Once Web Sharing is turned on, you'll have a unique URL and directory to maintain your PHP site files. Your URL is what's listed in the Sharing preferences pane. Above we see Your web directory is under the Sites folder.
Put your PHP files in here, and develop your own PHP applications on Mac OS X! About the author(s)Matt Thommes is an independent publishing enthusiast, mobile blogger, content creator, informative writer, web developer from a suburb of Chicago. Never one to conform, Matt intends to promote the effect the web has on our lives, in an effort to intensify, instruct, and clarify all that is happening around us. Comments
|
Quick Link to this postTTIP.me/2077 |
hey man when i try to change the php thing in text edit it says i dont have permission to change the file what do i do then?
Quick Link to this comment: http://TTIP.me/c4901