ionCube PHP Loader on RHEL Server

ioncube-loader

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".

  1. Goto http://www.ioncube.com/loaders.php and download ionCube loader.
    ioncube_loaders_lin_x86.tar.gz
  2. upload to server machine and extract
    tar -zxvf ioncube_loaders_lin_x86.tar.gz
  3. 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/
  4. 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
  5. 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
  6. 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
  7. 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