Created
October 16, 2017 19:03
-
-
Save asabirov/0b6be7e29b48fc4d3ec95a8f430855cb to your computer and use it in GitHub Desktop.
Install ioncube for PHP 7.1 on ISPManager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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