Wednesday, May 8, 2013

Zend Guard Loader Zend Optimizer install CentOS 6

0. Download package:

# wget http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz

1. Extract the Zend Loader package.

# tar xzvf ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz

2. Locate and extract the ZendGuardLoader.so (Linux) or ZendLoader.dll (Windows) that corresponds to your php version.

# cp ZendGuardLoader-php-5.3-linux-glibc23-x86_64/php-5.3.x /usr/lib64/php/modules/

3. Add the following line to your php.ini file for loading the ZendGuardLoader:
Linux and Mac OS X: zend_extension=
Windows non-thread safe: zend_extension=

# vi /etc/php.d/ZendGuard.ini

; Enable Zend Guard extension
zend_extension=/usr/lib64/php/modules/ZendGuardLoader.so
zend_loader.enable=1


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.

# service httpd restart

To Fix Selinux issue:
# cd /usr/lib64/php/modules/
# chcon -h --reference=curl.so ZendGuardLoader.so

It may not works after chcon, then do this:
# execstack -c /usr/lib64/httpd/modules/ZendGuardLoader.so

5 comments:

  1. Undeniably consider that that you said. Your favorite reason seemed to be on the web the simplest thing to have in mind of. I say to you, I definitely get irked while folks think about worries that they just don't recognise about. You controlled to hit the nail upon the top and defined out the whole thing with no need side effect , other folks can take a signal. Will probably be again to get more. Thanks

    ReplyDelete
  2. I just like the valuable information you supply to your articles. I will bookmark your weblog and check once more right here frequently. I am moderately certain I'll be informed a lot of new stuff right right here! Good luck for the following!

    ReplyDelete
  3. Excellent beat ! I would like to apprentice even as you amend your website, how can i subscribe for a blog website? The account helped me a acceptable deal. I were tiny bit acquainted of this your broadcast offered vivid transparent concept

    ReplyDelete
  4. SE-Linux fix does not work?
    chcon -h –reference=curl.so ZendGuardLoader.so
    chcon: failed to change context of `ZendGuardLoader.so' to `system_u:eference=curl.so:lib_t:s0': Invalid argument


    execstack -c /usr/lib64/httpd/modules/ZendGuardLoader.so
    no such path /usr/lib64/httpd/modules/ZendGuardLoader.so

    ReplyDelete
  5. Are you using 64 bit OS?
    It seems you are missing the lib file.
    Let me know how it goes.

    ReplyDelete