How to install Ioncube loader on Linux
How to install Ioncube loader on Linux
Date Posted: 03-10-2017
Ioncube loader is a php module used to encrypt php code. This post explains on how to install Ioncube loader on linux server. The Linux server can be Ubuntu, centos or other operating system.
Prerequisites:
- Linux Host.
- Apache Webserver. If there is no webserver installed, follow the below articles to install webserver.
- Php.
Implementation:
Identify the architecture of the server.
arch
It will display either x86_64 or i686 or i386. If its x86_64 then architecture of the OS is 64 bit architecture. If its i686 or i386 then OS is 32 bit architecture.
Change the directory.
cd /usr/local/src
Depends on the architecture, download the ioncube.
For 64 bit architecture,
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
For 32 bit architecture,
wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
Extract the file.
tar xvfz ioncube_loaders_lin_x86-64.tar.gz
Create a php info on domain documentroot and identify the extension_dir by accessing the info page on the browser.
In the example, extension_dir is /opt/phpfarm/inst/php-5.3.29/lib/php/extensions/no-debug-non-zts-20090626/ and the PHP version is 5.3
Copy php5.3.so module file to extension_dir location.
cp ioncube_loader_lin_5.3.so /opt/phpfarm/inst/php-5.3.29/lib/php/extensions/no-debug-non-zts-20090626
Identify php.ini configuration file from phpinfo page.
Open the configuration file and append the following line.
vi /opt/phpfarm/inst/php-5.3.29/lib/php.ini
zend_extension=/opt/phpfarm/inst/php-5.3.29/lib/php/extensions/no-debug-non-zts-20090626/ioncube_loader_lin_5.3.so
Restart the apache2 service.
service apache2 restart
Check the phpinfo page and we can see the ioncube loader.