适用版本 AMH2.0 & AMH2.01
-----------------------------------------
1) 查看系统信息。
# amh info
Amysql Host - AMH 2.0
http://Amysql.com
Linux: CentOS release 5.8 (Final) - 32BIT
UpTime: 1:38 online.
Time: 2012-11-14 19:33:18
LA: 0.00, 0.00, 0.00
IP: 108.171.253.24
CPU: 0.0%us, 1*CPU - Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
RAM: 39MB / 128MB
HD: 1.6GB / 9.9GB
看到上面为:32BIT系统
2) 进入local目录
# cd /usr/local/;
3) 下载对应的位数的扩展模块文件并解压:
32BIT:
# wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
# tar -zxvf ioncube_loaders_lin_x86.tar.gz
64BIT:
# wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
# tar -zxvf ioncube_loaders_lin_x86-64.tar.gz
4) 改更文件类型并添加配置参数至php.ini文件
vi /etc/php.ini
输入:set ff=unix
再输入:wq 保存退出。
执行:
# ioncube='\n \nzend_extension="/usr/local/ioncube/ioncube_loader_lin_5.3.so"'; echo -e $ioncube >> /etc/php.ini
5) 重启面板完成
/etc/init.d/amh-start
或者参考
修改/usr/local/php/etc/php.ini 在文件尾部添加如下代码:
[ionCube Loader]
zend_extension="/usr/local/ioncube/ioncube_loader_lin_5.2.so"
如果以前装有Zend Optimizer,安装ionCube会和Zend Optimizer发生冲突,
再执行/usr/local/php/php-fpm reload 时会发生如下错误:
The Loader must appear as the first entry in the php.ini file in Unknown on line 0
须将Zend Optimizer的代码删除,如LNMP中 是如下代码,删除再执行/usr/local/php/php-fpm restart 。
[Zend Optimizer]
zend_optimizer.optimization_level=1
zend_extension="/usr/local/zend/ZendOptimizer.so"
修改完成,记得/usr/local/php/php-fpm reload 重新加载配置,查看phpinfo。
/usr/local/php/sbin/php-fpm reload
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
with eAccelerator v0.9.5.3, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
with the ionCube PHP Loader v3.3.10, Copyright (c) 2002-2009, by ionCube Ltd.
文章评论