Need help installing ioncube loader on EE4


#1

Hey Guys,
I’ve been trying to install ioncube on EE4 and used the following docker file.

FROM php:7.2-fpm
RUN set -ex; \
    \
    curl --connect-timeout 10 -o ioncube.tar.gz -fkSL "https://www.ioncube.com/php-7.2.0-beta-loaders/ioncube_loaders_lin_x86-64_BETA.tar.gz"; \
    tar -zxvf ioncube.tar.gz; \
    cp ioncube_loader_lin_7.2_10.1.0_beta.so /usr/local/lib/php/extensions/no-debug-non-zts-20170718/ioncube.so; \
    rm -Rf ioncube*; \
    echo "zend_extension=ioncube.so" > /usr/local/etc/php/conf.d/01-ioncube.ini;

docker build .

The script succeeds and I restart my site with following command:

ee site restart site.com

But on my phpinfo.php page I don’t see ioncube being enabled and no mention of the 01-ioncube.ini file.
I am new to docker and easyengine and I am pretty sure I am missing something right now.
Any help is greatly appreciated.
Shahriar


#2

I tried the following dockerfile without any luck

FROM easyengine/php:v4.0.0
RUN set -ex; \
    \
    curl --connect-timeout 10 -o ioncube.tar.gz -fkSL "[url removed because of new user restriction] 
    tar -zxvf ioncube.tar.gz; \
    cp ioncube/ioncube_loader_lin_7.2.so /usr/local/lib/php/extensions/no-debug$
    rm -Rf ioncube*; \
    echo "zend_extension=ioncube.so" > /usr/local/etc/php/conf.d/01-ioncube.ini;

Sending build context to Docker daemon 13.82kB
Step 1/2 : FROM easyengine/php:v4.0.0
—> 22633c03b925
Step 2/2 : RUN set -ex; curl --connect-timeout 10 -o ioncube.tar.gz -fkSL "[url removed because of new user restriction] "; tar -zxvf ioncube.tar.gz; cp ioncube/ioncube_loader_lin_7.2.so /usr/local/lib/php/extensions/no-debug-non-zts->20170718/ioncube.so; rm -Rf ioncube*; echo “zend_extension=ioncube.so” > >/usr/local/etc/php/conf.d/01-ioncube.ini;
—> Running in 5e43c5b8102d

  • curl --connect-timeout 10 -o ioncube.tar.gz -fkSL >https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0Warning: Failed to create the file ioncube.tar.gz: >Permission denied
    0 10.6M 0 16384 0 0 27526 0 0:06:46 --:–:-- 0:06:46 27489
    curl: (23) Failed writing body (0 != 16384)
    The command ‘/bin/sh -c set -ex; curl --connect-timeout 10 -o ioncube.tar.gz -fkSL “https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz”; tar -zxvf ioncube.tar.gz; cp ioncube/ioncube_loader_lin_7.2.so /usr/local/lib/php/extensions/no-debug-non-zts-20170718/ioncube.so; rm -Rf ioncube*; echo “zend_extension=ioncube.so” > /usr/local/etc/php/conf.d/01-ioncube.ini;’ returned a non-zero code: 23

#3

I found a fix myself.
This is just a workaround until there is an official way to do it:
I created ioncube.ini file in

/opt/easyengine/sites/“site name”/config/php/php/conf.d/

With following contents:

zend_extension =  /usr/local/etc/php/conf.d/ioncube_loader_lin_7.2.so

And placed the same file on same folder and restarted the site using ee site restart "sitename"

Bonus

To install enable php extensions that are not enabled by default run a shell using following command:

ee shell “sitename” --user=root

And run following command to install and enable pdo_mysql

docker-php-ext-install pdo pdo_mysql && docker-php-ext-enable pdo pdo_mysql


#4

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.