CentOS7.0+Zend Guard Loader for PHP 5.6环境搭建

本文是在centos7.0环境下搭建的, 由于我的php是5.6版本的, 所以需要去下载对应的Zend Guard Loader。

    下载地址:

    http://www.zend.com/en/products/loader/downloads

    下载后解压:

tar zxvf zend-loader-php5.6-linux-x86_64_update1.tar.gz

    将opcache.so 和 ZendGuardLoader.so 拷贝到php lib库路径下即可:

    cp  opcache.so  /usr/local/php/lib/

    cp  ZendGuardLoader.so  /usr/local/php/lib/

    接着编辑php.ini文件:

    vi  /usr/local/php/etc/php.ini

    找到;   extension=/path/to/extension/msql.so 这一行

    在下面添加以下两行:

    zend_extension=/usr/local/php/lib/ZendGuardLoader.so

    zend_extension=/usr/local/php/lib/opcache.so

    接着在任意位置添加以下内容:

; Enables loading encoded scripts. The default value is On
      zend_loader.enable=1
 
   ; 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=

此时,运行 php  -v , 可以看到如下:

看到上面的“with  Zend  Guard  Loader v3.3” , 说明安装成功了。

原文地址:https://www.cnblogs.com/jiangxiaobo/p/9910275.html