Skip to content

Instantly share code, notes, and snippets.

@mechawrench
Created December 20, 2017 03:18
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mechawrench/af876c97fc5ab4c4e8e1201e6a1a4bf5 to your computer and use it in GitHub Desktop.
Save mechawrench/af876c97fc5ab4c4e8e1201e6a1a4bf5 to your computer and use it in GitHub Desktop.
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
@eugenefvdm
Copy link

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