12.3. Zend Optimizer

Not to be outdone by the handful of free PHP caching solutions available, Zend—the creators of the Zend Engine that powers PHP—have released their own code optimizer, and it's free. The Zend Optimizer acts in a similar manner to APC and eAccelerator: it caches the compiled state of PHP scripts, enabling faster execution on subsequent requests.

In addition to accelerating the performance of PHP scripts, Zend Optimizer also allows you to run scripts encoded by Zend Encoder or Zend SafeGuard Suite on the server.

12.3.1. Installing Zend Optimizer

Installing the Zend Optimizer is a bit easier than the majority of competing caching solutions, as it comes with a handy configuration and setup wizard.

First, download the package appropriate for your system from http://zend.com/store/products/zend-optimizer.php.

Then, decompress the archive, and go into the newly created directory:

tar -xvzf ZendOptimizer-2.5.10a-linux-glibc21-i386.tar.gz
cd ZendOptimizer-2.5.10a-linux-glibc21-i386

As root, run the install wizard:

./install.sh

Run through the wizard, specifying the necessary paths when prompted. The defaults provided usually suffice. Make sure you choose the proper version of Apache when asked (this book was written around Apache 2).

The wizard will make a backup copy of your php.ini file, and create a new symbolic link pointing to the Zend-modified php.ini file.

At the end of the wizard, you can choose to have Apache automatically restarted, or if you so choose, exit ...

Get Professional LAMP: Linux®, Apache, MySQL®, and PHP5 Web Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.