Any advice about getting Zend optimizer ibn user compiled PHP?
As a related question, how do you get Zend Optimizer working using any method: module, cgi, or custom-compiled? I read in the newsletter (https://panel.dreamhost.com/kbase/index.cgi?area=3126&keyword=zend) that it had been implemented on all servers, but phpinfo() doesn’t show a zend section and doesn’t include the Zend Optimizer copyright notice where it should, immediately following the zend engine copyright notice.
Do I need to turn it on somehow? Or is compiling PHP required?
I think I figured out the answer to your question and in the process answered mine. While you don’t have root access to use ./install.sh, you can manually install Zend Optimizer.
- Download Zend Optimizer:
$ cd ~
$ mkdir zend
$ cd zend
$ wget http://downloads.zend.com/optimizer/2.5.10/ZendOptimizer-2.5.10a-linux-glibc21-i386.tar.gz
- Extract the archive:
$ gunzip ZendOptimizer-2.5.10a-linux-glibc21-i386.tar.gz
$ tar -xvf ZendOptimizer-2.5.10a-linux-glibc21-i386.tar
$ cd ZendOptimizer-2.5.10a-linux-glibc21-i386
- Find the directory in ./data that matches your PHP version (Replace 4_4_x_comp with your version):
$ cd data/
$ cd 4_4_x_comp/
- Copy the .so file into your php tree. (I wasn’t sure of the best place to put it, so I chose ~/lib/php.
$ cp ZendOptimizer.so ~/lib/php/
- Edit php.ini:
$ nano ~/example.com/cgi-bin/php.ini
- Add the configuration options anywhere in php.ini:
; Zend Optimizer options
- Check your phpinfo() for these lines:
This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright © 1998-2004 Zend Technologies with Zend Optimizer v2.5.10, Copyright © 1998-2005, by Zend Technologies
and a Zend Optimizer section. You could also try 1023 instead of 15.
More info on that value:
You may need the rest of the files in this post as well:
I had done everything that you instructed. but will that compile ZendOptimizer to my own PHP?? It seems not work…
Only thing I didn’t do it to check phpinfo(). how do I do that? where is phpinfo()?
Is this because I am using ZendOptimizer-2.6.2 version and not 2.5.10a?
phpinfo() is a PHP function that generates a display of various information about your PHP installation.
To use it, just create a small php program with a text editor, and run that program in a browser.
Thanks it works! I copied the wrong .so file. I copied _TS.so file…which is wrong…