Install Zend Optimizer and ionCube Loader on Linux

By Detector | 25 April 2010



This tutorial is for newer version of apache – Apache 2.x and PHP 5.x (5.2 or 5.3 or 5.4) and it will work on all Linux OS.

Important: The tutorial below is for PHP 5.3 version. If you have PHP 5.2 version, install 5.2 versions of Zend optimizer and ioncube loader.

If you already setup your home Ubuntu server (if not you can read this excellent and easy DetectorPRO tutorial) you can continue with installing Zend optimizer and ionCube for testing your zend or ioncube protected scripts before go to the production servers. The tutorial is divided in 32bit and 64 bit section.

32bit Linux

You need root rights for all process. If you want to operate with nautilus copy or edit files, to get the root permission press Alt+F2 and enter: gksudo nautilus.

IonCube 32 bit. You can download ioncube from here and copy to your /tmp/ folder or you can download it and install directly from terminal line by line:

cd /tmp/
wget http://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
tar xvfz ioncube_loaders_lin_x86.tar.gz
cd ioncube/
mkdir /usr/local/lib/ioncube
mv ioncube_loader_lin_5.3.so /usr/local/lib/ioncube/

Zend optimizer 32 bit. Get the latest version of the Zend Optimizer from here and save it in your /tmp/ directory. At this moment it is version 3.3.9. If you have other version, when you entering tar xvfz Zend press TAB to automatically finish the line.

cd /tmp/
tar xvfz ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz
cd ZendOptimizer-3.3.9-linux-glibc23-i386/data/5_2_x_comp/
mkdir /usr/local/lib/Zend
mv ZendOptimizer.so /usr/local/lib/Zend/

Now edit /etc/php5/apache2/php.ini and add the next three lines to the [PHP] section at the bottom of the file: (you can also edit the file with root nautilus or enter in terminal sudo gedit /etc/php5/apache2/php.ini)

[PHP]
zend_extension=/usr/local/lib/ioncube/ioncube_loader_lin_5.3.so
zend_extension=/usr/local/lib/Zend/ZendOptimizer.so
zend_optimizer.optimization_level=15

Restart Apache with the next command:

sudo /etc/init.d/apache2 restart

64bit Linux

You need root rights for all process. If you want to operate with nautilus copy or edit files, to get the root permission press Alt+F2 and enter: gksudo nautilus.

IonCube 64 bit. You can download ioncube from here and copy to your /tmp/ folder or you can download it and install directly from terminal line by line:

cd /tmp/
wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar xvfz ioncube_loaders_lin_x86-64.tar.gz
cd ioncube/
mkdir /usr/local/lib/ioncube
mv ioncube_loader_lin_5.3.so /usr/local/lib/ioncube/

Zend optimizer 64 bit. Get the latest version of the Zend Optimizer from here and save it in your /tmp/ directory. At this moment it is version 3.3.9. If you have other version, when you entering tar xvfz Zend press TAB to automatically finish the line.

cd /tmp/
tar xvfz ZendOptimizer-3.3.9-linux-glibc23-x86_64.tar.gz
cd ZendOptimizer-3.3.9-linux-glibc23-x86_64/data/5_2_x_comp/
mkdir /usr/local/lib/Zend
mv ZendOptimizer.so /usr/local/lib/Zend/

Now edit /etc/php5/apache2/php.ini and add the next three lines to the [PHP] section at the bottom of the file: (you can edit I with root nautilus or enter in terminal sudo gedit /etc/php5/apache2/php.ini)

[PHP]
zend_extension=/usr/local/lib/ioncube/ioncube_loader_lin_5.3.so
zend_extension=/usr/local/lib/Zend/ZendOptimizer.so
zend_optimizer.optimization_level=15

Restart Apache with the next command:

sudo /etc/init.d/apache2 restart

Test

You are now set up. How to check up if anything is ok?
Make the next test.php file into your /var/www/ folder

sudo nano /var/www/test.php

After that enter the next code inside:

<?php phpinfo(); ?>

press Ctrl+X and Y (yes) to save. Open your browser and point to the newly created test file:

http://localhost/test.php


You should get Zend logo and version that is installed as on picture. If you have any question you can ask on comment section below.

Tags | , , , , ,

| |

6 Responses to “Install Zend Optimizer and ionCube Loader on Linux”

  1. Emiliano says:

    Hello,
    Great posting

    How do you see if the ioncube was installed?

  2. Matt says:

    My MAN!!!! Struggling here for a day and a half and you hooked me up. Many Thanks!!!!!!Optimizer was what I was missing

  3. George says:

    Excellent article!!!
    For ubuntu 10.04 TLS server i put the three lines:

    [PHP]

    between Dynamic Extensions

    zend_extension=/usr/local/lib/ioncube/ioncube_loader_lin_5.3.so
    zend_extension=/usr/local/lib/Zend/ZendOptimizer.so
    zend_optimizer.optimization_level=15

    and Module Settings

    and worked fine. But not on the end of the PHP file.
    Those are located around the 50% of the file.

    thats is what i got from test.php:

    This program makes use of the Zend Scripting Language Engine:
    Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with the ionCube PHP Loader v3.3.20, Copyright (c) 2002-2010, by ionCube Ltd.
    with Suhosin v0.9.29, Copyright (c) 2007, by SektionEins GmbH

  4. This is very attention-grabbing, You’re a very skilled blogger. I have joined your feed and look forward to looking for extra of your great post. Additionally, I have shared your web site in my social networks






Archives

Add to Technorati Favorites
website stats
TwitterCounter for @ukion