
My work have to use software that requires the ionCube PHP Loader to encode scripts. This instruction is explain "How to install iconCube loader on RHEL4".
- Goto http://www.ioncube.com/loaders.php and download ionCube loader.
ioncube_loaders_lin_x86.tar.gz
- upload to server machine and extract
tar -zxvf ioncube_loaders_lin_x86.tar.gz
- Copy the 'ioncube-loader-helper.php' and 'ioncube-encoded-file.php' to a directory where you expect encoded files to be working.
cp ./ioncube/ioncube-loader-helper.php /your-www-root/
cp ./ioncube/ioncube-encoded-file.php /your-www-root/
- Access the 'ioncube-loader-helper.php' script from a web server or with a PHP executable. This script can help you to find information about Loader installation.
http://yoursite.com/ioncube-loader-helper.php
- Choose the 'run-time loading installation instructions.' option.
The script will try to locate and install the required Loader, and will produce output as it runs.
Looking for Loader 'ioncube_loader_lin_5.2.so'
Extensions Dir: /usr/local/php5/lib/php/extensions/current (/usr/local/php5/lib/php/extensions/5.2.8)
Relative Path: /something
- add the following line before any other zend_extension lines.
zend_extension = /<path>/ioncube_loader_lin_5.2.sowhere /<path>/ is where you've installed the loader, e.g. /usr/local/php5/lib/php/extensions/5.2.8
If there are no zend_extension lines already, you can put the line at any point in the file. I'm usingzend_extension = /usr/local/php5/lib/php/extensions/5.2.8/ioncube_loader_lin_5.2.so
- Copy ioncube_loader_lin_x.x.so to your extension path.
sudo cp ioncube_loader_lin_5.2.so /usr/local/php5/lib/php/extensions/5.2.8/
Finally, restart your web server software for the changes to take effect.
/etc/init.d/httpd restart