IonCube Loader 是一个 PHP 的模组, 可以加载已经编码的 PHP 程式码并正确执行。以下文章会介绍在 CentOS 下安装 IonCube Loader.
1. 首先下载 IonCube Loader 模组到 DocumentRoot 目录, 根据不同的系统下载合适的档案:
64-Bits:
# wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
32-Bits:
# wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
2. 解压下载回来的压缩档, 下面以 64-Bits 为例:
3. 然后用浏览器开启解压出来的 ioncube/loader-wizard.php 档案, 例如:
http://your-server-ip/ioncube/loader-wizard.php
开启了以上页面后, IonCube Loader Wizard 会显示那一个 .so 档案适合已安装了的 PHP 使用, 下面会以 ioncube_loader_lin_5.4.so 为例子:
4. 然后复制 IonCube Loader Wizard 显示的那一个档案到 PHP 模组目录, 32-Bits 系统的目录是 /usr/lib/php/modules; 64-Bits 系统的目录是 /usr/lib64/php/modules:
5. 建立档案 /etc/php.d/20ioncube.ini:
加入以下内容:
zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_5.4.so
储存盘安后离开编辑器。
6. 重新启动 Apache:
7. 最后测试 IonCube Loader 正确安装, 可以用浏览器开启上面的 loader-wizard.php 页面:
http://your-server-ip/ioncube/loader-wizard.php
在最下面的位置按 “When the server software has restarted, click here to test the Loader.”, 如果看到类似以下文字, 表示 IonCube Loader 运作正常:
|
1 2 3 |
Loader Installed Successfully The ionCube Loader version 5.0.18 for PHP 5.4 is installed and encoded files should run successfully. |