woff 發表於 2012-5-10 13:08:01

安裝Zend Guard Loader for PHP5.3 中文說明SELinux解決方法

Zend Guard Loader安裝說明
1。下載Zend Guard Loader包。(下面是官方地址,最帖子底部有本地附件)
Linux:
x86:http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz
x64:http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz
Windows:
http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-Windows.zip

2。並提取ZendGuardLoader.so(Linux)或ZendLoader.dll(Windows)上傳到服務器。

3。加載ZendGuardLoader,配置PHP.INI
例子:
zend_loader.enable=1
zend_loader.disable_licensing=1
zend_loader.obfuscation_level_support=3
zend_loader.license_path=
zend_extension=/usr/local/zend/ZendGuardLoader.so

下面逐一說明
注意windows版的只支持NTS(非線程安全)版的PHP5.3,即phpinfo中Thread Safety為disabled的.
在你的php.ini文件中添加以下行:
Linux和Mac OS X:zend_extension=<ZendGuardLoader.so的絕對路徑>
Windows的非線程安全的:zend_extension=<ZendLoader.dll的絕對路徑>

4。添加下面這行加載ZendGuardLoader:
;啟用加載編碼腳本。默認開啟
zend_loader.enable=1

5。可選:配置ZendGuardLoader
;禁用檢查授權(出於性能原因)
zend_loader.disable_licensing=0
;配置混淆水平 0 - 不支持混淆
zend_loader.obfuscation_level_support=3
;配置尋找授權文件的路徑
zend_loader.license_path=

6. 如果你同時使用Zend debugger,請保證加載Zend guard Loader後再加載Zend debugger

7. 如果你同時使用Ioncube loader,請保證加載Ioncube loader後再加載Zend guard Loader

8。重啟Web服務。
9.如果預設SELINUX開啟SELinux搞鬼
#cd /usr/local/zend
#find lib -type d -exec chcon -t lib_t {} \;
#find lib -name “*.so” -exec chcon -t textrel_shlib_t {} \;
如果這條程式沒用 #find lib -name “*.so” -exec chcon -t textrel_shlib_t {} \;
改成
#cd /usr/local/zend
#chcon -t textrel_shlib_t *.so
#vim /etc/selinux/targeted/modules/local.te
module local 1.0;
require {
type httpd_t;
class process { execstack execmem execheap };
}
allow httpd_t self:process { execstack execmem execheap };
#cd /etc/selinux/targeted/modules
#checkmodule -M -m -o local.mod local.te
#semodule_package -o local.pp -m local.mod
#semodule -i ./local.pp
#/etc/init.d/httpd restart


英文說明:
Zend Guard Loader installation instructions
-------------------------------------------
1. Extract the Zend Loader package.
2. Locate and extract the ZendGuardLoader.so (Linux) or ZendLoader.dll (Windows) that corresponds to your php version.
3. Add the following line to your php.ini file for loading the ZendGuardLoader:
   Linux and Mac OS X:      zend_extension=<full_path_to_ZendGuardLoader.so>
   Windows non-thread safe: zend_extension=<full_path_to_ZendLoader.dll>
      
4. Add an aditional line to your php.ini for enabling ZendGuardLoader
; Enables loading encoded scripts. The default value is On
zend_loader.enable=1
   
5. Optional: following lines can be added your php.ini file for ZendGuardLoader configuration:
   ; Disable license checks (for performance reasons)
   zend_loader.disable_licensing=0
   ; The Obfuscation level supported by Zend Guard Loader. The levels are detailed in the official Zend Guard Documentation. 0 - no obfuscation is enabled
   zend_loader.obfuscation_level_support=3
   ; Path to where licensed Zend products should look for the product license. For more information on how to create a license file, see the Zend Guard User Guide
   zend_loader.license_path=
6. If you use Zend debugger as well, please make sure to load it after the Zend guard Loader
7. If you use ioncube loader, please make sure to load it before Zend guard Loader
8. Restart your Web server.

ysabougv5b 發表於 2013-11-9 00:59:43

嚴重支持!

cpreb 發表於 2013-11-9 00:59:43

我的啦嘿嘿
頁: [1]
查看完整版本: 安裝Zend Guard Loader for PHP5.3 中文說明SELinux解決方法