Steps:
- Download the ioncube library and extract it under /home/site directory:
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar xvfz ioncube_loaders_lin_x86-64.tar.gz
- Create a php.ini file under /home/site directory with the following content:
zend_extension=/home/site/ioncube/ioncube_loader_lin_7.2.so
error_log=/dev/stderr
display_errors=Off
log_errors=On
display_startup_errors=Off
date.timezone=UTC
zend_extension=opcache
- Create a startup script to copy this php.ini to /usr/local/etc/php/
Example startup.sh:
cp /home/site/php.ini /usr/local/etc/php/php.ini
rm /usr/local/etc/php/conf.d/php.ini
-
Configure WebApp to use this Startup Script/Command from Configurations blade of the WebApp.
-
Restart the WebApp. Validate if the ionCube loader has been enabled either using phpinfo() method or php -v command:
root@ea5dece91a58:/home# php -v
Cannot load Zend OPcache - it was already loaded
PHP 7.2.24 (cli) (built: Nov 5 2019 13:45:32) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with the ionCube PHP Loader + ionCube24 v10.3.9, Copyright (c) 2002-2019, by ionCube Ltd.
with Zend OPcache v7.2.24, Copyright (c) 1999-2018, by Zend Technologies