How to install and configure PHP on IIS 8 in Windows 8

Article ID: 2819022 - View products that this article applies to.

About Author:

Collapse this tableExpand this table
Collapse this imageExpand this image
MVP
This article is provided by Reza Faisal. Microsoft is so thankful that MVPs who proactively share their professional experience with other users. The article would be posted on MVP's website or blog later.
Expand all | Collapse all

Problem Description

If we want to run web application base on PHP platform, we must ensure our computer has IIS 8 as web server and PHP engine. By default, Windows 8 does not have one of them. But user can easily to activate IIS 8 feature and install PHP engine in Windows 8.


Solutions

We can activate IIS 8 in Windows 8 by using Turn Windows features on or off in Control Panel. And there are two way to install and configure PHP in Windows 8. First, we can install and configure PHP manually. Second, we can use Microsoft Web Platform Installer that can install and configure PHP automatically.


How To Do

There are 3 work that we will do in this section :
  1. IIS 8 installation.
  2. Microsoft Web Platform Installer instalation.
  3. PHP installation and configuration with Microsoft Web Platform Installer.



A. IIS 8 Installation

These are steps to activate IIS 8 in Windows 8 :  
  1. Run Turn Windows features on or off with choose Settings form charms bar, then choose Control Panel.
  2. In Control Panel window, choose Programs.
  3. In Programs and Features, choose Turn Windows features on or off.

    Collapse this imageExpand this image
    2831030


  4. Check Internet Information Service and click OK button.

    Collapse this imageExpand this image
    2819101


After the installation process is complete, we can check whether IIS 8 is installed correctly by running Internet Explorer. In the address bar, type http://localhost. If successful, we see web page like this picture below.
Collapse this imageExpand this image
2819102


B. Microsoft Web Platform Installer Installation

Microsoft Web Platform Installer is a simple, free tool that automates the installation of Microsoft's entire Web Platform including PHP. We can download it form this url http://www.microsoft.com/web/downloads/platform.aspx. The name of installer is wpilauncher.exe.
Run wpilauncher.exe and we will see installation status like this picture below.
Collapse this imageExpand this image
2819103


After installation is completed, we can see Web Platform Installer 4.0 window like this picture below.
Collapse this imageExpand this image
2819104


C. PHP Installation and Configuration

These are step to install and configure PHP with Web Platform Installer :
  1. In Web Platform Installer window, choose Products tab and search PHP version that we will install.
  2. Click Add button as we can see in picture below.

    Collapse this imageExpand this image
    2819105


  3. After click Add button, we can see there are 2 items that will be installed. By click Items to be installed link, we can see list of those items.

    Collapse this imageExpand this image
    2819106


  4. Click Install button.

    Collapse this imageExpand this image
    2819107


  5. Click I Accept button and it will be downloaded item and install them.

    Collapse this imageExpand this image
    2819108


  6. After the installation process is complete, click Finish button.

Testing

To check whether the installation and configuration are success, we can test it by follow these steps :
  1. Create info.php file and type this code below as content.
    Collapse this imageExpand this image
    2819109
  2. Copy info.php file to IIS’s root folder in C:\inetpub\wwwroot.
  3. Run Internet Explorer, and type http://localhost/infor.php in address bar.
  4. We will see web page like picture below if all installation and configuration are successed.

    Collapse this imageExpand this image
    2819110

Community Solutions Content Disclaimer

MICROSOFT CORPORATION AND/OR ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY, RELIABILITY, OR ACCURACY OF THE INFORMATION AND RELATED GRAPHICS CONTAINED HEREIN. ALL SUCH INFORMATION AND RELATED GRAPHICS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT AND/OR ITS RESPECTIVE SUPPLIERS HEREBY DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THIS INFORMATION AND RELATED GRAPHICS, INCLUDING ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, WORKMANLIKE EFFORT, TITLE AND NON-INFRINGEMENT. YOU SPECIFICALLY AGREE THAT IN NO EVENT SHALL MICROSOFT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, PUNITIVE, INCIDENTAL, SPECIAL, CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF USE, DATA OR PROFITS, ARISING OUT OF OR IN ANY WAY CONNECTED WITH THE USE OF OR INABILITY TO USE THE INFORMATION AND RELATED GRAPHICS CONTAINED HEREIN, WHETHER BASED ON CONTRACT, TORT, NEGLIGENCE, STRICT LIABILITY OR OTHERWISE, EVEN IF MICROSOFT OR ANY OF ITS SUPPLIERS HAS BEEN ADVISED OF THE POSSIBILITY OF DAMAGES.

Properties

Article ID: 2819022 - Last Review: September 25, 2013 - Revision: 4.1
Applies to
  • Microsoft Internet Information Services 8.0
  • Windows 8
  • Windows 8 Pro
Keywords: 
kbstepbystep kbmvp kbcommunity KB2819022

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com