Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
If you're new to the world of Apache, MySQL and PHP, or if you're trying to figure out what's the best way to install these software products on your local disk, it's worth taking a few moments to review how these software products work together to support a web application. Web-based applications are sometimes known as multi-tier applications, that's because they're built with multiple software products or multiple tiers. There are four major tiers in a web application: the client, the web tier, the business tier and the data tier.
All of the other tiers of a web application go into the server environment and taken together, they are known as the server stack. There are three server tiers. The web tier is the HTTP server. It receives requests from the client and returns responses. The HTTP server dispatches requests to the business tier, an application server, and the application server interacts with the data tier, the database server. In the world of Apache, MySQL and PHP, these roles are filled by Apache in the web tier, PHP in the business tier and MySQL in the data tier.
As a web application developer, you will find it useful to be able to install these software products locally, so that you can develop and test your code before you upload it to a production server. There are a number of ways of doing this. One approach is to install each element of the AMP stack individually. You'll be able to download all the software you need for free from these web sites at Apache, PHP and MySQL. On Mac OS X, Apache and PHP are already included, you just need to activate them, and then you install MySQL separately.
On Windows, you will install all of the components separately. And in later videos of this series, I'll show you how to do this on each of these operating systems. As of the time of this recording, it's very easy to install PHP 5.3 with Apache, but if you want to move to the newest version of PHP, 5.4, you'll find it takes a little bit more work. In this version of the course, I primarily focus on PHP 5.3 and offer some tips about 5.4 where they're available.
One of the advantages of installing these software products individually is that if you need to upgrade one element, you won't need to uninstall the others. When you use the integrated software bundles I'll describe next, most of the time you'll find that in order to change your software, you have to uninstall everything and reinstall everything. Individual components give you more control. The advantage though of the AMP software bundles is that they're very easy to install and get started with. All of the software bundles that I'll describe here are free to download and easy to set up.
If you're a Windows developer, you might consider WampServer, and if you're a Mac developer, you might look at MAMP. These are the software bundles that I typically use in my courses that involve PHP, MySQL and Apache. There are other bundles available too and they each have their own benefits. These three software bundles are available for multiple operating systems; Windows, Mac and Linux. There is XAMPP, spelled with an X, BitNami and Zend Server Community Edition.
When you choose an AMP distribution, it's good to know some of the benefits of each. For example WampServer and XAMPP both install by default using the standard ports for Apache and MySQL. If you're working with MySQL and PHP, using Dreamweaver for example, you'll find that you have to use port 3306 with MySQL and if you use an alternative port, Dreamweaver won't be able to connect to that database. WampServer and XAMPP set up these software products exactly how Dreamweaver would expect them to be set up and also how they are set up in a production environment typically.
MAMP, on the other hand, by default uses alternative ports. This gives you the advantage on Mac of being able to run side-by-side with the versions of Apache and PHP that are included in the operating system. But MAMP also makes it very easy to reset to the standard ports, port 80 and 3306. BitNami has distributions that include common PHP applications such as WordPress, Drupal, and Joomla! and many others. If your goal is to get started with one of these content management systems, you'll find that BitNami provides a very easy road forward.
Also BitNami, uniquely among all of these bundles as of the time of this recording, offers versions that integrate PHP 5.4. These versions, again at this moment, are available only for development and not for production. But if you want to get started with PHP 5.4, BitNami offers a very easy path. One of the most important things to consider is that you can only have one copy of each software product running on each port at a time.
You could have more than one copy of MySQL running, but only one can listen on port 3306, and only one copy of Apache can be listening on port 80. So it's a good idea to choose one approach and then stick with that approach on each individual computer. Particularly on Windows, installing both an AMP bundle and the separate components can cause a lot of problems. You'll find that sometimes you will get DLL conflicts, different versions of a particular component that conflict with each other and prevent one or both of these software components from starting up at all.
So on Windows, install the separate components or an AMP bundle, but not both. And finally, if you install two AMP bundles on a single computer, make sure you deactivate the first before you start up the second. There are some combinations of these software bundles that can be installed side-by-side, for example MAMP and the included components of Mac OS X as long as they're listening on different ports. But if you want to make sure that your software is going to run the first time every time, install one of these bundles and stick with that bundle and don't install anything else on that particular computer.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 91061 Viewers
80 Video lessons · 138142 Viewers
59 Video lessons · 56952 Viewers
52 Video lessons · 70580 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.