IIS web server

How to Install and Configure IIS Web Server with PHP support on Windows 8/Server 2012


This guide will show you how to deploy your own IIS Web server, and enable it to run PHP on Windows 8 / Windows Server 2012. Thereafter this platform can help you run most of modern CMS, written in this popular (but not the best) web development language.

How to Install IIS on Windows 8

Windows 8 does not include IIS Web Server in default configuration. It is available as a separate function. To install IIS on Windows 8, you should open Control Panel and go to Program and Features section (appwiz.cpl). After this click on the Turn Windows features on or off.

control panel programs

In the opened window set checkbox in Internet Information Service and press OK.

Note. By default, the minimal configuration of ISS is installed.

After installation you should check if your Web server is running. To check this, run Internet Explorer (or any other browser) and type http://localhost (or http://127.0.0.1) in the address bar.

If IIS is functioning correctly, you will see this page:

IIS

How to Install IIS on Windows Server 2012

If you want to install Web Server on Windows Server 2012, you should do this through the Server Manager console. Choose the role Web Server (IIS) and then click Next.

READ ALSO  Time Configuration for a Virtualized Domain Controllers

IIS add role

To support PHP applications on an IIS web server, you should install CGI module (located in Application Deployment section).

IIS CGI

Next, run the role installation. After this reboot the server.

Make sure that IIS is working by opening http://localhost in your browser.

IIS windows server

How to Install PHP on Windows 8 / Windows Server 2012

To install PHP, you will need Microsoft Web Platform Installer (WPI), which you can download from this link: https://www.microsoft.com/en-us/download/details.aspx?id=6164 (wpilauncher.exe.)

Tip. Couple of advantages of using the PHP installer as a part of Microsoft Web Platform:

  • WPI determines the required version of PHP and installs current version by itself
  • WPI handles the default configuration and IIS integration
  • WPI allows you to upgrade PHP without losing configuration files

Run the downloaded file wpilauncher.exe and in the following Web Platform Installer window click Products. Browse the list until you find the PHP 5.5.1.

PHP 5.5.11

Click Add and Install. Before the installation, WPI will check your system to meet all the prerequisites (if necessary, you will be asked to install the missing components). After accepting the installation will begin.

php install

Testing PHP works on IIS

Once PHP is installed, make sure that it works correctly. Navigate to your root folder (default folder is C:\inetpub\wwwroot) and Create a new text file with the PHP extenstion (eg, test.php).

READ ALSO  Top 10 Windows 8 Problems And Solutions

Open it in any text editor and insert the script:

<?php
phpinfo();
?>

Next, run Internet Explorer (or any other browser) and type http://127.0.0.1/test.php
If everything works properly, you should see the PHP Info page. The page displays the PHP version and the basic configuration settings.

php version

Tip. PHP Configuration settings are stored in the php.ini file.

That’s all! So, we have considered the easiest way to deploy the full IIS Web Server with PHP support on Windows 8/ Server 2012.


You may also like:

How to Truncate SQL Transaction Logs Transaction logs in SQL Server 2012 tend to grow over time, which can sometimes fill all your available disk space. To avoid this, SQL Server has Trun...
How to Avoid Reserved or Hidden Partition in Windo... Hidden Partition - Windows 8 There is a hidden partition created by default in Windows 8. This can be very frustrating, especially for IT administrat...
Deploy Windows 10 with MDT 2013 and WDS In this article we will show you how to install and configure WDS role, MDT 2013 and Windows ADK on Windows Server 2012 R2 and use it to network PXE (...
How to Install Device Drivers During Windows 8 Ins... Windows 8 contains a set of generic drivers that will allow your hardware to work with basic functions, but the drivers from the specific hardware man...
25 Best Windows 8 Apps While Microsoft’s Windows 8.1 operating system is the most popular among PC users, its mobile device counterpart hasn’t enjoyed the same level of succ...