Install ioncube and zend optimizer on linux and plesk

To install Zend Optimizer and Ioncube Loader, you will need to download the packages according to your version of PHP on Linux. In this case, the PHP version is 5.2.

Download these packages and extract them to a place of your choice on your Linux server. I chose to save them to /usr/local/lib/zend/ and /usr/local/lib/ioncube/ respectively.

To install the optimizer and loader, a couple of small lines will need to be added to your php.ini or another ini file if your PHP allows you to include additional files. In this case, the configuration lines were added to php.ini.

[Zend]
Zend_extension=/usr/local/lib/ioncube/ioncube_loader_lin_5.2.so
Zend_extension=/usr/local/lib/zend/ZendOptimizer.so
zend_optimizer.optimization_level=15

Notice the version number of the Ioncube loader. The package that you download from Ioncube’s website will contain a few different files. One for each main version of PHP for both thread safety and non-thread safety versions. In most cases, you will not need the TS version. In the php.ini file, edit the path to the Ioncube loader according to the path and version on your local system.

The same applies for Zend optimizer. You will have a few files in the archive that you download. I renamed the correct file to ZendOptimizer.so for my sake.  You do not have to rename it unless you wish to.

Once you have the configuration updated in your file, it is time to restart Apache. You should be able to write a new php file containing <?php phpinfo(); ?> and load it in your browser. You should then see the following in the output of that page.

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
with the ionCube PHP Loader v3.3.20, Copyright (c) 2002-2010, by ionCube Ltd., and
with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies