PHP - How To Manually Install PHP on IIS 10.0 for Windows Server 2016

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi so I'm going to demonstrate here how to install PHP manually from scratch on Windows Server 2016 and the reason why I'm doing this is because I try to install it via the web platform installer and it was not successful but also because the web platform installer only has version PHP 5.4 on there I want to put in a newer version so let me get started here so I'm going to bring up my cheat sheet and the first thing I'm going to do is install CGI so you'll need this because PHP runs off a cgi so when I go into my server manager I'm going to click on add roles so I already have the web server is installed on here and you'll notice I do have is installed and I installed a lot of these sort of default features here but you'll notice if I expand on application development I don't have CGI so that's important if you don't have CGI installed this will not work so that's the first thing I'm going to do and while that installs let me talk about the next item so I have the link here to download PHP and when I bring that up it comes to here now the version you want to choose is the non thread-safe one so I'm going to demo this with the X 32-bit x86 version and you'll notice here this is compiled using Visual C++ 14 and that's important because later on there might not be a dependency so I'll demonstrate that also you your installation might be missing some dependencies that you need and I will demonstrate that because my installation here will be missing those dependent components so while it's doing that okay so it looks like CGI has installed so I'm going to close out the server manager and I'm going to proceed to my downloads so I already downloaded my PHP version 7.0 and I'm going to expand this and I'm going to place it in the route C directory so I'm going to expand this out and that is the folder I want I'm just going to copy this folder into my C directory and I'm going to name it PHP seven and I'm going to give it the is permissions so I'm just going to go into properties and you might want to buckle down the security but for demonstration purposes I am simply going to put in the most liberal security here so I'm going to say yes and I'm primarily doing this because I'm going to install WordPress on here so I need PHP as a prerequisite so after I've done that I am going to put the file so let me edit the PHP file first so you'll notice there is no PHP file PHP ini file so what I'm going to do is copy the production version and rename it PHP ini and now I'm going to edit it with my favorite editor and what I'm going to do here is enable some of these variables so you'll see I have a list here so I'll have all of these instructions in the description area so I'm just going to search for this and uncomment this out and this is supposed to be zero make sure to save the file of course redirect here is also zero now the extension directory and comment this errorlog and because I put this in cage p7 is my root directory sure to save that and now for the time zone and I'll be setting it just the pH the UTC time zone Emme TC now have to comment out the extensions and because I am going to install PHP on here but I mean my sequel on here I will be uncommenting out in my sequel so those are the extensions that I will want to load and make sure to save the file so the next thing I'm going to do here is set the path variable so I'm going to set the path variable here I'm going to right-click on the Start menu and click on system the advanced system settings environmental variables and I am going to add a new and I will have hp7 is what I wear I put the executables and at this point I have to set up my is settings now so if I bring up is highlight the server knee go to handler mappings and now I will be adding a module mapping Oh dot PHP and I'm going to search for my fast CGI here so this is available this fast CGI module is available because I installed it in the beginning I installed the CGI module and now I am going to be choosing the executable which is in my PHP 7 folder and I will be searching for PHP CGI and I will merely name it fast CGI click OK and when it prompts me I'll say yes and you'll notice the entry makes it in here click again on the server and I am going to choose my default documents and I am going to add index dot PHP now at this point I am all set I am going to test the command line now so I'm going to bring up PowerShell and I am going to test and see if PHP is in my path by typing this and you'll notice it is indeed not in my path yet because I have to log out but let me check that so I am going to go into command shell echo echo the path here and you'll notice it's not in my path yet so let me log out first so what I'm going to do is log out so many types shut down and I am going to just simply log out and I will be logging back in so I'm going to log back into that server and my path variable should be set now okay so let me test that out here once again we type in PHP - info and you'll notice it did nothing now that's a bad sign and that's what I wanted to demonstrate so this is because I am missing a dependency yet it did not throw an error or actually warned me and this was somewhat hard to debug so I'm going to demonstrate here how to solve that issue so I'm going to go into PHP seven here and I am simply going to double click on any one of these and you'll notice there's an error message that comes up and that's because I'm missing vc runtime 114 zero that dll and why is that relevant so let me bring up my cheat sheet here and demonstrate that to you so if I go into my downloads let me bring up that cheat sheet you'll notice here I have a link to download the dependencies so you'll see here that you possibly need the visual studio or video c++ redistributable so if you click on this link here it brings you to downloading the dependencies but also if I go back to my PHP link what you will find here is that keep in mind that in the beginning here it says this was compiled by Visual C++ 14 and it's the x86 version so you have to keep that in mind so when I am scrolling down here and downloading the dependencies I want the VC 14 1 so let me click on this link here and you'll see it's the Visual Studio 2014 that I want and what you want to do is click on download and choose both of these and just install both so I already downloaded this and I am simply going to install both here so I'm going to install the x64 version now the only one I really need is the 32-bit version which is the x86 version but I'm going to just install both because this components actually dependency on several so I'm going to go back to the command line now and run it and you'll see it did something so this is a good sign it basically exported all the variables and so if you go back to my cheat sheet the command line test worked now the final test is to test the webpage so I have a web page here and I am going to show you what is inside so it's merely one statement of one statement webpage with one PHP come in so I'm going to copy that into my is directory I net pub WW and actually let me show you the file extensions here so that you can see that it's not just PHP but it's actually dot php' so there's the file extensions so I'm going to bring up my browser and I want to test the localhost first and show you that it actually is is actually running and now I could type in my web page test dot PHP you'll notice there it is so it has all my configuration information here and at this point I am all set and you'll notice there is the version number up here so your manual installation of PHP is all set and now you can install dependent applications such as you know WordPress on here which relies on PHP and that's really it I hope this helped and thank you for watching
Info
Channel: CodeCowboyOrg
Views: 94,218
Rating: 4.9220781 out of 5
Keywords: PHP, PHP7, PHP 7, Windows, PHP 7.0, 7.0, Install PHP, Install PHP on Windows, Install PHP on Windows Server, Windows Server 2016, Windows Server 2012, Install PHP Manually, Manual Install, How to manually install PHP, How to manually install, PHP5, PHP 5.4, Web Platform Installer, PHP 5.6, How to, Demo, Tutorial, IIS, Plugin, FastCGI, CGI, Internet Information Server, IIS10, IIS8, IIS7.5, IIS 10, IIS 8, IIS 8.5, IIS 7, IIS 7.5, Install PHP on IIS, php.ini, FastCGIModule, fix, IIS 10.0
Id: XuJuhdZo9tU
Channel Id: undefined
Length: 15min 49sec (949 seconds)
Published: Mon Aug 22 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.