Windows下IIS+PHP5.3.x zend guard loader 的配置方法
PHP 5.3 下,Zend Optimizer 已經被全新的 Zend Guard Loader 取代
下面介紹Windows下IIS+PHP5.3.x的配置方法:
1. 下載 Zend Guard Loader 壓縮包?,F在的版本是Zend Guard Loader (Runtime for PHP 5.3) 5.5.0
官方下載地址:http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-Windows.zip
2. 解壓并提取 ZendLoader.dll。
3. 在你的 php.ini 文件添加下面一行,用來加載 Zend Guard Loader:
Windows(非線程安全):
zend_extension = 完整路徑/ZendLoader.dll
4. 在 php.ini 額外新增一行,啟用 Zend Guard Loader:
zend_loader.enable = 1
5. 可選:可以在 php.ini 文件添加以下行到 Zend Guard Loader 配置位置:
;禁用許可證檢查(為了性能的原因)
zend_loader.disable_licensing = 0
;讓 Zend Guard Loader 支持混淆級別。級別在 Zend Guard 的官方詳細文檔。 0 – 不啟用混淆
zend_loader.obfuscation_level_support = 3
;從這個路徑尋找Zend產品授權的產品許可證。這里配置為空即可。
zend_loader.license_path =
6. 如果您使用 Zend debugger,請確保加載 Zend guard Loader。
7. 如果您使用 ioncube loader,請務必在它之前加載 Zend guard Loader。
8. 重新啟動Web服務器。
總起來說,就是在php.ini文件后面加上這一段
[Zend.loader]
zend_extension=”d:\php\ext\ZendLoader.dll”(這里要換成你自己的路徑)
zend_loader.enable=1
zend_loader.disable_licensing=0
zend_loader.obfuscation_level_support=3
zend_loader.license_path=
最后我們來測試下安裝是否成功,重啟IIS,用php探針來查看或者用 <?php phpinfo(); ?>
如圖:
其他參考:http://www.51752.com/archives/126.html
PHP從5.3開始用Zend Guard Loader來代替Zend Optimizer,加速的效果應該不是很明顯了,畢竟PHP5本身就很快了。主要是運行用Zend Guard加密的PHP程序。
下載 Zend Guard Loader http://downloads.zend.com/guard/5.1.0EA/ZendGuardLoader-php-5.3-Windows.zip
解壓包里的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:/php5/ext/ZendLoader.dll”
其中 c:/php5/ext/ 換成你的目錄
保存,重啟 web 服務器
如果安裝成功,可以在PHPINFO里看到 Zend Guard Loader信息
注意:改包里的ZendLoader.dll 只能用于 非安全線程(non thread safe)的PHP。