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 package here or under PHP 7.1 section from
  • Extract the ZIP file to C:\Program Files (x86)\php-7.1.33-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 (x86)\php-7.1.33-nts-Win32-VC14-x86\ext"


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

error_log = syslog
  • Add C:\Program Files (x86)\php-7.1.33-nts-Win32-VC14-x86 to System Path.
  • Download x86 package of WinCache 2.0 for PHP 7.1  here or from
  • Extract and copy the php_wincache.dll file to C:\Program Files (x86)\php-7.1.33-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 (x86)\php-7.1.33-nts-Win32-VC14-x86\php-cgi.exe"
Name = PHP 7.1
Request Restrictions = File or folder
php -version
  • Create phpinfo.php file with below content in the website folder and test the result.


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