EasyEngine v4 builds with container minded. So, every site will have separate configuration. It uses docker heavily. If you want to add some modules or extension, you need to know how docker works first.

Lately, i have a project using ionCube PHP Loader. I need to add the extension to my site container. If you have the same situation with me, this guide will help you to enable ionCube PHP Loader in your site container.

Download ionCube PHP Loader library.

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

Extract it.

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

You will see it has many php library version.

ioncube_loader_lin_4.1.so     ioncube_loader_lin_5.2_ts.so  ioncube_loader_lin_7.1.so
ioncube_loader_lin_4.2.so     ioncube_loader_lin_5.3.so     ioncube_loader_lin_7.1_ts.so
ioncube_loader_lin_4.3.so     ioncube_loader_lin_5.3_ts.so  ioncube_loader_lin_7.2.so
ioncube_loader_lin_4.3_ts.so  ioncube_loader_lin_5.4.so     ioncube_loader_lin_7.2_ts.so
ioncube_loader_lin_4.4.so     ioncube_loader_lin_5.4_ts.so  ioncube_loader_lin_7.3.so
ioncube_loader_lin_4.4_ts.so  ioncube_loader_lin_5.5.so     ioncube_loader_lin_7.3_ts.so
ioncube_loader_lin_5.0.so     ioncube_loader_lin_5.5_ts.so  LICENSE.txt
ioncube_loader_lin_5.0_ts.so  ioncube_loader_lin_5.6.so     loader-wizard.php
ioncube_loader_lin_5.1.so     ioncube_loader_lin_5.6_ts.so  README.txt
ioncube_loader_lin_5.1_ts.so  ioncube_loader_lin_7.0.so     USER-GUIDE.pdf
ioncube_loader_lin_5.2.so     ioncube_loader_lin_7.0_ts.so  USER-GUIDE.txt

Login to your site container using root login. [Change yoursite.com with your site name]

ee shell yoursite.com --user=root

Run php -v, this command will show your local php version and no ionCube PHP Loader showed.

PHP 7.2.12 (cli) (built: Nov 16 2018 03:34:25) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.12, Copyright (c) 1999-2018, by Zend Technologies

Now, you now which ionCube PHP Loader version to copy to your site container.

Copy it to your website root directory.

cp ioncube_loader_lin_7.2.so /opt/easyengine/sites/yoursite.com/app/htdocs

Login again to your site container.

ee shell yoursite.com --user=root

Find the extension directory.

php -i | grep enxtension_dir

Mine will show:

extension_dir => /usr/local/lib/php/extensions/no-debug-non-zts-20170718 => /usr/local/lib/php/extensions/no-debug-non-zts-20170718

Copy ionCube Loader extension to extension directory.

cp ioncube_loader_lin_7.2.so /usr/local/lib/php/extensions/no-debug-non-zts-20170718

Add zend_extension to your php configuration. The best way, is to create new .ini file for ionCube PHP Loader inside extension configuration directory.

php -i | grep additional

Mine will show this:

Scan this dir for additional .ini files => /usr/local/etc/php/conf.d

Create a new .ini file in this directory

echo 'zend_extension=ioncube_loader_lin_7.2.so' > /usr/local/etc/php/conf.d/00-ioncube-loader.ini

Check with php -v command to see if ionCube PHP Loader has been loaded successfully.

PHP with ionCube PHP Loader enabled

And then restart your php service in your site container.

ee site restart yoursite.com --php

Then, access your browser to test your site working with ionCube PHP Loader.