Install IonCube on Debian VPS


/ Published in: Bash
Save to your folder(s)

Install IonCube Loaders in less than 2 minutes.


Copy this code and paste it in your HTML
  1. #!/usr/bin/env bash
  2. # RoseHosting.com
  3.  
  4. # Check if PHP CLI is installed
  5. hash php 2>/dev/null || { echo >&2 "The script requires php5-cli but it's not installed. Aborting."; exit 1; }
  6.  
  7. # Find the system architecture
  8. DPKG_ARCH=$(dpkg --print-architecture)
  9. if [[ "$DPKG_ARCH" = "i386" ]]; then
  10. ARCH="x86"
  11. elif [[ "$DPKG_ARCH" = "amd64" ]]; then
  12. ARCH="x86-64"
  13. fi
  14.  
  15. # Download and extract
  16. wget -q -O - "http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_${ARCH}.tar.gz" | tar -xzf - -C /usr/local
  17.  
  18. # Find PHP version
  19. PHP_V=$(php -v)
  20. PHP_VERSION=${PHP_V:4:3}
  21.  
  22. # Add the IonCube loader to the PHP configuration
  23. echo "zend_extension=/usr/local/ioncube/ioncube_loader_lin_${PHP_VERSION}.so" \
  24. > '/etc/php5/conf.d/00-ioncube_loader.ini'
  25.  
  26. # Restart services
  27. for i in php5-fpm nginx apache2;do
  28. test -x /etc/init.d/$i && /etc/init.d/$i restart
  29. done

URL: https://www.rosehosting.com/blog/script-install-ioncube-on-debian-vps/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.