Last active
July 7, 2017 11:38
-
-
Save asabirov/e97f865578497ddc8fa350c166be071e to your computer and use it in GitHub Desktop.
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/php70/bin/php --ini | grep "Scan for" | grep -oE "(\/.*)") | |
PHP_VERSION=$(/opt/php70/bin/php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;") | |
PHP_EXT_DIR=$(/opt/php70/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-fpm70 restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment