windows 2008 iis中使用php

windows 2008 iis中使用php
准备工作
下载php5.2.8 并解压到如c:/php
把c:/php加入系统环境变量 path中

1、在iis中增加cgi服务(通过控制面板=>程序=》增加角色服务)
2、iis 中可以看到 CGI了
3、在应用程序映射中,增加“模板映射” 依次填入 *.php,e:/php/php-cgi.exe,fastCGIModule(选择)
4、把php文件放入站点
5、运行
6、出现 FastCGI 进程超过了配置的活动超时时限
7、在下列文件( C:/Windows/System32/inetsrv/config/applicationHost.config)中加入    
    <fastCgi>
            <application fullPath="E:/appJar/php/php-cgi.exe" activityTimeout="600" />
    </fastCgi>

    activityTimeout="600" 是关键
8、注意:此时站点的Web.config文件中已经增加了
  <system.webServer>
       <handlers>
            <add name="Php-FastCGI" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="E:/appJar/php/php-cgi.exe" resourceType="Unspecified" />
        </handlers>
  </system.webServer>

9以下是通过命令的方式增加 activityTimeout="600"到文件 C:/Windows/System32/inetsrv/config/applicationHost.config中
%windir%/system32/inetsrv/appcmd set config "www.winfang.com" -section:system.webServer/fastCgi /[fullPath='e:/php/php-cgi.exe'].activityTimeout:600

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值