Client Area

 Client Area

Install ionCube Loader for php7.2 on Ubuntu 18.04 LTS

ionCube Loader php72

Sections

    Some paid applications use ionCube to protect their code against copy or to make sure nobody will be able to crack them. But to run those applications on your server, you will have to install the ionCube Loader php extension. if you have multiple php versions running on your server, you will have to perform this installation for each php version where ionCube Loader is required.

    Warning :
    On debian/ubuntu servers, when you use directly the command php, it will automatically use the newest php release installed on your server.
    For example, if you have php7.1 & php7.2 installed on your server, the output of the command php -v will be :

    PHP 7.2.5-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: May  5 2018 05:00:15) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
        with Zend OPcache v7.2.5-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
    

    In this tutorial, we will use the command php to install ioncube loader on a server with php7.2. If you have installed newer php versions, do not use the command php but use the full php binary name with the version like php5.6, php7.1 or php7.2.

    Download ionCube Loader

    Download the latest release of ionCube Loader :

    wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
    

    Extract the archive and go inside the ionCube folder :

    tar -xvzf ioncube_loaders_lin_x86-64.tar.gz
    cd ioncube
    

    Add Ioncube Loader extension

    Then to find the folder where you have to copy the ioncube loader extension, use the command :

    php -i | grep extension_dir
    

    And copy the ioncube .so extension inside the folder displayed by the previous command, with php7.2 it should look like :

    cp ioncube_loader_lin_7.2.so /usr/lib/php/20170718
    

    Before restarting the php-fpm process, you have to declare the zend_extension in the php configuration. For that, the best way to proceed is to create a new .ini file inside the php extension configuration directory. You can find the conf.d path with the command :

    php -i | grep additional
    

    It will give you the path of the directory for additional .ini file of the php cli. The php-fpm directory will be the same but instead of /etc/php/7.2/cli/, it will begin with /etc/php/7.2/fpm/

    ###Load ionCube Loader extension
    To add the zend_extension, you can use the following command :

     # for php-fpm
    echo 'zend_extension=ioncube_loader_lin_7.2.so' > /etc/php/7.2/fpm/conf.d/00-ioncube-loader.ini
    
    # for php-cli to avoid errors with cronjob
    echo 'zend_extension=ioncube_loader_lin_7.2.so' > /etc/php/7.2/cli/conf.d/00-ioncube-loader.ini
    

    The last step is to restart php-fpm process to apply the new configuration :

    service php7.2-fpm restart
    

    You can check if the install was successful with the command php -v, it should output something like :

    PHP 7.2.5-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: May  5 2018 05:00:15) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
        with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.2.1, Copyright (c) 2002-2018, by ionCube Ltd.
        with Zend OPcache v7.2.5-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
    

    in EasyEngineLinux

    Feedback