Before installing PHP, ensure IIS is properly installed and running. Use Control Panel or Server Manager to add IIS features, then open IIS Manager for further configuration.
Go to the official PHP Windows download page (http://windows.php.net/download/), select the VC6 x86 Thread Safe version, download and extract it to C:\php. Copy the file php.ini-recommended and rename it to php.ini for PHP configuration.
Open IIS Manager, locate your website, right-click and select "Add Application".
Assign an alias like "PHP" for the application and set the physical path to the extracted PHP folder (e.g., C:\php).
Alias: PHP
Path: C:\php
In the Handler Mappings, select "Choose a handler from the global modules" and select FastCgiModule. If it's not enabled, install and enable FastCGI support first.
Add a handler mapping for the .php extension, setting the executable path to C:\php\php-cgi.exe.
After configuration, restart IIS. Access a PHP file on your website; if the PHP page displays correctly, the PHP integration with IIS is successful.