Skip to content

Instantly share code, notes, and snippets.

@kandy
Forked from asabirov/install-ioncube.sh
Last active April 2, 2018 07:33
Show Gist options
  • Save kandy/988ee97c9a18df6d26b3390ce11731a3 to your computer and use it in GitHub Desktop.
Save kandy/988ee97c9a18df6d26b3390ce11731a3 to your computer and use it in GitHub Desktop.
Easy way to install ioncube on Debian/Ubuntu
cd /tmp
curl -O http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar zxvf ioncube_loaders_lin_x86-64.tar.gz
PHP_CONFD=$(php-config --configure-options|sed 's/.*\with-config-file-scan-dir\=\(\S*\).*/\1/g')
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment