IonCube loader is not available in PHP 7.1

Created:

2016-12-12 03:42:32 UTC

Modified:

2017-08-18 22:52:01 UTC

9

Was this article helpful?


Have more questions?

Submit a request

IonCube loader is not available in PHP 7.1

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk Onyx for Linux

Symptoms

IonCube loader is not available in PHP 7.0 in Tools and Settings > PHP Settings > PHP 7.1

It is not loaded on a server for PHP 7.1:

# /opt/plesk/php/7.1/bin/php -v
PHP 7.1 (cli) (built: Oct 14 2016 11:06:39) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.12, Copyright (c) 1999-2016, by Zend Technologies

One of the following errors may appear when trying to open a website on PHP 7.1 FPM:

PLESK_INFO: Site error: the file /var/www/vhosts/example.com/httpdocs/engine/Shopware/Plugins/Community/Core/SwagLicense/Bootstrap.php requires the ionCube PHP Loader ioncube_loader_lin_7.0.so to be installed by the website operator. If you are the website operator please use the ionCube Loader Wizard to assist with installation.

PLESK_INFO: Warning : realpath(): open_basedir restriction in effect. File(/opt/plesk/php/7.1/lib/php/modules) is not within the allowed path(s): (/var/www/vhosts/example.com/:/tmp/) in /var/www/vhosts/example.com/httpdocs/Tradesman/includes/class_factory.php on line 2

PLESK_INFO: Site error: the ionCube PHP Loader needs to be installed. This is a widely used PHP extension for running ionCube protected PHP code, website security and malware blocking. Please visit get-loader.ioncube.com for install assistance.

Cause

Outdated Plesk packages.

Resolution

Run Plesk installer and install all the updates in Tools & Settings > Updates & Upgrades or

# plesk installer

Please note, ioncube loader is still not available for PHP 7.1

If the issue persists, do the following:

  1. Connect to the server using SSH.
  2. Download it from http://www.ioncube.com/loaders.php

  3. Unzip it:

    # unzip ioncube_loaders_lin_x86-64.zip

  4. For Debian/Ubuntu
    Copy it to /opt/plesk/php/7.1/lib/php/modules/ :

    # cp ioncube_loader_lin_7.1.so /opt/plesk/php/7.1/lib/php/modules/

    For CentOS/CloudLinux/RHEL
    Copy it to /opt/plesk/php/7.1/lib64/php/modules/ :

    # cp ioncube_loader_lin_7.1.so /opt/plesk/php/7.0/lib64/php/modules/

  5. Add the following line at the end of /opt/plesk/php/7.1/etc/php.ini file:

    CONFIG_TEXT: zend_extension=ioncube_loader_lin_7.1.so

  6. Re-read php handlers:

    # plesk bin php_handler --reread

  7. Make sure it got loaded:

    # /opt/plesk/php/7.1/bin/php -v
    PHP 7.1 (cli) (built: Oct 14 2016 11:06:39) ( NTS )
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v6.0.6, Copyright (c) 2002-2016, by ionCube Ltd.
    with Zend OPcache v7.0.12, Copyright (c) 1999-2016, by Zend Technologies

Have more questions? Submit a request

3 Comments

  • 0
    Avatar
    Plesk VPS- V4M

    This worked but the files needed to be downloaded were the ZIP that contained *.so extension. It seems as if it will only work for PHP 7.0 and not 7.1 at this time (04/26/2017)

  • 0
    Avatar
    N8Solutions

    It's possible the "lib" or "lib64" directory is based on the Operating System being used. I am using Cloud Linux 7 and I have lib64. This should be mentioned so that others do not have a hard time finding the proper directory.

    # plesk version
    Product version: Plesk Onyx 17.5.3 Update #6
    Update date: 2017/05/23 16:01
    Build date: 2017/03/17 16:00
    OS version: CloudLinux 7.3
    Revision: 55d1b49a272f44666e1920eca8b6e4da449a38cd
    Architecture: 64-bit
    Wrapper version: 1.2

    # ls -ld /opt/plesk/php/7.0/lib64/php/modules/
    drwxr-xr-x 2 root root 4096 May 17 06:43 /opt/plesk/php/7.0/lib64/php/modules/

    # ls -ld /opt/plesk/php/7.0/lib/php/modules/
    ls: cannot access /opt/plesk/php/7.0/lib/php/modules/: No such file or directory

    Edited by N8Solutions
  • 0
    Avatar
    Alexandr Tumanov

    @N8Solutions thanks for the feedback. Yes, it depends on OS. However, ioncube is included in Plesk PHP 7.0

Please sign in to leave a comment.