Get the most out of your Centmin Mod LEMP stack
Become a Member

ioncube loader Addon [beta]

Discussion in 'Add Ons' started by eva2000, Jul 8, 2014.

  1. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    4:37 AM
    Nginx 1.13.x
    MariaDB 5.5
    @pamamolf asked about ioncube loader for PHP-FPM PHP-FPM - Ioncube on Centminmod ? | Centmin Mod Community and I whipped up a beta addon at Install ioncube loader for Centmin Mod .07+ and higher releases. You'd need to rerun this script after you upgrade major PHP versions too.

    Note:



    Updated ioncube.sh script for PHP 5.6 support and added it officially to addons/ioncube.sh for Centmin Mod .08 beta03. Details on Centmin Mod .08 beta03.

    It's standalone addon for PHP-FPM version 5.3, 5.4, 5.5 and 5.6

    Download & Install

    For 123.08stable only PHP 5.3-5.6 supported and not 7.0
    Code (Text):
    cd /usr/local/src/centminmod/addons
    ./ioncube.sh


    For 123.09beta01 PHP 5.3-5.6 + PHP 7 supported
    Code (Text):
    cd /usr/local/src/centminmod/addons
    ./ioncube.sh


    Add PHPIONCUBE variable



    For Centmin Mod 123.09beta01+ and higher, enabled will automatically install ioncube loader PHP extension via addons/ioncube.sh Beta Branch - add PHPIONCUBE variable for ioncube loader PHP extension | Centmin Mod Community :)
     
    Last edited: Oct 24, 2016
    • Like Like x 4
    • Informative Informative x 1
  2. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    4:37 AM
    Nginx 1.13.x
    MariaDB 5.5
    Code:
    php --ri 'ionCube Loader'
    ionCube Loader
    Code:
    ls -lah ${CONFIGSCANDIR}
    total 32K
    drwxr-xr-x 2 root root 4.0K Jul  6 17:21 .
    drwxr-xr-x 3 root root 4.0K Jun 21 13:01 ..
    -rw-r--r-- 1 root root  252 Jul  6 17:21 igbinary.ini
    -rw-r--r-- 1 root root   21 Jul  6 17:21 imagick.ini
    -rw-r--r-- 1 root root   26 Jul  6 17:21 ioncube.ini
    -rw-r--r-- 1 root root   78 Jul  6 17:21 memcache.ini
    -rw-r--r-- 1 root root  115 Jul  6 17:21 memcached.ini
    -rw-r--r-- 1 root root  381 Jul  6 17:21 zendopcache.ini
    Code:
    ls -lah ${PHPEXTDIRD}
    total 4.7M
    drwxr-xr-x 2 root root 4.0K Jul  6 17:37 .
    drwxr-xr-x 5 root root 4.0K Jul  6 17:20 ..
    -rwxr-xr-x 1 root root 178K Jul  6 17:20 igbinary.so
    -rwxr-xr-x 1 root root 1.1M Jul  6 17:21 imagick.so
    -rwxr-xr-x 1 root root 1.2M Jul  6 17:37 ioncube.so
    -rwxr-xr-x 1 root root 455K Jul  6 17:21 memcache.so
    -rwxr-xr-x 1 root root 329K Jul  6 17:21 memcached.so
    -rwxr-xr-x 1 root root 999K Jul  6 17:20 opcache.a
    -rwxr-xr-x 1 root root 526K Jul  6 17:20 opcache.so
    ioncube_loader_centminmod_00.png
     
  3. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    4:37 AM
    Nginx 1.13.x
    MariaDB 5.5
  4. pamamolf

    pamamolf Well-Known Member

    2,721
    242
    63
    May 31, 2014
    Ratings:
    +433
    Local Time:
    9:37 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Is there anyway to not have to reinstall it on every php upgrade?
     
  5. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    4:37 AM
    Nginx 1.13.x
    MariaDB 5.5
    not right now

    might add to 123.09beta01 beta an option to use addons/ioncube.sh addon to do that
     
  6. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    4:37 AM
    Nginx 1.13.x
    MariaDB 5.5
    • Like Like x 1
  7. pamamolf

    pamamolf Well-Known Member

    2,721
    242
    63
    May 31, 2014
    Ratings:
    +433
    Local Time:
    9:37 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Is there any fix for Install/Reinstall ImagicK PHP Extension to auto detect Ioncube and reinstall it?

    As when i run this menu then i got a related error to Ioncube and i had to reinstall it manual :

    Code:
    /home/nginx/domains/domain.com/public/admin/applications_addon/ips/nexus/sources/hooks.php requires the ionCube PHP Loader ioncube_loader_lin_5.6.so to be installed by the website operator. If you are the website operator please use the ionCube Loader Wizard to assist with installation.
    Maybe i got this from the php upgrade and not from the Install/Reinstall ImagicK PHP Extension?
     
    Last edited: May 4, 2016
  8. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    4:37 AM
    Nginx 1.13.x
    MariaDB 5.5
    re-run addons/ioncube.sh
     
  9. pamamolf

    pamamolf Well-Known Member

    2,721
    242
    63
    May 31, 2014
    Ratings:
    +433
    Local Time:
    9:37 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    What about Ioncube latest beta that supports php 7?

    Can we have it as many want to test php 7 and can't because of Ioncube :(
     
  10. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    4:37 AM
    Nginx 1.13.x
    MariaDB 5.5
    where's the beta ? if it's same download tar.gz then addons/ioncube.sh should work as it just takes latest

    i.e. 64bit
    http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
     
  11. pamamolf

    pamamolf Well-Known Member

    2,721
    242
    63
    May 31, 2014
    Ratings:
    +433
    Local Time:
    9:37 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Last edited: Aug 26, 2016
  12. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    4:37 AM
    Nginx 1.13.x
    MariaDB 5.5
    Looks like separate download for php 7 only for ioncube though seems to work if you manually install it
    Code (Text):
     php -v
    PHP 7.0.10 (cli) (built: Aug 18 2016 23:57:11) ( NTS )
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
        with the ionCube PHP Loader v6.0.0, Copyright (c) 2002-2016, by ionCube Ltd.
        with Zend OPcache v7.0.10, Copyright (c) 1999-2016, by Zend Technologies
     
  13. pamamolf

    pamamolf Well-Known Member

    2,721
    242
    63
    May 31, 2014
    Ratings:
    +433
    Local Time:
    9:37 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Can you add please on the addon a php detection routine so it will download and install the correct one for 5.x and correct one for 7.x ? :)

    Thanks
     
  14. pamamolf

    pamamolf Well-Known Member

    2,721
    242
    63
    May 31, 2014
    Ratings:
    +433
    Local Time:
    9:37 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Hi :)

    Does the script gets now the latest version of loader 6.0.4 for php7 and 5.1.2 for php 5.x ?

    Or it uses the 6.0.4 for all versions?

    Code:
    http://www.ioncube.com/loaders.php
    Thank you !
     
    Last edited: Sep 30, 2016
    • Informative Informative x 1
  15. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    4:37 AM
    Nginx 1.13.x
    MariaDB 5.5
  16. pamamolf

    pamamolf Well-Known Member

    2,721
    242
    63
    May 31, 2014
    Ratings:
    +433
    Local Time:
    9:37 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    Is there a reason for using if and else with same actions?

    I mean:

    Code:
    if [[ "$(uname -m)" = 'x86_64' ]]; then
      if [[ "$(php -v | awk -F " " '{print $2}' | head -n1 | cut -d . -f1)" != '7' ]]; then
        wget -cnv http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
        tar xvzf ioncube_loaders_lin_x86-64.tar.gz
      else
        wget -cnv http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
        tar xvzf ioncube_loaders_lin_x86-64.tar.gz
      fi
    
    as both download the same thing?

    Sorry for asking and maybe sounds stupid as i don't know about programming :)

    Also we can note php 7 on last line?

    Code:
    echo "PHP 5.3 to 5.4 or PHP 5.4 to PHP 5.5 to PHP 5.6"
     
  17. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    4:37 AM
    Nginx 1.13.x
    MariaDB 5.5
    just in case 7.1 comes around :)
     
    • Like Like x 1
  18. pamamolf

    pamamolf Well-Known Member

    2,721
    242
    63
    May 31, 2014
    Ratings:
    +433
    Local Time:
    9:37 PM
    Nginx-1.13.x
    MariaDB 10.1.x
    OK as i can see from code it uses only the latest version for all php versions :)
     
    • Like Like x 1
  19. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    4:37 AM
    Nginx 1.13.x
    MariaDB 5.5
    yup :)

    Code (Text):
    php -v
    PHP 5.6.26 (cli) (built: Sep 19 2016 22:49:41)
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
        with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v6.0.4, Copyright (c) 2002-2016, by ionCube Ltd.
        with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
     
  20. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    4:37 AM
    Nginx 1.13.x
    MariaDB 5.5
    see download tarball's USER-GUIDE.txt too
     
    • Informative Informative x 1