Zend Optimizer已经不支持php5.3了,官方给出了ZendGuardLoader代替,安装和原版类似。
linux下版本下载:
wget -c http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz
解压:tar -zxvf ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz
cd ZendGuardLoader-php-5.3-linux-glibc23-x86_64
mkdir /usr/local/zend
cp php5.3.x/ZendGuardLoader.so /usr/local/zend
[Zend Guard Loader] zend_extension="/usr/local/zend/ZendGuardLoader.so" zend_loader.enable=1 zend_loader.disable_licensing=0 zend_loader.obfuscation_level_support=3 zend_loader.license_path= 然后重启php即可。 Failed loading /usr/local/zend/ZendGuardLoader.so: /usr/local/zend/ZendGuardLoader.so: cannot restore segment prot after reloc: Permission denied 解决办法:1、setenforce 0 或者vim /etc/sysconfig/selinux SELINUX=disabled 2、chcon -t textrel_shlib_t /usr/local/zend/ZendOptimizer.so
用phpinfo测试下出现如下提示说明安装成功:
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies
然后再php.ini里面添加下面代码: