您的位置: bluesailor散记——
« escrow中域名交易的的传真言而无信的新网xinnet »

win2003配置PHP环境

分类: 开发文档 发布: admin 浏览: 日期: 2010年4月19日

1.下载的软件:

http://www.microsoft.com/web/platform/phponwindows.aspx php on windows

安装 ,安装好后文件在  :  C:\WINDOWS\system32\inetsrv 目录下 fcgi打头的文件。

 IIS 的 “Web 服务扩展”里多了 FastCGI Handler

 

2. 到 php.net 下载 php-5.32-Win32-VC9-x86.zip 文件,并将其复制到:D:\PHP\php5目录(你可以根据自己的意愿解压到别的目录。),并给 IIS 启动帐户组或用户赋予读取和运行权限.

3. 注册 PHP 到 FastCGI
打开 C:\WINDOWS\system32\inetsrv\fcgiext.ini 文件。
; This is the configuration file for the FastCGI handler for IIS 6.0.
; The FastCGI handler will look for this file in the same directory as
; fcgiext.dll. By default, the FastCGI installer will place this file into
; the %windir%\system32\inetsrv directory.

 

在 [Types] (约第162行)下添加以下配置:
[Types]

php=PHP
[PHP]
ExePath=D:\PHP\PHP5\php-cgi.exe
这里要用:“\”不能用“/”,“php”表示扩展名,“PHP”是配置节名称,以“[PHP]”定义。
 
4.打开IIS管理器,网站上点右键-属性-主目录-配置-添加,配置 fcgiext.dll
GET,POST,TRACE,DEBUG,HEAD
 
5. 配置PHP.INI
 
6.先运行D:\PHP\PHP5\php-cgi.exe如果能进入命令窗口并只有光标,说明FastCGI能正常调用php-cgi,否则会提示错误,这点对使用微软的fastcgi模式很重要。
 

 

相关文章:

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

Powered By Z-Blog 1.8 Spirit Build 80722

Copyright Lunji.com Some Rights Reserved.