公司的项目里,有几个文件是被加密的,经过一翻折腾,终于配置成功
文件加密技术用的是ZendGuard,所以必须安装的PHP必须得是nts的
一、下载并配置PHP
先下载安装php,注意VC版本和是否nts,地址:下载PHP
配置php,修改php.ini,修改extension_dir到ext文件夹,再打开要用的模块就好
二、下载配置APACHE的fcgid模块
要配置nts,apache必须要mod_fcgid.so,下载时注意fcgid务必和apache的版本一致,地址:下载FCGID
下载完毕后,把mod_fcgid.so文件在Apache24/modules/ 目录里
然后打开httpd.conf文件,加入下面两行
LoadModule fcgid_module modules/mod_fcgid.soInclude conf/extra/httpd-fcgid.conf
然后打开httpd-fcgid.conf,复制下面的代码,修改三条路径,保存退出
<IfModule fcgid_module> ???????FcgidInitialEnv PHPRC ?????????????????????"E:/PHP/php5.4nts" ???????FcgidInitialEnv PHP_FCGI_MAX_REQUESTS ?????1000 ???????FcgidMaxRequestsPerProcess ????????????????1000 ???????FcgidMaxProcesses ?????????????????????????15 ???????FcgidIOTimeout ????????????????????????????120 ???????FcgidIdleTimeout ??????????????????????????120 ???????AddType application/x-httpd-php .php ???????<Files ~ "\.php$>" ???????????????AddHandler fcgid-script .php ???????????????FcgidWrapper "E:/PHP/php5.4nts/php-cgi.exe" .php ???????</Files></IfModule>#为站点根目录的Options增加ExecCGI,假设根目录是E:/PHP/Code<Directory "E:/PHP/Code"> ???????AllowOverride All ???????Options -Indexes +ExecCGI</Directory>
到此为止fcgid配置完毕。如果还要虚拟域名,这里给个模板,修改红色部分即可
<VirtualHost *:80> ???DocumentRoot "E:/PHP/Code" ???ServerName localhost ???<Directory "E:/PHP/Code"> ???????Options Indexes FollowSymLinks ExecCGI ???????Order allow,deny ???????Allow from all ???????AllowOverride All ???</Directory></VirtualHost>
三、安装ZendGuardLoader
下载软件时,注意看清是32位还是64位,以及匹配的php版本,下载ZendGuardLoader
下载完毕后,把ZendLoader.dll拷贝到php目录下的ext目录下面
然后打开php.ini,粘贴下面的代码,修改地址。
[zend_loader]zend_loader.enable=1zend_loader.disable_licensing=1zend_loader.obfuscation_level_support=3zend_loader.license_path=zend_extension = "E:\PHP\php5.4nts\ext\ZendLoader.dll"
WAMP下配置HTTPS+ZendGuardLoader
原文地址:https://www.cnblogs.com/jorzy/p/8541223.html