Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Hopefully, after looking at what PHP can do for you, you're excited to get started. So let's examine what we're going to need before we install. In order to install PHP on your computer, so we can start learning it, you're going to need a few things. We're going to need a web server, and that's going to be to serve up the web files that we're going to look at in our browser. We're going to install that on our local machine, not on some special piece of server hardware that exists somewhere else. It's not problem for us to have the web server exist on your local computer and also have the browser that's making requests to that web server also exist on the same computer. Typically you don't do that.
Typically the web server exists on one piece of hardware and a browser on a different computer is what's contacting that web server. When we do local development they're both going to exist on the same machine. We're going to need to have PHP installed, so our web server will understand the PHP code that we create. We're going to want to have a database installed, so that we can start creating PHP applications that connect to that database. That'll give us the ability to create more full featured applications, by being able to store data, and to pull data out of the database, and display it dynamically to the user. We'll also need a text editor to edit our PHP files. That is to write our PHP code.
And we'll need of course a web browser. Any web browsers going to work, Firefox, Chrome, Safari,Internet Explorer, or Opera. Remember, PHP just outputs HTML. So anything that understands HTML is going to suit our purposes just fine. Now for myself, I'm going to be using Apache for my web server. PHP, I'll be using version 5.4. That's the latest version. If you're using something later than that, don't worry about it. As I said earlier, the essentials are going to be pretty much the same for every version of PHP.
And if there are changes, I'll make note of those as we go along. The database I'm going to be using will be the latest version of MySQL 5 and the text editor I'll be using is TextMate. That's a Macintosh specific text editor. And the browser I'll be using is Firefox. Now, your set up may be different than mine. You may be working on a Windows machine. You may have a different text editor or different browser. Don't worry about remember PHP is cross platform. The installation will be different but the PHP lessons will be the same regardless which platform your working on. And if you're windows I'm going to walk you through a windows installation.
So our installation plan is going to be that we're to install all these things on our local machine. We're going to develop there. We're going to run the web server on the local machine. Have it interpret our PHP code and return HTML to our local browser. Now, I just told you that you can use any combination of platform, web server and database. But I want to go ahead and tell you about the most common combinations. Those combinations we refer to as The Stack. And the different stacks that are most popular are referred to as LAMP, MAMP, WAMP, and XAMP. For LAMP, it's LAMP, which stands for Linux, Apache, MySQL, and PHP. And then for the M, it stands for Macintosh, the W in WAMP is for Windows, and the X is for all three of those.
It's sort of a wildcard that can be L, M, or W. So those are the abbreviations. This is the most popular set of combinations that there are. There's more and more people now who are swapping in different things for these different parts, but these are still the most popular. Now you don't have to go with these, but it may make your life easier if you start out with them because you may find more resources out there to help you if you run into problems. Now if you do run into problems, or if you have a different configuration from the start I want to point you to a resource that could help, and that is the php.net website. That's the main PHP website that we saw earlier, and php.net/manual/en, for english, /install.php, is going to give you everything that you need to know to get installed regardless of your platform.
And that's going to be kept up to date. It's always going to be there as a resource. And as we saw when we looked at Echo, there's even going to be community feedback. Helpful tips and tricks that might help you if you run into problems. Php.net's also going to be a great place to always find out what the latest version of PHP is. It's always right there on the home page. And if there are any particulars about installation you didn't know about it, or something changes in the future. Now, while you certainly could go to that URL and get it installed for yourself. I'm also going to walk you through the steps on the Macintosh and Windows platforms just to make sure everyone gets a good start, ready to begin learning PHP together.
So let's start doing that in the next chapter.
Get unlimited access to all courses for just $25/month.Become a member
61 Video lessons · 100263 Viewers
56 Video lessons · 113233 Viewers
71 Video lessons · 82114 Viewers
131 Video lessons · 39408 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.