Skip to content

Instantly share code, notes, and snippets.

@asabirov
Created October 16, 2017 19:03
Show Gist options
  • Save asabirov/0b6be7e29b48fc4d3ec95a8f430855cb to your computer and use it in GitHub Desktop.
Save asabirov/0b6be7e29b48fc4d3ec95a8f430855cb to your computer and use it in GitHub Desktop.
Install ioncube for PHP 7.1 on ISPManager
cd /tmp
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar zxvf ioncube_loaders_lin_x86-64.tar.gz
PHP_CONFD=$(/opt/php71/bin/php --ini | grep "Scan for" | grep -oE "(\/.*)")
PHP_VERSION=$(/opt/php71/bin/php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;")
PHP_EXT_DIR=$(/opt/php71/bin/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"
echo "zend_extension = ${PHP_EXT_DIR}/ioncube_loader_lin_${PHP_VERSION}.so" > "${PHP_CONFD}/../../fpm/conf.d/00-ioncube.ini" 2> /dev/null
echo "zend_extension = ${PHP_EXT_DIR}/ioncube_loader_lin_${PHP_VERSION}.so" > "${PHP_CONFD}/../../cgi/conf.d/00-ioncube.ini"
echo "zend_extension = ${PHP_EXT_DIR}/ioncube_loader_lin_${PHP_VERSION}.so" > "${PHP_CONFD}/../../apache2/conf.d/00-ioncube.ini"
echo "zend_extension = ${PHP_EXT_DIR}/ioncube_loader_lin_${PHP_VERSION}.so" > "${PHP_CONFD}/../../cli/conf.d/00-ioncube.ini"
rm -rf ./ioncube
rm ioncube_loaders_lin_x86-64.tar.gz
service php-fpm71 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment