The superiority of the Mac operating system continues to impress me. Having been a long term user of Windows, back from version 1.0, I have all but abandoned it for the Mac. I have used my Mac Book Pro for over one year now and have no intention to return to Windows. I do website programing in PHP and wanted to install PHP locally so I can do testing without the need to FTP files to the web server. I found out that Mac OS X 10.5 (Leopard) comes with both Apache 2.2.6 and PHP 5.2.4 pre-installed, but they’re not enabled by default. I found these instructions from Foundation PHP on how to get it up and running.
The first step was to download the free text editor TextWrangler (a free, cut-down version of BBEdit available from www.barebones.com). Using this editor I made one change in a single file. Next the instructions required use of the terminal to copy the php.ini default file, then I could use TextWrangler to edit it with a single change. In the Mac system prefrences I then enabled web services and was done. I created a test PHP file and ran it in the browser as follows to verify both Apache and PHP were working.
http://localhost/test.php .
The PHP information page came with this header.
The instructions were easy to follow. At this same site are some other tutorials. I plan to buy the book written by the author of this site called “The Essential Guide to Dreamweaver CS3 with CSS, Ajax, and PHP” because the author shows how to use an include for the Spry horizontal menu. One issue we have in a complex website is how to have one source for the menu system so changes made in one place will appear on all pages.

Comments
Leave a comment Trackback