WampServer中Apache使用FastCGI模式跑PHP5.3nts版

要用到一套使用了 Zend Guard 加密PHP系统,且运行环境是 PHP5.3,所以需要使用 Zend Guard Loader 扩展。

Zend Guard Loader 扩展 Win 版只支持运行在 PHP5.3 以上的 nts 版上,但 Window 版的 Apache 貌似已经不支持nts版的PHP了,蛋疼。

我用的是WampServer集成环境,于是就想到了把 Apache 换成 FastCGI 模式来跑 PHP5.3 nts 版,这样就可以使用Zend Guard Loader 扩展了。


1、下载 PHP5.3.28 ,解压到 F:/php5.3.28nts ,配置好 php.ini,也顺便把 Zend Guard Loader 扩展配置好。

2、下载 mod_fcgid-2.3.6-win32-x86.zip 解压 manual、modules 目录中的文件到 f:\wamp\bin\apache\apache2.2.22 对应目录里去。

3、打开 Apache 配置文件 F:\wamp\bin\apache\apache2.2.22\conf\httpd.conf ,用#号注释掉 LoadModule php5_module "F:/wamp/bin/php/php5.3.13/php5apache2_2.dll" ,并在下面一行加入 :

LoadModule fcgid_module modules/mod_fcgid.so

4、在 httpd.conf 配置文件的最后加入下面的配置:

AddHandler fcgid-script .fcgi .php
#php.ini的存放目录
FcgidInitialEnv PHPRC "F:/php5.3.28nts"
# 设置PHP_FCGI_MAX_REQUESTS大于或等于FcgidMaxRequestsPerProcess,防止php-cgi进程在处理完所有请求前退出
FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 1000
#php-cgi每个进程的最大请求数
FcgidMaxRequestsPerProcess 1000
#php-cgi最大的进程数
FcgidMaxProcesses 3
#最大执行时间
FcgidIOTimeout 120
FcgidIdleTimeout 120
#php-cgi的路径
FcgidWrapper "F:/php5.3.28nts/php-cgi.exe" .php
AddType application/x-httpd-php .php

5、告诉 Apache 执行方式,修改配置如下:

<Directory “D:/Web”>
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>

6、最后重启 Apache。


155849_5eLd_252582.png

转载于:https://my.oschina.net/Twitter/blog/210044

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值