找回密碼
 註冊
搜索
查看: 4719|回復: 3

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

  [複製鏈接]
發表於 2012-5-10 13:08:01 | 顯示全部樓層 |閱讀模式
 
Push to Facebook
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
例子:
  1. [Zend.loader]
  2. zend_loader.enable=1
  3. zend_loader.disable_licensing=1
  4. zend_loader.obfuscation_level_support=3
  5. zend_loader.license_path=
  6. 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搞鬼

  1. #cd /usr/local/zend
  2. #find lib -type d -exec chcon -t lib_t {} \;
  3. #find lib -name “*.so” -exec chcon -t textrel_shlib_t {} \;
複製代碼
如果這條程式沒用
  1. #find lib -name “*.so” -exec chcon -t textrel_shlib_t {} \;
複製代碼
改成

  1. #cd /usr/local/zend
  2. #chcon -t textrel_shlib_t *.so
複製代碼
#vim /etc/selinux/targeted/modules/local.te

  1. module local 1.0;
  2. require {
  3. type httpd_t;
  4. class process { execstack execmem execheap };
  5. }
  6. 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.
 
發表於 2013-11-9 00:59:43 | 顯示全部樓層
嚴重支持!
版主招募中
發表於 2013-11-9 00:59:43 | 顯示全部樓層
我的啦嘿嘿  
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

Archiver|手機版|小黑屋|TShopping

GMT+8, 2025-5-1 07:17 , Processed in 0.025562 second(s), 22 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回復 返回頂部 返回列表