1and1 Help Centre Categories

print article

Manually Install Zend Optimizer

For linux packages

In this article you will learn what Zend Optimizer is and how to download and install it using only FTP.

Zend Optimizer is a free tool for executing pre-compiled PHP code. The code must have been pre-compiled using Zend Guard for Zend Optimizer to be able to execute it. The advantage of pre-compiled code means that the code has already been slightly processed and is no longer human readable. The PHP code will also execute faster since it has already been pre-compiled.

Many web applications (such as content management systems) that can be purchased online may be pre-compiled using Zend Gaurd or other similar tools to prevent reverse engineering or tampering of the PHP code. To be able to install a web application that has been pre-compiled using Zend Gaurd, you will need to install Zend Optimizer in your web space before the code will execute properly.

Follow the steps below to download and install Zend Optimizer in order to execute Zend Guard protected files as if they were regular PHP scripts.

Step 1
Download and save the 32 bit Zend Optimizer for Linux from the Zend website to the Desktop of your own computer.
Windows explorer
Windows explorer
Step 2
The file downloaded will likely be in a compressed .tar.gz file. To uncompress the file, use a free archive tool such as WinRAR. It is not suggested to download a beta version of the software. Please scroll down for the English WinRAR and RAR release section. If unsure, download the WinRAR x86 (32 bit) version.
Uncompress the .tar.gz file to your desktop using a tool such as WinRAR which should result in a folder named ZendOptimizer-3.3.9-linux-glibc23-i386 or something similar.
Windows explorer
Windows explorer
Step 3
Rename the folder to simply ZendOptimizer.
Windows explorer
Windows explorer
Step 4
Launch a basic text editor such as Notepad and copy and paste the code below into it:
<?php phpinfo(); ?>

Microsoft Notepad
Microsoft Notepad

Save the file as phpinfo.php to your desktop.
Windows explorer
Windows explorer
Step 5
Using an FTP program, upload only the phpinfo.php file to the root of your webspace. Do not upload the file to a subfolder of your webspace.

Please reference our FTP section of the FAQs for more help if necessary.
Step 6
Next, access the phpinfo.php page from the browser on your computer (such as Mozilla Firefox) using a domain that points to the root of your webspace. It is suggested to use the technical subdomain which was included in your package and looks similar to:

http://s123456789.websitehome.co.uk/phpinfo.php
Step 7
First check the version of PHP being used at the top of the screen. Write down the version on a piece of paper.
PHP Version
PHP Version
Step 8
Now, scroll down the page until you see the Environment heading. Highlight the value of DOCUMENT_ROOT.
Environment section
Environment section
Step 9
Open your text editor again to create a new text document and copy and paste the DOCUMENT_ROOT value into it.
Microsoft Notepad
Microsoft Notepad
Step 10
Now add the text /ZendOptimizer/data/4_4_x_comp/ZendOptimizer.so to the end of the line. You may need to replace the text in red to match the version of PHP you are running. For instance, if the version of PHP you are using is 5.2.13, you would change the text to 5_2_x_comp.
Text expansion at the end of the line
Text expansion at the end of the line
Step 11
At the beginning of the line, add the text zend_extension=.
Text expansion
Text expansion
Step 12
Add a new line at the top with the text zend_optimizer.optimization_level=15.
Microsoft Notepad
Microsoft Notepad
Step 13
Save the file to your desktop as php.ini.
Windows explorer
Windows explorer
Step 14
Using an FTP program, upload the php.ini file along with the ZendOptimizer folder to the root of your webspace. Do not upload to a subfolder of your webspace.
Step 15
Access the phpinfo.php page again. You should now see that Zend Optimizer has been installed as is recognized by PHP.
Zend Optimizer
Zend Optimizer
Step 16
Since the settings defined in the php.ini file only apply to the folder where it is saved, it is now necessary to upload the php.ini file to any additional subfolders that contain files which require Zend Optimizer.

Tip: If your package allows SSH access, you may create symbolic links in subfolders that point to your original php.ini file. This way, if the original php.ini file needs to be edited, the changes will then be recognized by all symbolic links that point to it instead of having to overwrite all php.ini files in all the subfolders.
Please note:
With Managed Servers, please make sure that the PHP module is set to inactive in your Control Panel within the Advanced Configuration section.
For additional information, you may want to reference: