Skip to content

Instantly share code, notes, and snippets.

@gvoze32
Last active January 16, 2023 15:00
Show Gist options
  • Save gvoze32/c3f5eed8c7ab31455b4bdf1e9bb82bdd to your computer and use it in GitHub Desktop.
Save gvoze32/c3f5eed8c7ab31455b4bdf1e9bb82bdd to your computer and use it in GitHub Desktop.
Auto install IonCube PHP Loader/Encoder for Debian x64
#!/bin/bash
curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar -xvzf ioncube_loaders_lin_x86-64.tar.gz
rm ioncube_loaders_lin_x86-64.tar.gz
cd ioncube
php_ext_dir="$(command php -i | grep extension_dir 2>'/dev/null' \
| command head -n 1 \
| command cut --characters=31-38)"
php_version="$(command php --version 2>'/dev/null' \
| command head -n 1 \
| command cut --characters=5-7)"
cp ioncube_loader_lin_${php_version}.so /usr/lib/php/${php_ext_dir}
cd ..
rm -rf ioncube
cat > /etc/php/${php_version}/cli/conf.d/00-ioncube-loader.ini << EOF
zend_extension=ioncube_loader_lin_${php_version}.so
EOF
php -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment