Skip to content

Instantly share code, notes, and snippets.

@vhr
Forked from victorvassilev/install ioncube
Created October 1, 2018 14:01
Show Gist options
  • Save vhr/6b552062ac2f7ef401d29d7d4e27269b to your computer and use it in GitHub Desktop.
Save vhr/6b552062ac2f7ef401d29d7d4e27269b to your computer and use it in GitHub Desktop.
#!/bin/bash
cd /tmp && wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
cd /tmp && tar -xzf ioncube_loaders_lin_x86-64.tar.gz
phpver=`php -v | awk '{print $2}' | grep 7 | cut -c1-3`
extdir=`php -i | grep extension_dir | awk '{print $3}' | grep php`
mv /tmp/ioncube/ioncube_loader_lin_$phpver.so $extdir/
echo zend_extension = $extdir/ioncube_loader_lin_$phpver.so >> `php -i | grep ini | awk '{print $5}' | grep php.ini`
systemctl restart php72-php-fpm
systemctl restart httpd
php -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment