Enable PHP on Mac OS XMac 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 the file to enable PHP was a tad difficult to physically find. 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. Simply 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!
Comments/Mentions
|
Editor Picks
Email NewsletterSubscribe to the digest newsletter to receive posts by email: Recent Comments
Advertisements
|








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?