今天在 CentOS 的 LAMP 下测试程式的时候会出现提示:Site error: the file /***/index.php requires the ionCube PHP Loader ioncube_loader_lin_5.2.so to be installed by the site administrator.
登入 root 帐号,先执行
uname -a
检视系统是 32 位还是 64 位,
64 位的显示
Linux ps4 2.6.16.46-0.12-smp #1 SMP Thu May 17 14:00:09 UTC 2007 x86_64 x86_64 x86_64 GNU/Linux
后面显示有 x86_64
32 位的显示:
Linux fc6 2.6.18-1.2798.fc6 #1 SMP Mon Oct 16 14:54:20 EDT 2006 i686 i686 i386 GNU/Linux
然后再开启 http://www.ioncube.com/loaders.php
页面根据 Linux 是 32 位还是 64 位下载适当的站群软件包,比如我的是 32 位的,执行
cd /usr/local
切换到/usr/local/目录, 然后再下载选择的包
wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.zip
再执行
tar zxvf ioncube_loaders_lin_x86.tar.gz
解压站群软件包。
修改/usr/local/php/etc/php.ini 在档案尾部新增如下程式码:
[ionCube Loader]
zend_extension=”/usr/local/ioncube/ioncube_loader_lin_5.2.so”
如果以前装有 Zend Optimizer,安装 ionCube 会和 Zend Optimizer 发生冲突,不过在新增程式码的时候,将上面的新增到 zend 之前就好了。