How can I install PHP on a Windows machine using Internet Information Services (IIS)?
相关问题
- Views base64 encoded blob in HTML with PHP
- How does the setup bootstrapper detect if prerequi
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
This is more a guide than a question in the hope it helps many users who are looking for an easy beginner's proof installation guide:
First of all you need to have installed and running IIS on your machine, IIS doesn't comes by default, you have to add the characteristic from control panel -> Programs -> Windows Characteristics.
I had successfully installed PHP under IIS 5.1 (WinXP), IIS 7.5.7x (Win7) and IIS 10.0.10x (Windows 10) both x32 and x64 platforms and works great.
I resumed this guide in 10 easy steps:
Setup the values like this:
Request Path: *.php Module: FastCgiModule Executable: C:\PHP\php-cgi.exe Name: PHP_FastCGI Request Restrictions: Folder or File, All Verbs, Access: Script
Install 'vcredist_x64.exe' o 'vcredist_x86.exe' (Visual C++ 2012 Redistributable) https://www.microsoft.com/en-US/download/details.aspx?id=30679
Setup your 'C:\PHP\php.ini', especially set the 'extension_dir ="C:\PHP\ext"'.
Reset Internet Information Services: In a command console type IISRESET.
Congratulations you have now PHP working on Windows!
Optionally you can install the 'PHP Manager for IIS' https://phpmanager.codeplex.com/ which is of great help to setup the ini file and track the log of errors (sadly It doesn't works on Win10 as far i know).
Remember to set 'index.php' as one of the default documents for IIS.
Glad to help.