环境:CentOS 6.5 64bit
PHP版本:5.3.3
【问题】
在搭建stalker server时,/var/www/html/stalker_portal/deploy 执行phing出现如下错误:
[exec] Executing command: php -v | grep -i ioncube | wc -l 2>&1
[echo] IonCube installed: 0
[exec] Executing command: cat /etc/php.ini | grep '^zend_extension' | grep -v 'ioncube_loader' | wc -l 2>&1
[echo] Zend extensions available: 0
[echo] Please add the following line to your php.ini file as first Zend extension and restart apache
原因是没有安装IonCube。
关于IonCube相关介绍:
http://blog.youkuaiyun.com/adparking/article/details/54667036
关于ZendGuardLoader相关介绍:
http://www.heminjie.com/network/2968.html
【解决方法】
按照错误说明提示:
Please add the following line to your php.ini file as first Zend extension and restart apache
在/etc/php.ini中增加:
zend_extension=/usr/lib64/php/modules/ioncube_loader_lin_5.3.so
重启Apache:
[root@localhost deploy]# service httpd restart
查看php版本:
[root@localhost deploy]# php -v
PHP 5.3.3 (cli) (built: Mar 22 2017 12:27:09)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.1.1, Copyright (c) 2002-2016, by ionCube Ltd.
看到已成功配置支持ioncube。
再次执行phing构建成功。
[root@localhost deploy]# phing
[copy] Copying 1 file to /usr/lib64/php/modules
[chmod] Changed file mode on '/usr/lib64/php/modules/ioncube_loader_lin_5.3.so' to 644
[exec] Executing command: php -v | grep -i ioncube | wc -l 2>&1
[echo] IonCube installed: 1