Sunday, June 27, 2010

Configuring the Mac for PHP programming

Ok, so I get it--there are a LOT of tutorials about how to activate your PHP on the Mac 10.6 OS... but none of them REALLY helped me in the lab so I poked around until I found my own way to set up a good programming environment for PHP, Apache and MySQL environment...

Basically, one needs three pieces of software for this: Cyberduck for ftp client, Text Wrangler to edit PHP and MAMP to act as a local server. Some websites tell you that a better way is to modify your computers config files, but I was not able to get ANYTHING to work that way.

After you download the three above programs:

1. Open Text Wrangler and type: < ? php infophp(); ? > (please note that their is NO space between the "<", ">", "php" and the " ?" The spaces were added to over-ride some security features of this blog page)
2. Save as 'info.php' in Applications>MAMP>htdocs
3. Open Firefox or some other web browser and type http://localhost:8888/
it should bring up your index page. The 8888 is your Apache port that you will need in future
4. Click on info.php

If all goes well...

A page should pop up with details about your PHP... if not, something else has gone horribly awry...

Setting up CyberDuck is my next big adventure... I need to get the server info from the client...

No comments:

Post a Comment