Nowadays encoding application sources is a common practice, when it comes to protecting/licensing source code. Not only for licensing but, it also ensures increased accuracy, minimizing the storage space and much more. Today, Ioncube is one of the most popular and widely used solutions to prevent unauthorised access to your source code.
Ioncube Loader, What is it and how it is useful ?
Ioncube, a PHP extension provides two tools – Encoder to compile PHP files and Loader, which handles the execution of such encrypted files and speeds up the web pages. Ioncube makes it easy to protect your PHP source code from easy observation, theft and unauthorized modifications by compiling to bytecode.
To encode your PHP files, you need to purchase the IonCube Encoder. You can use the online version of the encoder for free to encrypt your PHP code but it’s for testing purposes. And there is no need to pay for IonCube Loader, it’s completely free to download and install on your server.
Encoding your application sources offers many benefits:
Now we get to know about ioncube and it’s benefits, what’s next? Installation, now many questions pops up on our mind, How to go ahead with this? What version should I use? Is the installation that much hard? The list goes on.
But what’s really involved?
Installing an ioncube loader is not like you think as difficult but an easy process to do. We can get it done under two simple steps:
Download IonCube Loader
For Ubuntu, Debian, Windows :
It is important to choose the correct Ioncube version that suits your system settings. To know about your hosting system and environment follow the below steps:
From the above image,
You can get the PHP version and server OS details from the top header. Here in this image PHP version is 5.3.10 and the OS is Ubuntu3
The next highlighted line gives the system processor type, which is useful in deciding the appropriate loader. Here the system has x86_64. We’re running 64-bit PHP, if it ends with i686, then it’s 32-bit. And the next one shows that the threat of safety is disabled.
Using Terminal :
Run the below commands in the terminal,
Download & extract the IonCube Loader
Before downloading the IonCube Loader, check whether your system is running on 32-bit or 64-bit architecture.
For that, run the command: uname -a
Next, we have to download the Ioncube Loader using wget command and unpack it.
For 64-bit system
Use the command:
tar xfz ioncube_loaders_lin_x86-64.tar.gz
For 32-bit system
tar xfz ioncube_loaders_lin_x86.tar.gz
Choosing the right one and install
After downloading and extracting the Loader on your server, Now Install the Ioncube loader that matches your PHP version. If you want to know the version of the installed PHP,
use the command: php -v
Next find where the extension directory of the PHP version is, by running the command php -i | grep extension_dir
Note: The directory name is different for each PHP version and linux distribution
Now copy the ioncube loader for your php version to the PHP extension directory. For an example, sudo cp /ioncube/ioncube/ioncube_loader_lin_7.2.so /usr/lib64/php/modules
Now activate the extension by adding the following line at the top of your php.ini file
Test ioncube loader installation
To check that the ioncube loader has been successfully installed in your server or not. In your terminal use the command: php -v to test the ioncube loader installation. You can also run the URL along with phpinfo.php and verify the ioncube installation.
Installing with the Loader Installer or Loader Wizard
A Loader Wizard PHP script can be helpful with installation, when it is available in a Zip and tgz archive. Download and install the script into your web space, and then launch the script in your browser for guidance on installation and selection of the correct Loader package. The Wizard is also provided within the Loader packages below
For more info you can refer to http://www.ioncube.com/loader_installation.php and to download the package http://www.ioncube.com/loaders.php.
Installing Ioncube in Hosting Providers
Nowadays Ioncube loaders are supported/installed already with all hosting providers. The easy and speedy process is to contact your hosting support to enable ioncube for your account or to yourself consult your hosting support forums and FAQ. In general creating a custom php ini to enable ioncube for your hosting is sufficient. Here you can find steps that are shared by various hosting types to make it easy for our users without search for the supported content.
Shared Hosting Support
You should have appropriate loaders which will be in format of ioncube_loader_os_type_phpversion.ext.
Os_type – (linux or windows) | phpversion – (7.1, 7.2) | .ext – (so – Linux, dll – Windows)
For Server Side Install
In general the Loader can be enabled automatically in web servers without changing the php.ini file or server restart. In some cases, Zend extension line can be added to the php.ini file to enable ioncube. To add the line refer to the above.
Installation with Various Hosting
Add the following line to a custom .htaccess file:
SetEnv IONCUBE 1
SetEnv PHP_VER 5
Or create a file called .htaccess, and using a text editor put the above code lines in it, save changes, and upload it to the root of the store files.
Below listed are some hosting providers along with a link for the installation procedure
|OS/Platform||Tar file||Zip file|
|Windows VC9 (32 bits)||tar.gz||zip|
|Windows VC9 (Non-TS) (32 bits)||tar.gz||zip|
|Windows VC11 (32 bits)||tar.gz||zip|
|Windows VC11 (Non-TS) (32 bits)||tar.gz||zip|
|Windows VC11 (64 bits)||tar.gz||zip|
|Windows VC11 (Non-TS) (64 bits)||tar.gz||zip|
|Windows VC14 (32 bits)||tar.gz||zip|
|Windows VC14 (Non-TS) (32 bits)||tar.gz||zip|
|Windows VC14 (64 bits)||tar.gz||zip|
|Windows VC14 (Non-TS) (64 bits)||tar.gz||zip|
|Windows VC14 (32 bits)||tar.gz||zip|
|Linux (32 bits)||tar.gz||zip|
|Linux (64 bits)||tar.gz||zip|
|FreeBSD 6 (32 bits)||tar.gz||zip|
|FreeBSD 6 (64 bits)||tar.gz||zip|
|FreeBSD 7 (32 bits)||tar.gz||zip|
|FreeBSD 7 (64 bits)||tar.gz||zip|
|FreeBSD 8 (32 bits)||tar.gz||zip|
|FreeBSD 8 (64 bits)||tar.gz||zip|
|FreeBSD 9 (32 bits)||tar.gz||zip|
|FreeBSD 9 (64 bits)||tar.gz||zip|
|FreeBSD 11 (32 bits)||tar.gz||zip|
|FreeBSD 11 (64 bits)||tar.gz||zip|
|OpenBSD 4.5 (32 bits)||tar.gz||zip|
|OpenBSD 4.6 (32 bits)||tar.gz||zip|
|OpenBSD 4.7 (64 bits)||tar.gz||zip|
|OS X (32 bits)||tar.gz||zip|
|OS X (64 bits)||tar.gz||zip|
|Solaris (32 bits)||tar.gz||zip|