Installing the PHP environment - spaceshiptrooper [Style]

Windows Part 1


NOTE


The tutorial for Windows will actually be a lot longer than the tutorial for Linux and will contain more images than Linux. This is because Windows requires more steps.


SIDE NOTE


Since PHP 7.1.1 is out now, you might want to download that one instead. If you cannot find PHP 7.1.0, that’s okay. This tutorial also works with updated files as well. Don’t worry about the version you currently see that are featured. The only difference you’ll see is that yours might be more up-to-date which is something you want. Unless the steps for this tutorial changes within the near future, the steps for installing PHP on Windows will most likely remain the same.


Windows (Windows 10 x32 bit)


Prepping your system


1.) So the first and foremost step that we should always do when installing PHP on a Windows system is to determine the architecture type. PHP, Apache, and many other softwares will be very picky on which architecture they get installed on. So we must always understand and know which architecture type we currently have installed. In order to do this, we must open up a file explorer first.


2.) Right-click on This PC or My Computer or This Computer on the menu at the left. And then at the way bottom of the context menu, there should be an option called Properties. Click on it.

3.) Your system specs should show up. Take note, I am using a x32 bit Operating System with a x86 bit Based Processor. This is my architecture type. Most people prefer x64 bit over x32 bit, but I find that using x32 bit for development is a lot easier than using x64 bit. It’s just a matter of preference. But do take note of that part because you’ll need it later on.

4.) Open up your favorite web browser and browse to windows.php.net/download. We are using FireFox for this tutorial so the steps and options may vary for you.


5.) Scroll down about half way through the page, on the left hand side, you’ll find a couple of links that are for Visual C++ which are labeled with 2008, 2012, and 2015. You’ll need these in order to have PHP up and running. Basically, PHP needs something called runrc from those libraries in order for PHP to properly work on Windows. So for the 2008 one, click on the link that is for your architecture type. Remember, x32 bit is also x86 bit or it can also be x64 bit as well. But most likely, it’ll be x32 bit. For the 2012 and 2015 one, it’ll give you options to choose from within the link.


6.) I have them all opened on different tabs so I know which ones I haven’t downloaded and which ones I have. So switch the tab to the 2008 one and click on the Download button. Then click on the Save button when it prompts you where to save the file. By default, it should be stored in the Downloads directory unless you specified it to store in a different directory. If you have, please remember that your files will be stored there.


7.) Switch the tab again to the 2012 link. This time when you click on the Download button, it’ll prompt you a window which gives you selections to choose from to download your files. Select the appropriate one for your architecture by checking the checkbox and then clicking Next. Then click on the Save button when it prompts you where to save the file. Again, by default, it should be stored in the Downloads directory unless you specified it to store in a different directory. If you have, please remember that your files will be stored there.




8.) One last time, switch to the tab that has the 2015 link. Again, when you click on the Download button, it’ll prompt you a window similar to the 2012 one with selections. Choose the appropriate one for your architecture by clicking on the checkbox and then clicking Next. Again, click on the Save button when it prompts you where you want to save the file. I shouldn’t have to repeat this part again as I have said it twice above.




9.) Once you have all 3 files downloaded, you can either navigate to your Downloads folder in your File Explorer or click on the dropdown list from your Download history and it should show all 3 files. Just right-click on any one of those downloaded file and click on Open Containing Folder. It should open up the Downloads directory where the files are stored in. If you saved it into a different directory, you might want to open that location up since it isn’t the default Download location.


10.) Let’s install the 2008 one first so that we can do them in chronic logical order so that we don’t screw something up. When you have the 2008 Visual C++ program opened, it’ll greet you with an introduction message and at the bottom right, there should be 2 buttons (Next > and Cancel). Click on Next > if you want to continue. We all do I believe.

11.) Here, it lists the terms and what not. We really don’t need to read all of it unless you really want to. So we’ll just click on the checkbox and click on Install >. When you click on Install >, it’ll start installing the 2008 one. Once the installation is finished, just click on Finish and the program will close. If it doesn’t, close out of the 2008 one.





12.) Open up the 2012 Visual C++ one. Here it lists the terms and conditions. If you want to read it all, be my guest. If you want to install it, click on the checkbox and then click on Install. This one might actually require you to reboot your computer in order for it to take affect. You don’t have to reboot it just yet. You can install the 2015 one and then reboot it. If you want to reboot it right after the 2012 installation, you can do so. The reboot is optional up until after the 2015. We usually wait until we are finished installing all of the programs. If the requirement doesn’t really affect the installation process, we wait until everything is done and then reboot so we don’t have to reboot so much times. It saves time to reboot only when necessary. THIS REBOOT PROCCESS MAY NOT EVEN AFFECT YOU AT ALL. IT MAY NOT EVEN ASK YOU TO REBOOT. IF IT DOESN’T, DON’T WORRY ABOUT IT. YOU CAN REBOOT DURING THIS STEP IF YOU REALLY WANT TO. JUST ONLY DO IT IF THE PROGRAM ALERTS AND TELLS YOU TO. Once the installation is finished, click on Close and the program should close.




13.) Last, but not least. Open up the 2015 one. Again, the terms are listed on this one as well. If you really want to, you can read it. We’re just going to click on the checkbox and click on Install. Once the installation is finished, click on Close. The program should be closed.




14.) Now that we have our 3 programs installed, let’s reboot our computer. If the 2012 installation didn’t ask or alert you to reboot your computer, then you don’t have to. But if it did, then you’ll have to since it’s required. Since I cannot take snapshots of the reboot process, you all should know how it looks like. I don’t think I should have to put pictures in this step. REMEMBER TO SAVE YOUR WORK IF YOU ARE WORKING ON SOMETHING!!! I AM NOT RESPONSIBLE FOR ANY DATA THAT IS LOST!!!

15.) Once you’re computer is done rebooting (only if it’s required), open up your favorite web browser again. If it didn’t require you to reboot your computer, just type in the address bar apachelounge.com. This should lead you to the Apache Lounge website where you can download Apache from. Once we are in the Apache Lounge website, you can then click on the Downloads link at the left sidebar. This should lead to where we can download Apache.

16.) Once you are on the Downloads page, scroll a little down the page to where it says Apache 2.4 binaries VC14. Remember to download the correct one for your architecture type. Windows is very specific for the programs you use. You cannot run a x64 bit program on a x32 bit Operating System and vice versa. This tutorial is using a x32 bit Operating System so I’ll download the one that says httpd-2.4.25-win32-VC14.zip. Yours might be the win64 so BE CAREFUL which one you download.



17.) Again, browse to the Downloads directory. You can browse to it using the File Explorer or you can click on the Download history dropdown list and right-click on the Apache compressed file and then clicking on Open Containing Folder. And it should open the Downloads directory. Again, if you didn’t save the Apache file in your default Downloads directory, you’ll have to navigate to it.


2 Likes