[英]Instaling PHP on Windows with IIS
如何使用Internet Information Services(IIS)在Windows计算机上安装PHP?
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. 首先,您需要在计算机上安装并运行IIS,默认情况下没有IIS,您必须从控制面板->程序-> Windows特性中添加特性。
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. 我已经在x32和x64平台下的IIS 5.1(WinXP),IIS 7.5.7x(Win7)和IIS 10.0.10x(Windows 10)下成功安装了PHP,并且运行良好。
I resumed this guide in 10 easy steps: 我通过10个简单的步骤恢复了本指南:
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 安装'vcredist_x64.exe'或'vcredist_x86.exe'(Visual C ++ 2012 Redistributable) https://www.microsoft.com/zh-cn/download/details.aspx?id=30679
Setup your 'C:\\PHP\\php.ini', especially set the 'extension_dir ="C:\\PHP\\ext"'. 设置您的'C:\\ PHP \\ php.ini',尤其是设置'extension_dir =“ C:\\ PHP \\ ext”'。
Reset Internet Information Services: In a command console type IISRESET. 重置Internet信息服务:在命令控制台中,键入IISRESET。
Congratulations you have now PHP working on Windows! 恭喜,您现在可以在Windows上使用PHP!
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). (可选)您可以安装“用于IIS的PHP管理器” https://phpmanager.codeplex.com/ ,这对设置ini文件和跟踪错误日志有很大帮助(可惜,据我所知,它在Win10上不起作用)。
Remember to set 'index.php' as one of the default documents for IIS. 切记将“ index.php”设置为IIS的默认文档之一。
Glad to help. 乐意效劳。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.