How to install ioncube for WHMCS

$ cd
$ mkdir audit
$ cd audit

Download the latest ioncube loader from Here

$ sudo wget

Extract it

$ tar -xzvf ioncube_loaders_lin_x86-64.tar.gz

Copy the loader-wizard.php to /var/www/html

$ sudo cp ioncube/loader-wizard.php /var/www/html/

Copy ioncube module according to your php version$ to /usr/lib64/php/modules

$ sudo cp /usr/lib64/php/modules

Make a file inside /etc/php.d/ioncube.ini and paste below :

zend_extension = /usr/lib64/php/modules/

Now restart the httpd

$ sudo service httpd restart

Then, remove these files

$ sudo rm /var/www/html/loader-wizard.php
$ sudo rm -rf audit/ioncube*


Error 1


Site error: the file /var/www/html/whmcs/install/install.php requires the ionCube PHP Loader to be installed by the site administrator.

If you get errors like above, look at error_log, for me above error tells me the error wwas related to permission denied. If you have same error in err-r_log then give the proper permission to module or easy way out is move .so file elsewhere like below:

$ cd /usr/share
$ mkdir ioncube
$ mv /usr/lib64/php/modules/ /usr/share/ioncube

Also make changes in /etc/php.ini file

zend_extension = /usr/share/ioncube/

restart the apache

$ sudo /etc/init.d/httpd restart

Error 2


# php -v PHP Fatal error: [ionCube Loader] The Loader must appear as the first entry in the php.ini file in Unknown on line 0

then it may be because there are two two defination for same module. Try to find the .ini file and inside it search for zend_extension

If you find two entries, then remove one and restart apache