Tag: ioncube

  • How To Install ionCube on Ubuntu 20.04

    How To Install ionCube on Ubuntu 20.04

    ionCube is PHP extension that is used to load ionCube encoded PHP files. ionCube is used to protect commercial PHP scripts by encoding it, so no one can read the actual PHP code.

    First, download ioncube loader from

    https://www.ioncube.com/loaders.php

    cd /usr/local/src
    wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
    tar xvf ioncube_loaders_lin_x86-64.tar.gz
    cd ioncube/
    

    Find extension directory and copy .so file to PHP extension directory. To find PHP extension directory run

    php -i | grep  extension_dir
    

    On my installation, i have PHP extension_dir set to /usr/lib/php/20190902. If it’s different for you, change the path in the following command.

    For PHP 7.4, run

    cp /usr/local/src/ioncube/ioncube_loader_lin_7.4.so /usr/lib/php/20190902
    

    Enable ioncube

    echo "zend_extension=ioncube_loader_lin_7.4.so" > /etc/php/7.4/mods-available/ioncube.ini
    ln -s /etc/php/7.4/mods-available/ioncube.ini /etc/php/7.4/cli/conf.d/01-ioncube.ini
    

    for Apache, run

    ln -s /etc/php/7.4/mods-available/ioncube.ini /etc/php/7.4/apache2/conf.d/01-ioncube.ini
    systemctl restart apache2
    

    for php-fpm, run

    ln -s /etc/php/7.4/mods-available/ioncube.ini /etc/php/7.4/fpm/conf.d/01-ioncube.ini
    systemctl restart php7.4-fpm
    
  • Install ionCube on Ubuntu 18.04

    Install ionCube on Ubuntu 18.04

    Download ioncube loader from

    https://www.ioncube.com/loaders.php

    cd /usr/local/src
    wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
    tar xvf ioncube_loaders_lin_x86-64.tar.gz
    cd ioncube/
    

    Find extension diretcory and copy .so file to php extension diretcory. To find php extension directory run

    php -i | grep  extension_dir
    

    For PHP 7.2, run

    cp /usr/local/src/ioncube/ioncube_loader_lin_7.2.so /usr/lib/php/20170718 
    

    Enable ioncube

    echo "zend_extension=ioncube_loader_lin_7.2.so" > /etc/php/7.2/mods-available/ioncube.ini
    ln -s /etc/php/7.2/mods-available/ioncube.ini /etc/php/7.2/cli/conf.d/01-ioncube.ini
    

    for Apache, run

    ln -s /etc/php/7.2/mods-available/ioncube.ini /etc/php/7.2/apache2/conf.d/01-ioncube.ini
    systemctl restart apache2
    

    for php-fpm, run

    ln -s /etc/php/7.2/mods-available/ioncube.ini /etc/php/7.2/fpm/conf.d/01-ioncube.ini
    systemctl restart php7.2-fpm
    
  • Install ioncube on CentOS Plesk Server

    Install ioncube on CentOS Plesk Server

    To install ioncube on Plesk server, run

    yum install plesk-php56-ioncube-loader plesk-php70-ioncube-loader plesk-php71-ioncube-loader plesk-php72-ioncube-loader
    

    To verify ioncube installed, create a PHP file with following content

    
    

    Upload it to server and access the file via web browser. You will see phpinfo. This will show ioncube if installed properly.

  • Install ionCube on Debian 9

    Install ionCube on Debian 9

    Download latest version of ionCube loader from

    cd /usr/local/src
    wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
    tar xvf ioncube_loaders_lin_x86-64.tar.gz
    cd ioncube/
    

    Check PHP version with

    php -v
    

    On Debian 9, default will be PHP 7.0, so you need to use file ioncube_loader_lin_7.0.so

    Find PHP extension_dir, this is where you need to put PHP extensions.

    root@ip-172-31-44-173:/usr/local/src/ioncube# php -i | grep  extension_dir
    extension_dir => /usr/lib/php/20151012 => /usr/lib/php/20151012
    root@ip-172-31-44-173:/usr/local/src/ioncube# 
    

    Copy the file to extension directory

    cp /usr/local/src/ioncube/ioncube_loader_lin_7.0.so /usr/lib/php/20151012
    

    Enable ionCube loader with

    echo "zend_extension=ioncube_loader_lin_7.0.so" > /etc/php/7.0/mods-available/ioncube.ini
    ln -s /etc/php/7.0/mods-available/ioncube.ini /etc/php/7.0/cli/conf.d/01-ioncube.ini
    ln -s /etc/php/7.0/mods-available/ioncube.ini /etc/php/7.0/apache2/conf.d/01-ioncube.ini
    

    Now php -m will show ioncube

    root@ip-172-31-44-173:~# php -m | grep ion
    ionCube Loader
    Reflection
    session
    the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured)
    root@ip-172-31-44-173:~# 
    

    Restart apache

    service apache2 restart
    

    ioncube | ionCube on Debian 8

  • Install ioncube on Debian 8

    To install ioncube Debian 8, first download the ioncube loader from

    http://www.ioncube.com/loaders.php

    cd /usr/local/src
    wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
    tar xvf ioncube_loaders_lin_x86-64.tar.gz
    cd ioncube/
    

    This folder have loader for several PHP versions, find the PHP version you have with command

    php -v
    

    By default Debian 8 come with PHP 5.6. The file you need to use for PHP 5.6 is ioncube_loader_lin_5.6.so

    You need to copy this file to PHP extension directory. To find this, run

    # php -i | grep extension_dir
    extension_dir => /usr/lib/php5/20131226 => /usr/lib/php5/20131226
    # 
    

    Lets copy ioncube loader file to extension diretcory

    cp /usr/local/src/ioncube/ioncube_loader_lin_5.6.so /usr/lib/php5/20131226
    

    create file

    echo "zend_extension=ioncube_loader_lin_5.6.so" > /etc/php5/apache2/conf.d/01-ioncube.ini
    ln -s /etc/php5/apache2/conf.d/01-ioncube.ini /etc/php5/cli/conf.d/01-ioncube.ini
    

    Restart Apache web server

    service apache2 restart
    

    You can verify ioncube module installed with

    root@myterrarium-vm:~# php -m | grep ion
    ionCube Loader
    Reflection
    session
    the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured)
    root@myterrarium-vm:~# 
    

    See ioncube | Install ionCube on Debian 9