windows IIS+PHP5.3 zend_loader成功安装运行,PHP加密解
很简单:
1、安装PHP(非线程安全 php-5.3.8-nts-Win32-VC9-x86.msi)时,你必须选择是IIS FAST CGI。
2、当你配置好PHP.ini 文件,
Windows下为
http://downloads.zend.com/guard/5.1.0EA/ZendGuardLoader-php-5.3-Windows.zip
解压,提取ZendGuardLoader.so,Windows下叫ZendLoader.dll,放到PHP的ext目录下(推荐,不是必须)
编辑php.ini,
[Zend.loader]
zend_loader.enable=1
zend_loader.disable_licensing=1
zend_loader.obfuscation_level_support=3
zend_loader.license_path=
zend_extension="c:\php\ext\ZendLoader.dll
*在windows下,拷贝PHP.ini在 x:\windows (x代表你安装windows的盘符,这步很重要,如果没有这步,无法运行加密的)
*我的 电脑增加环境变量:变量名:PHPRC 变量值(你PHP安装路径):D:\webserver\PHP_Windows\
你在命令窗口运行:PHP -V
出现如下:
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
说明Zend Guard Loader 没有运行起来,配置有问题。
如果出现如下:
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies
说明是 Zend Guard Loader成功。此时,恭喜你,你成功了一半(!!!)
3、很重要的一个容易忽略的问题(********)
拷贝PHP.ini在 x:\windows (x代表你安装windows的盘符,这步很重要,如果没有这步,无法运行加密的)
4、重启IIS,用php探针来查看或者用 <?php phpinfo(); ?>,出现如下:
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies
说明成功!就可以使用zend guard 5.5加密后的PHP了。
5、注意,windows下的apache +PHP 目前是不能使用zend guard 5.5!
6、因此如果你要用PHP 5.3或者更新的版本,那么你就要用Zend Guard Loader而不是Zend Optimizer。
Zend Guard Loader将替代原先的ZendOptimizer,也就是说ZendOptimizer在php5.2的时候生命周期就结束了,而在全新的php5.3系列版本中都将用Zend Guard Loader替代;不光如此,Zend Guard 5.5也更新了加密php文件的算法来迎合php5.3新版本支持,所以我们之前用Zend Guard老版本加密过的php文件在php5.3+Zend Guard Loader的环境下都无法正常浏览,会报诸如下列错误
Fatal error: Incompatible file format: The encoded file has format major ID 1, whereas the Loader expects 4 in
解决方法就是把php源文件在Zend Guard 5.5下重新加密,然后才能浏览。 [Web开发]PHP5.3.x安装Zend Optimizer(Zend Guard Loader)[…
|