Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Laravel Forge IonCube 7.1 Installation Recipe
wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar zxvf ioncube_loaders_lin_x86-64.tar.gz
PHP_CONFD="/etc/php/7.1/fpm/conf.d"
PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;")
PHP_EXT_DIR=$(php-config --extension-dir)
cp "ioncube/ioncube_loader_lin_${PHP_VERSION}.so" $PHP_EXT_DIR
echo "zend_extension = ${PHP_EXT_DIR}/ioncube_loader_lin_${PHP_VERSION}.so" > "${PHP_CONFD}/00-ioncube.ini"
PHP_CONFD="/etc/php/7.1/cli/conf.d"
PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;")
PHP_EXT_DIR=$(php-config --extension-dir)
cp "ioncube/ioncube_loader_lin_${PHP_VERSION}.so" $PHP_EXT_DIR
echo "zend_extension = ${PHP_EXT_DIR}/ioncube_loader_lin_${PHP_VERSION}.so" > "${PHP_CONFD}/00-ioncube.ini"
rm -rf ./ioncube
rm ioncube_loaders_lin_x86-64.tar.gz
service php7.1-fpm restart
service nginx restart
@eugenevdm
Copy link

eugenevdm commented Sep 18, 2021

I was dreading another boring and cumbersome Ioncube installation and then I stumbled upon this beautiful Gist! THANK YOU!

Changing all references of 7.1 to 7.4 seemed to work, but I also had to temporary change the command line version for Forge's PHP from 8.0 to 7.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment