How to Install Zend and Ioncube Loader on Vestacp (Ubuntu)
#howto ,#tutorial #VPS – How to Install Zend and Ioncube Loader on Vestacp (Ubuntu) – This tutorial explains step by step guide (with pics) about How to Install Zend and Ioncube Loader on Vestacp (Ubuntu)
Installing Zend Guard Loader and ionCube Loader on latest Ubuntu server can be so tricky but here’s the tutorial you can follow to get it installed correctly on your Ubuntu server with Vestacp software on top of it. Well, I can explain what is Zend Guard Loader and what is ionCube Loader but I’ve done that in my previous article so please take your time to read it if you want.
But as a refresh, you may need to install either Zend or ionCube loader when you want to run an app which is PHP-based and is encrypted using both or one of those technologies.
What you may need:
- A SSH client like Bitvise or Putty and basic knowledge about how to use it.
- Basic knowledge about common Unix command to SSH to your server.
- A server or VPS with at least 512MB of RAM (1GB or more is recommended).
- Make sure your Vestacp server is installed and running on Ubuntu server.
Read: How to install Vestacp
- About 30 minutes of your time
- a cup of coffee or tea.
Confused on choosing which VPS provider to install VestaCP? Read my recommended VPS providers or top low end cloud server providers. Quick recommendation: Digital Ocean, Atlantic.net or Ramnode.
In this guide I’m using a 512MB RAM Cloud VPS from Digital Ocean running Ubuntu 15.10 x64.
Install Zend Guard Loader
Step 0 – Install VestaCP on your server (I show this step in the video).
Step 1 – Login to your server via Putty (or any SSH client) as root or as user with root privilege (sudo).
Step 2 – Check your PHP version. This is necessary and important since Zend has made Guard Loader to every specific PHP version.
Until this article is posted, the last time I checked VestaCP is using PHP 5.6.x on its Ubuntu version while its CentOS version is PHP 5.4.x.
Step 3 – Next, you need to download Zend Guard Loader package appropiate to the version of PHP you have and type of operating system your server is running (it is Linux but whether it is 32-bit or 64-bit). Go ahead grab the package from:
Choose the appropriate package for current PHP version which is 5.6. You may also need to login or register for an account first. It’s free.
Now all you need to do is to grab the download url. You can achieve that by copying the URL once the Download Dialog box appears.
or, you can use these shortcut if you don’t mind using current latest version (do visit Zend website to check newer version – if available):
Zend Guard Loader for PHP 5.4 – 32 bit:
Zend Guard Loader for PHP 5.4 – 64 bit:
Since I’m using VestaCP on Ubuntu 15.10 which is 64-bit, so I picked the last one.
Step 4 – Use wget to download it into your server:
Step 5 – Once the package has been downloaded, extract the package using command below:
tar xzvf name-of-package-file.tar.gz
for example in my case it is:
tar xzvf zend-loader-php5.6-linux-x86_64.tar.gz
Step 6 – Now enter the the new folder extracted and find the ZendGuardLoader.so file. See example below (use cd command):
cd zend-loader-php5.6-linux-x86_64 ls
then copy the ZendGuardLoader.so file to following location :
cp ZendGuardLoader.so /usr/lib/php5
Step 7 – Now create ZendGuard.ini file inside /etc/php5/mods-available directory (use your favorite text editor like nano) :
cd /etc/php5/mods-available ls nano zendguard.ini
Step 8 – Next, copy paste following codes to that file in nano text editor:
; priority=30 ; Enable Zend Guard extension zend_extension=/usr/lib/php5/ZendGuardLoader.so zend_loader.enable=1
see screenshot pic below:
Do not forget to Save and Exit the editor which in Nano it is Control+O then Control+X.
Step 9 – Enable the newly created php5 module and restart Apache with this command:
php5enmod zendguard service apache2 restart
Step 10 – Drink your coffee or tea you’ve prepared then issue command below to verify that Zend Guard Loader module has been enabled on your server:
and you’ll see this:
Alrite! Now let’s move on to the next part, installing ionCube Loader.
Install ionCube Loader
Step 1 – Again, login to your server via Putty.
Step 2 – Go to your site’s public folder (root directory of your site) which in Vestacp it is usually at :
replace username with your vestacp username but it is preferable as admin, then replace domain.tld with your own domain name but it is recommended to use your hostname. Example :
Step 3 – Use wget again to download ionCube Loader package into your server. You can check download links of its latest version at :
use wget to download it,..
For Ubuntu 32-bit use:
For Ubuntu 64-bit use :
Step 4 – Extract the package once it’s downloaded :
Ubuntu 32-bit :
tar xvfz ioncube_loaders_lin_x86.tar.gz
Ubuntu 64-bit :
tar xvfz ioncube_loaders_lin_x86-64.tar.gz
Step 5 – Now go to ioncube folder and copy appropriate version:
cd ioncube ls php -v
Step 6 – Found the correct one? Now copy it to /usr/lib/php5 location
cp ioncube_loader_lin_5.6.so /usr/lib/php5
Step 7 – Then go to /etc/php5/mods-available and create new .ini file for that module:
cd /etc/php5/mods-available nano ioncube.ini
Step 8 – Then put this inside that file (copy-paste it):
; priority=00 zend_extension = /usr/lib/php5/ioncube_loader_lin_5.6.so
do not forget to Save and Exit (Control+O then Control+X):
Step 9 – Now you can safely enable ionCube loader PHP module and restart Apache using this command:
php5enmod ioncube service apache2 restart
Step 10 – Now verify it using php -v command :
Or, you can alsu use php -m command and you’ll see something like this:
or you can also create info.php file as usual then open it in your browser and you’ll see something like this:
That’s it. Now you have fully working Zend and ionCube Loader installed on your VPS with VestaCP control panel. Now all websites / domains hosted in that server will be able to use both feature.
Still got confused about following the steps above? I recorded all those steps above in a video you can watch it. I hope by watching the video you’ll get more detailed information which you can’t get from the steps above.
Download the video and donate $1 for me to buy a JCO donut.
This post How to Install Zend and Ioncube Loader on Vestacp (Ubuntu) is part of ServerMom.