IonCube is a software developed to encode PHP files. There are some PHP developers who don’t want their visitors to view the coding. So they would like to keep the coding in some type of encrypted format. They use the IonCube to encode the PHP files.
Now since these PHP files are encoded, you can’t run them on regular Apache server with PHP. You will need ioncube loader extension installed on your PHP server. Once ioncube loader is installed on the PHP server, the server can read encoded PHP files. Now you can run any ioncube encoded software on your server.
The Easy Way to Install ionCube Loader
I remember, once I purchased a software without reading the requirements for installation. When I try to use that software, I found that it requires ionCube loader to run it. I directly headed to DreamHost Wiki to find out how to install ionCube loader on DreamHost. There were instructions in details but they were very complex. So I tried searching for some easy way. I found readymade ionCube loader installation script at http://sxi.sabrextreme.com/dh-phpion.
Using the script, I was able to install ionCube loader on my server. Many things have been changed at DreamHost and now the installation script is no longer working. DreamHost has moved from debian to Ubuntu. I am not sure when the author of the script will edit the script and make it work on new Ubuntu server. Anyway, here I am offering you another easy solution to install ionCube loader.
Install ionCube Loader using phprc File
You might find it difficult to grasp the instructions because some are very technical in nature. If you have a basic understanding of SSH then you will find it very easy to work with.
There are some requirements to be met before you start installing ionCube loader.
1) Your domain must be hosted with PHP version 5.6 or greater. Also make sure that PHP running as Fast CGI. To check that go to Manage Domains page and see. If your domain is running with lower version then edit the domain setting and select higher PHP mode.
2) The username under which domain is hosted must be SSH enabled. If you don’t know how to enable ssh then read my article on DreamHost SSH. If you are using Windows system then you must have putty downloaded on your system. Putty is used to connect to the server using SSH.
Once above two requirements are met, you can follow these instructions to install ionCube loader on the server.
1) Connect to your server using putty or SSH command.
2) Run these commands on SSH terminal.
cd ~ mkdir ionCube cd ionCube wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.bz2 tar jxf ioncube_loaders_lin_x86-64.tar.bz2 -C $HOME rm ioncube_loaders_lin_x86-64.tar.bz2 mkdir -p ~/.php/5.6 cd ~/.php/5.6 echo "zend_extension = /home/dhruvypatel/ioncube/ioncube_loader_lin_5.6.so" > phprc
In the last command, make sure that you change the user name to your real username. Since I have used my username, I have used dhruvypatel. You will have to replace dhruvypatel with your username.
Now ionCube loader is installed for your uername. Let’s check it.
Check the Installation
If you want to check whether ioncube loader is properly installed or not then you will have check it using phpinfo file. Create a simple text file with following content, upload it to the domain where you want ionCube loader.
<?php phpinfo(); ?>
Now visit the page in browser. Under Additional Modules, you should be able to see ionCube Loader line as shown in this image.
If you can’t find ioncube loader on the phpinfo page then it is not properly installed. Please follow the instructions once again and make sure everything is properly set. If you still can’t see the ioncube loader module then you might need to restart the apache server. Just contact DreamHost support via chat and ask them to restart apache server. Just tell them that you want apache to read your phprc file. Now it should work.
I know these instructions are complex but give it a try.