ionCube php loader is the PHP extension that decodes encrypted PHP files on runtime, usually this is already installed on any web server whether it be used for shared hosting, reseller hosting or on your dedicated web servers.
If for some reason you don’t have it installed on your linux server, you can use the below shell script created by one of our system administrator.
Create a file named ioncubeinstaller.sh and paste the below code in the file:
#!/bin/bash
# Supportfacility.com
WHO=$(whoami)
if [ ${WHO} == "root" ]
then
echo “Script Initialized …”
else
echo “You must be logged in as root to install ionCube Loader.”
echo “Terminating …”
exit 0
fi
echo “Changing directory”
cd /usr/local/
echo “Done.”
if [ -e ioncube_loaders_lin_x86.tar.gz ]
then
rm -f ioncube_loaders_lin_x86.tar.gz
fi
echo “Downloading files”
wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
echo “Done.”
echo “Installing files”
tar -zxvf ioncube_loaders_lin_x86.tar.gz
echo “Done.”
echo “Changing ownership”
chown -R root.root ioncube
echo “Done.”
phpline=`php -v | grep ^PHP | cut -f2 -d ” “| awk -F “.” ‘{print “zend_extension=”/usr/local/ioncube/ioncube_loader_lin_”$1?.”$2?.so”"}’`
phpinifile=`php -i | grep php.ini | grep ^Configuration | cut -f6 -d” “`
echo “Adding line $phpline to file $phpinifile”
echo “$phpline” >> $phpinifile
rm -f ioncube_loaders_lin_x86.tar.gz
echo “Ioncube installed sucessfully”
Then, change the permissions of the file to 755
root# chmod 755 ioncubeinstaller.sh
And execute it with
root# ./ioncubeinstaller.sh
This has been tested on cPanel, Plesk, DirectAdmin dedicated servers and will work on any linux server
Let us know if this script was helpful for you.
No comments:
Post a Comment