- Download the PHP installation package for Windows first. The package is then decompressed to the C:\PHP. After completing the above steps, rename the Php.ini-dist file in the C:\php directory to php.ini and copy it to the C:\Windows directory.
Open the C:\Windows directory with Notepad php.ini file php.ini Find register_globals = off to change off to on.
Find Extension_dir = "./" bar./"in the./change to the location of the ext in PHP, such as" C:\php\ext ". Finally, the PHP directory under the Php5ts.dll copy to the C:\WINDOWS\system32 directory. Complete the installation steps for PHP at this point.
- Set IIS to support PHP
Add a new Web extension service. By
Start → programs → administrative tools → Internet Information Services (IIS) Manager open IIS Manager. Select Web service extensions → add a new Web service extension. Add: Php directory php5isapi.dll, Name: PHP set extension state to allow: √. Select OK when you are finished. Add an ISAPI filter. By
Internet Information Services (IIS) Manager → web site → properties → ISAPI filters → add filter Name: PHP executable: PHP directory php5isapi.dll. Add a PHP mapping file.
Select Internet Information Services (IIS) Manager → web site → default Web site → properties → home Directory → configure mappings → add executable: Php directory Php5isapi.dll extension:. php. Add home Default file. Select Internet Information Services (IIS) Manager → web site → default Web site → properties → home directory → documents. Add index.php Home file.
- Set related permissions
Set PHP folder permissions. Open the PHP folder and add the Everyone and IUSR and IWAM user rights. View related information Just add IUSR user rights Yes, but I personally tried. If you do not join the Everyone user, the execution is unsuccessful. If the setting is wrong, please correct it. Because joining everyone does not guarantee security. Set site folder permissions. Specific settings as described above. Only the folder path is different.
- Test
Restart IIS.
View the PHP home page file. Test the page. Enter the IP address of the computer in the browser.
How to configure PHP under IIS