Starting from release 1.8.0, full PHP install is no longer supported by Microsoft's Web Platform Installer as the extensions are not included by default. For this reason, install PHP using the Zip file install. The installation steps are as below.
Note
For additional information about PHP for windows you can go to Microsoft's website at https://learn.microsoft.com/en-us/iis/application-frameworks/install-and-configure-php-on-iis/install-and-configure-php
PHP Installation Steps
1. Go to Microsoft's PHP install section https://learn.microsoft.com/en-us/iis/application-frameworks/install-and-configure-php-on-iis/install-and-configure-php#install-php
- click on the download link latest non-thread-safe Zip file package.
- click on Windows downloads under current stable version.
- Download the zip file under VC15 & VS16 Non Thread Safe section.
Make sure to select the link for non-thread-safe zip file for the install.
2. Download the zip file underVC15 & VS16 Non Thread Safe section.
Once the download has finished, extract the files to directory on your IIS server. (for example, C:\PHP
)
The VC15 and VS16 PHP builds require that the Visual C++ Redistributable for Visual Studio 2015-2019 x64 or x86 be installed. Make sure you have the install.
3. Once the PHP files are extracted, copy the php.ini-production file to php.ini
4. Edit the php.ini to set the parameters for
fastcgi.impersonate =1
cgi.fix_pathinfo=0
cgi.force_redirect =0
open_basedir=c:\inetpub\wwroot
Configuring IIS for PHP
Configure IIS server for PHP integration as below.
6. Under the Select roles, check the Web Server (IIS)
7. Under the Select role services, check the CGI selection