Trouble to install ionCube

  • Hello


    I'm running Ubuntu Ubuntu 14.04.2 LTS
    I'm using I-MSCP 1.2.2 with the following choices :

    Code
    1. FRONTEND_SERVER = nginxSQL_SERVER = mysql_5.5PO_SERVER = dovecotNAMED_SERVER = bindHTTPD_SERVER = apache_itkFTPD_SERVER = proftpdMTA_SERVER = postfix└─> php -vPHP 5.5.9-1ubuntu4.7 (cli) (built: Mar 16 2015 20:47:39) Copyright (c) 1997-2014 The PHP GroupZend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies


    I'm trying to install ionCube.
    I've downloaded http://downloads2.ioncube.com/…loaders_lin_x86-64.tar.gz
    I've uncompress it to

    Code
    1. └─> ls /usr/local/ioncube/ioncube_loader_lin_5.5.so/usr/local/ioncube/ioncube_loader_lin_5.5.so


    I've created the ioncube.ini

    Code
    1. └─> cat /etc/php5/mods-available/ioncube.ini [ionCube]zend_extension ="/usr/local/ioncube/ioncube_loader_lin_5.5.so"


    If I enable it, and restart Apache, After 20 seconds Apache stops to try restarting.

    Code
    1. └─> service apache2 start* Starting web server apache2 * * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems


    in the /var/log/apache2/error.log I have


    Code
    1. PHP Fatal error: [ionCube Loader] The Loader must appear as the first entry in the php.ini file in Unknown on line 0




    It I type php -v at this time I have also this error


    Code
    1. └─> php -v
    2. PHP Fatal error: [ionCube Loader] The Loader must appear as the first entry in the php.ini file in Unknown on line 0
  • Hello ;


    The last error says you what you must do... You must load ioncube with higher priority.


    Try this:

    Shell-Script
    1. # php5dismod ioncube
    2. # mv /etc/php5/mods-available/ioncube.ini /etc/php5/mods-available/10_ioncube.ini
    3. # php5enmod ioncube
    4. # apache2 restart

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Damned ! It was so obvious !


    Just followed your advice and made a


    Code
    1. php5enmod ioncubemv ./cli/conf.d/20-ioncube.ini ./cli/conf.d/02-ioncube.inimv ./apache2/conf.d/20-ioncube.ini ./apache2/conf.d/02-ioncube.inimv ./cgi/conf.d/20-ioncube.ini ./cgi/conf.d/02-ioncube.iniservice apache2 restart


    and... tada !


    Code
    1. └─> php -v
    2. PHP 5.5.9-1ubuntu4.7 (cli) (built: Mar 16 2015 20:47:39)
    3. Copyright (c) 1997-2014 The PHP Group
    4. Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    5. with the ionCube PHP Loader v4.7.5, Copyright (c) 2002-2014, by ionCube Ltd., and
    6. with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
  • @gOOvER


    The priority field was not implemented in some php5dismod/php5enmod commands. I do not remember when it was added.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206


  • Hi,


    Sorry for posting this on someone else thread but I am having this same problem.


    I followed up what you said but its still giving me


    Code
    1. root@cpanel:~# php -v
    2. PHP Fatal error: [ionCube Loader] The Loader must appear as the first entry in the php.ini file in Unknown on line 0


    I also followed what @Nuxwin said about changing file priority name by renaming file but having same problem.


    Mods that I have installed only are apcu, zend guard and ioncube.


    Please help.


    Update: I see that after changing file priority to higher. my files name gets overwrites with lower priority.


    So, if I type 02-ioncube.ini
    and do php5enmod
    after that all ioncube becomes 20-02-ioncube.ini


    Why is that happening?.


    Please help.

  • I had the same problem.
    After testing houndreds of not working things i realized, that there is an issue between ioncube and xcache.


    My workaround was to disable xcache create an ini-file in /etc/php5/mods-available for ioncube and enable the ioncube.ini.
    It is very important to set the priority in the ini-file as g00vER mentioned.


    My ioncube.ini file in /etc/php5/mods-available:


    Code
    1. ; priority=01
    2. [ionCube]
    3. zend_extension=/usr/local/ioncube/ioncube_loader_lin_5.5.so

    I don't really know if it is important to other distributions but i had to add a whitespace between the semicolon and the priority=01 variable. I'm working on Ubuntu 14.04.


    I tested this with ionCube Loader 5.0.6 and 5.0.7.
    Seems the guys at ionCube are working on it.

    Edited once, last by m.mirzayev ().