Install PHP 5.4 (5.x) on Windows 7 IIS 7.5 the EASY way!
Microsoft Web Platform Installer for PHP 5.4 / 5.x to the rescue!I generally develop my websites in Microsoft technologies: ASPX / DotNet C# with SQL-Server databases. But, I do have a few smaller sites I work on that are build using PHP. Since my normal desktop for website development and software development is a Windows 7x64 Pro machine, I use the built-in Internet Information Services (IIS) 7.5 web server for testing my ASPX sites using localhost (127.0.0.1).
Well, what about testing my PHP Hypertext Preprocessor based applications locally on Windows 7 with IIS 7.5? Thankfully, you can forget all the overly-complex installation instructions that appear all over the web and install PHP 5.4 on IIS 7.5 the SUPER EASY WAY: use Microsoft's very nice "Web Platform Installer 4.0" to do this!
PHP 5.4 on IIS 7.5 step-by-step instructions
Here are the basic steps, and I included screen images showing visual feedback you can expect during the process. And, this whole process is only going to take a few minutes (depending on your download speed).
using Microsoft Web-Platform-Installer 4.0
- Got the the Microsoft web page for the Web Platform Installer for PHP 5.4 ("WPI"). You will see a large button on that page saying "Install Now"... click it to download a PHP54.exe (small) program that you run to launch the WPI install process. Note: if you already have the MS WPI installed, you should be able to just use that interface directly to add PHP 5.4 -- WPI should be accessible via your start-menu, and you can find it here too: "C:\Program Files\Microsoft\Web Platform Installer\WebPlatformInstaller.exe"
- Run that PHP54.exe program you downloaded. This will start the platform-installer and proceed with PHP 5.4 on IIS7.5 installation. The program will download some more content, then present you with this screen:
Initial Screen once ready.
- Next, click the "Options" link to see the following screen, from which I chose "IIS" for the "Which Web Server would you like to use?", since I have Win7x64 Pro with IIS 7.5 running (versus IIS Express 7.5). Then, click "OK" to go back to the screen shown in step 2, from which I chose to click the "Install" button...
The IIS / PHP Install Options
- You will be presented with the following screen showing what PHP 5.x.x version is going to be installed on your IIS 7.5 setup along with any other supplemental packages for managing PHP on Windows / IIS. I just went with the defaults and chose "I Accept"...
Various Prerequisites : You can opt out of defaults here
- The installation for PHP 5.4 on IIS 7.5 will now take place, and when it completes you will see the following screen.
- Now, once you are done, you will see the Web Platform Installer's menu system that will display some very interesting additional packages you may want to install this way! There are a lot of very useful packages setup for the super-easy / automatic installation process. See the "Products" and "Applications" tabs for a list. And, you will notice how your "PHP 5.4.9" (or whatever version you just installed) shows up in the list of products as "Installed" now:
- Lastly, if you want to see exactly what was installed and see that these WPI-installed products can be removed via the "normal" way (Control Panel, Programs and Features), here is a screen-shot after using the WPI to install PHP 5.4 on Windows IIS 7.5. I clipped the screen to show only those items that were installed with PHP for Windows via WPI auto-installer: