Setup A Web Development Environment Easily
Sep 4th, 2007 by jon
So you want to build an awesome PHP Application that will manage your life and do the dishes? Awesome! But first you need to get a web server. This can be a bit tricky if you are not too familiar with how all that magic work, but fear not, there are a number of easy ways to get a web server with PHP support that won’t require hours of configuration time and weeks spend reading through documentation and posting on mailing lists.
First off let’s start with some basics. If you want to setup a web server then the first thing you need to do is realize that Microsoft does not have all the answers. Microsoft IIS is a great service for setting up a simple page, but it has many limitations and unless you are running Windows 2000 or 2003 you will be limited to a small number of concurrent connections. This is where web servers like Lighhttpd and Apache really shine, because they allow all the power you will ever need in a web server.
Okay so let’s get down to business. Just about any geek will tell you to go to Apache or Lighttpd’s respective websites, read through mountains of documentation, download and compile the source code, and then mess with endless, confusing configuration files before you even reach your “Hello World” page. Well, screw that. Manually installing web servers have their place but when you just need to get down to coding you need your server now. Well there are many solutions which will provide you with a robust and stable development environment until you are ready to take you plunge into running a live site.
While there are many different choices available for Windows users, I personally recommend a suite called EasyPHP. EasyPHP consists of Apache, mySQL, PHP, PHPMyAdmin (a mySQL database administration tool written in PHP). EasyPHP is also very easy to install and configure (epically since the “out of the box” configuration will do just about everything you need to do). Plus once you no longer need EasyPHP it uninstalls cleanly so you won’t have to worry about cleaning up the mess that some applications like this leave behind.
Mac OS X users have a bit less choice when it comes to the all in one package. Mac OS X includes a working version of Apache 1.3 and PHP 4, but it does not include mySQL. Also many developers are switching over to Apache 2 and PHP 5 so this may not be the optimal solution. I have used a software suite called MAMP to run a development environment on my Macbook and overall I have had good experiences with it. MAMP contains a simple GUI and allows for some basic configuration (such as choosing between PHP 4 and PHP 5) but it could use a few more features to really stand out from the crowd. MAMP is a bit of a memory hog but as long as you are running with more than 1GB or RAM you should be fine.
Since I do not want to get into the complexities (as well as the thousands of different paths to take) of installing Apache, PHP, and mySQL on a Linux box I will leave the Linux newbies with this link. This is probably the easiest way to get LAMP running quickly on a Linux box. But if you do not have a spare machine laying around you could always download VMWare Player, VMX Builder and get a Ubuntu Image.
Hopefully this posting will come in handy for those looking to setup a quick development environment and get to coding.
If you like this post, then consider buying me a beer!
Of course, there’s always the really easy to do it: buy cPanel and have someone install it on a bare-bones Linux installation :D.