扫一扫
关注微信公众号

IIS组建与配置-Win2003+IIS6.0环境下安装PHP
2007-09-24   网络

http://www.php.net上下载PHP,再将其解压到c:php下;

  将“php.ini-recommended”重命名为“php.ini”之后将其移动到C:WINDOWS;

  将php4ts.dll移动到C:WINDOWSSystem32;

  进入“控制面板”? “管理工具”(Administrative Tools);

  双击“Internet信息服务”管理器(IIS Manager):

  1)、点击“Web服务扩展”(Web Service Extensions)并选择添加一个新的Web服务扩展,如下图:

""screen.width*0.5) {this.resized=true; this.width=screen.width*0.5;}" border=0>

  2)、将路径添加到php4isapi.dll中:

""screen.width*0.5) {this.resized=true; this.width=screen.width*0.5;}" border=0>


3)、点击设置扩展状态:


""screen.width*0.5) {this.resized=true; this.width=screen.width*0.5;}" border=0>

  4)、右击“缺省Web站点”(Default Web Site)后选择“属性”(Properties):



""screen.width*0.5) {this.resized=true; this.width=screen.width*0.5;}" border=0>

  5)、进入主目录标签(Home Directory),设置允许执行脚本和可执行程序:


""screen.width*0.5) {this.resized=true; this.width=screen.width*0.5;}" border=0>

  6)、点击“配置”选项(Configuration)?“添加”(Add):


""screen.width*0.5) {this.resized=true; this.width=screen.width*0.5;}" border=0>
  7)、正确地填写:Executable: browse to the php4isapi.dll and the Extension: .php;取消文件存在核实复选标记,只保留脚本引擎:


""screen.width*0.5) {this.resized=true; this.width=screen.width*0.5;}" border=0>




  8)、进入“文档”(Documents)标签,添加index.php并将其置顶;

  9)、进入命令提示符:开始 运行 cmd




""screen.width*0.5) {this.resized=true; this.width=screen.width*0.5;}" border=0>

10)、在命令提示符中键入:iisrestart



""screen.width*0.5) {this.resized=true; this.width=screen.width*0.5;}" border=0>

  11)、NT安全性:在wwwroot和php目录中添加可阅读、执行的IUSR_YourMachineName;

  12)、为了检测PHP是否正在运行,编写一个名为phpinfo.php,内容为如下简PHP脚本:的文件,再将其复制到wwwroot目录中。

  尝试从浏览器中调用该文件就可以观察PHP是否生效。

  如果PHP还没有运行,试图从http://www.php.net/downloads.php运行Windows Installer,再从头重复所有步骤。

热词搜索:

上一篇:IIS优化与安全-提高操作系统和IIS安全性的绝招
下一篇:安心黄金周 网络攻击防范措施早准备

分享到: 收藏