There is a new version of this tutorial available for Debian 9 (Stretch).
Install Ioncube Loader For All PHP Modes (CLI, CGI, FCGI And FPM) On Debian Wheezy
In this tutorial, I will explain the installation of Ioncube Loader on Debian Wheezy so that it can be used in all PHP Modes. If one of the php.ini files does not exist on your server, then this php mode is not installed and you can skip that php.ini file.
Download the latest ioncube loaders with wget and unpack the archive:
tar xfz ioncube_loaders_lin_x86-64.tar.gz
Move the loaders to /usr/local/ and clean up the /tmp directory
mv ioncube /usr/local/
Now edit the php.ini files with an editor like vi or nano:
For CGI and FCGI PHP:
For PHP commandline scripts:
For scripts running with PHP-FPM
and add the following line right at the beginning of the file(s) (before the [PHP] line):
zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.4.so
so the the resulting file looks like this:
zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.4.so [PHP] ;;;;;;;;;;;;;;;;;;; ; About php.ini ; ;;;;;;;;;;;;;;;;;;; ; PHP's initialization file, generally called php.ini, is responsible for ; configuring many of the aspects of PHP's behavior. [...]
Finally restart apache to apply the changes:
service apache2 restart
When you use PHP-FPM, then restart the PHP-FPM pool daemon as well:
service php5-fpm restart
To test that the ioncube loader has been included in the PHP configuration of your website correctly, create a info.php test file with the following content and place it into the web directory of your site:
With the following content:
And open the URL in a web browser, you should see ioncube loader mentioned there:
Please do not forget to delete the info.php file when you dont need it anymore!