使用IIS在Windows上安装PHP [英] Instaling PHP on Windows with IIS

查看:128
本文介绍了使用IIS在Windows上安装PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在使用Internet信息服务(IIS)的Windows计算机上安装PHP?

How can I install PHP on a Windows machine using Internet Information Services (IIS)?

推荐答案

这是一个指南希望它能帮助许多正在寻找简单初学者证明安装指南的用户:

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:

首先,你需要在你的机器上安装和运行IIS ,IIS默认不来,你必须从控制面板 - >程序 - > Windows特性添加特性。

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 5.1(WinXP),IIS 7.5.7x(Win7)和IIS 10.0.10x(Windows 10)下安装了PHP x32和x64平台并正常工作很棒。

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.

我通过10个简单的步骤恢复了本指南:

I resumed this guide in 10 easy steps:


  1. 下载您喜欢的PHP版本来自 http://windows.php.net/download/ ,请确保下载非线程安全(NTS)版本的PHP。

  2. 将文件解压缩为'C:\ PHP \'。

  3. 打开然后' Internet信息服务管理员IIS'。

  4. 在左侧面板中选择根项目。

  5. 双击处理程序映射(Asignaciones de Controlador) 。

  6. 在右侧面板上点击添加模块映射(Agregar asignacion de modulo ..)。

  7. 设置值像这样:

  1. Download the PHP version you like from http://windows.php.net/download/ make sure you download the Non-Thread Safe (NTS) versions of PHP.
  2. Extract the files into 'C:\PHP\'.
  3. Open then 'Internet Information Services Administrator IIS'.
  4. Select the root item in the left panel.
  5. Double click on 'Handler Mappings' (Asignaciones de Controlador).
  6. On the right side panel click on 'Add Module Mapping' (Agregar asignacion de modulo..).
  7. Setup the values like this:

请求路径:* .php
模块:FastCgiModule
可执行文件:C:\ PHP \名为php-cgi.exe
名称:PHP_FastCGI
请求限制:文件夹或文件,所有动词,访问:脚本

安装'vcredist_x64.exe'o'vcredist_x86.exe'(Visual C ++ 2012 Redistributable) https://www.microsoft.com/en-US/download/details.aspx?id=30679

Install 'vcredist_x64.exe' o 'vcredist_x86.exe' (Visual C++ 2012 Redistributable) https://www.microsoft.com/en-US/download/details.aspx?id=30679

设置你的' C:\PHP \ php.ini',特别设置'extension_dir =C:\PHP \ext'。

Setup your 'C:\PHP\php.ini', especially set the 'extension_dir ="C:\PHP\ext"'.

重置互联网信息服务:在命令控制台中键入IISRESET。

Reset Internet Information Services: In a command console type IISRESET.

恭喜您现在有PHP在Windows上工作!

Congratulations you have now PHP working on Windows!

您可以选择安装'PHP Manager for IIS' https:// phpmanager。 codeplex.com/ 这对设置ini文件和跟踪错误日志有很大帮助(遗憾的是,据我所知,它在Win10上不起作用)。

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).

请记住t'index.php'作为IIS的默认文档之一。

Remember to set 'index.php' as one of the default documents for IIS.

很高兴能提供帮助。

这篇关于使用IIS在Windows上安装PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆