php 在win2003, iis6 上安装

1. 不用5.3版本及以上。因为强制fastcgi,fastcgi需要安装.net2.0

 

2.  无需安装zend,5.2.17已经包含。

 

对php.ini的修改必须完全重启IIS才能起作用,而不能只是对当前站点进行重启。
进入cmd,停止服务器:net stop iisadmin;启动服务器:net start w3svc

或:

iisreset /restart

 

3. 用5.2.17, thread safe zip 版本手工安装

1) 解压到c:\php

2) 修改php.ini:

 

Required directives:     

  • extension_dir =  "C:\PHP\ext" or relative (i.e. ".\ext").

  • extension =xxxxx.dll - For each extension you wish to enable, you need a corresponding "extension="          directive that tells PHP which extensions in theextension_dir to load at startup time.       

  • error_log =  "C:\inetpub\temp\php-errors.log"       

  • cgi.force_redirect =0

     

    //下面为fastcgi,isapi安装可以省

  • cgi.fix_pathinfo =1 - This lets PHP access real path info following the CGI Spec.          The IIS FastCGI implementation needs this set.       

  • fastcgi.impersonate =1 - FastCGI under IIS supports the ability to impersonate          security tokens of the calling client. This allows IIS to define the security context that the request runs under.       

  • fastcgi.logging =0 - FastCGI logging should be disabled on IIS. If it is left enabled,          then any messages of any class are treated by FastCGI as error conditions which will cause IIS to generate an HTTP 500 exception.

3) 导入php.ini 路径到注册表:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\PHP]
"IniFilePath"="C:\\PHP"

或者:

通过设置PHPRC 环境变量,
  a)       操作:右击我的电脑->属性->高级->环境变量
  b)       在系统变量下新建一个“变量名为PHPRC   ,变量值为你的php.ini文件所地文件路径”的环境变量

4)

libmysql.dll文件必须放在Windows 的系统路径PATH才能访问,可以通过把libmysql.dll复制到system32目录下,也可以在PATH环境变量中新增一个路径。
 建议做法:通过设置PATH,方便以后的php升级,在系统环境变量中的PATH后增加“libmysql.dll”所在的文件夹即可。记得通过“;”号隔开

 

5)iis isapi扩展设置

  • Expand the local computer in the left pane
  • Click on "Web Service Extensions" in the left pane
  • In the right pane, click the blue underlined text, "Add a new Web service extension..."
  • Enter "PHP ISAPI Extension" as the "Extension name"
  • Click the "Add..." button and browse to the php5isapi.dll file in your PHP install folder
  • Check the "Set extension status to Allowed" checkbox and click "OK"

     

    6)打开“Web 站点属性”窗口的“主目录”标签,找到并点击“配置”按钮,在弹出的“应用程序配置”窗口中找到并点击“添加”按钮,在弹出的窗口中新增一个扩展名映射,扩展名为 .php ,单击“浏览”将可执行文件指向 php5isapi.dll 所在路径,如:C: \php\php5isapi.dll,然后一路确定即可(如下图设置所示)。如果还想支持诸如 .php3 ,.phtml 等扩展名的 PHP 文件,可以重复“添加”步骤。

    再打开“Web 站点属性”窗口的“文档”标签,找到并点击“添加”按钮,向默认的 Web 站点启动文档列表中添加 index.php 项

     

    还有,home directory权限要打开为 ‘script only’

     

     

    注意:xp上iis设置和2003的iis设置不同。

     

    6) 其他什么网上说的isapi filter设置都不需要,什么docu_root, path, 权限,copy dll到系统目录等等,都是不需要的。


    test php:

    <?php

    phpinfo();
     ?>

     

    http://www.peterguy.com/php/install_IIS6.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值