How To Manually Install PHP 7.1 for Windows Server 2016


To understand how PHP works with IIS in order to be able to update PHP to any version to address compatibility or security issues.

Using a tool to install PHP for IIS, for example Microsoft Web Platform Installer 5.0, restricts us from using only versions supported by the tool.


  • Install CGI for IIS.
  • Download VC14 x86 Non Thread Safe under PHP 7.1 section from
  • Extract the ZIP file to C:\Program Files\php-7.1.15-nts-Win32-VC14-x86 folder.
  • Rename the php-.ini-development file to php.ini.
  • Open the php.ini file and add the following line at the end of the file.
  • Uncomment the following lines
fastcgi.impersonate = 1;

cgi.force_redirect = 1 (and change the value to 0, i.e. cgi.force_redirect = 0)

extension_dir = "C:\Program Files\php-7.1.15-nts-Win32-VC14-x86\ext"


error_log = "C:\Program Files\php-7.1.15-nts-Win32-VC14-x86\php_errors.log"

error_log = syslog
  • Add C:\Program Files\php-7.1.15-nts-Win32-VC14-x86 to System Path.
  • Download x86 package of WinCache 2.0 for PHP 7.1  from
  • Extract and copy the php.wincache.dll file to C:\Program Files\php-7.1.15-nts-Win32-VC14-x86\ext
  • Open IIS, click on Server name, double click on Handler Mappings > Add Module Mapping with below information
Request path = *.php
Module = FastCgiModule
Executable = "C:\Program Files\php-7.1.15-nts-Win32-VC14-x86\php-cgi.exe", Name = PHP7.1
Request Restrictions = File or folder

Open a Command Prompt, execute below command and ensure that no warnings appear.

php -version

How to Remove Microsoft .NET Framework


Some applications do not work with the latest Microsoft .NET Framework. You need to remove it and install an older version of Microsoft .NET Framework.


1. Use below utility to remove the current Microsoft .NET Framework.

.NET Framework Cleanup Tool

2. Download an appropriate version of Microsoft .NET Framework using one of below links and install it.

3. Use below utility to detect the installed Microsoft .NET Framework versions.

.NET Detector