How to install Zend Optimizer?

cd /usr/local/directadmin/custombuild
./build update
./build zend
 
Hello,

Sorry if my english is not easily understandable, because I'm french but I hope that it will not too hard to read my message =)

So,

I need to have zend optimiser to run some php page.

I have done that :

Code:
cd /usr/local/directadmin/custombuild
./build update
./build zend

After that, there will not have any problem and apache restart without problem but I can't run my php page encoding with zend optimizer :/

I have done that :

Code:
nano /usr/local/directadmin/custombuild/options.conf

zend=yes

and restart apache again.

But it's always the same thing, and if I run a "php -v it return :

PHP 5.2.6 (cli) (built: Jun 2 2008 17:28:29)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

I think that it must return something like that :

Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with Zend Extension Manager v1.2.0, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.2.8, Copyright (c) 1998-2007, by Zend Technologies

I don't know why after enable zend I can't run a php page encoding with zend optimizer :/ I think that I need zend optimizer, because actually I have just Zend Engine.

Thanks a lot.

Regards,
Sadkun

And really sorry for my english :(
 
Last edited:
sadkun are you running php as cgi or as cli?

If you're running it as cgi, you should add the same lines to your php.ini located in /usr/local/etc/php5/cgi/php.ini as were added when zend was installed.

In my case I had to add the following lines:
[Zend]
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
zend_optimizer.version=3.3.3

zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so

The file that was edited when you installed Zend is usually /usr/local/Zend/etc/php.ini with a softlink to /usr/local/lib/php.ini


edit: you can check this by making a php file with <? phpinfo(); ?>
Then you will see if you have zend optimizer installed as well
 
Yeah thanks a lot roelp ! It works =)

If someone have the same problem in future, be careful because roelp method works but be careful with these lines :
Code:
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
zend_optimizer.version=3.3.3

In my case I have to replace 3.3.3 by 3.2.8 it depends of your version of zend optimizer, I don't know why mine is older than roelp version but it works and it's the must important thing :)

To know your version of your zend optimizer (not zend engine) go here :

Code:
/usr/local/Zend/lib

and just do an :

Code:
ls -la

It will return something like that :

drwxr-sr-x 9 root staff 4096 2008-11-14 20:11 Optimizer-3.2.8
drwxr-sr-x 7 root staff 4096 2008-11-14 20:11 Optimizer_TS-3.2.8
-rwxr-xr-x 1 root staff 10112 2008-11-14 20:11 ZendExtensionManager.so
-rwxr-xr-x 1 root staff 10112 2008-11-14 20:11 ZendExtensionManager_TS.so


And I'm really sorry for my english I know that it sucks but I do my best to improve it ;)

Regards,
Sadkun
 
Last edited:
:confused:
[root@my custombuild]# ./build update
./build: line 14: [: =: unary operator expected
./build: line 164: [: : integer expression expected
./build: line 169: [: : integer expression expected
./build: line 164: [: : integer expression expected
./build: line 169: [: : integer expression expected
./build: line 164: [: : integer expression expected
./build: line 169: [: : integer expression expected
./build: line 164: [: : integer expression expected
./build: line 169: [: : integer expression expected
./build: line 164: [: : integer expression expected
./build: line 169: [: : integer expression expected
./build: line 164: [: : integer expression expected
./build: line 169: [: : integer expression expected
./build: line 164: [: : integer expression expected
./build: line 169: [: : integer expression expected
./build: line 164: [: : integer expression expected
./build: line 169: [: : integer expression expected
./build: line 164: [: : integer expression expected
./build: line 169: [: : integer expression expected
./build: line 164: [: : integer expression expected
./build: line 169: [: : integer expression expected
There is wrong default PHP in /usr/local/directadmin/custombuild/options.conf set.
 
I followed the guides on these pages to install Zend on my new DA server, I even went through the installation screen and after reboot Zend is still not working.

When trying the process again I am presented with an error in ssh telling me There is wrong default PHP in /usr/local/directadmin/custombuild/options.conf set.
There is wrong default PHP in /usr/local/directadmin/custombuild/options.conf set.
[root@server1 scripts]# There is wrong default PHP in /usr/local/directadmin/custombuild/options.conf set.
-bash: There: command not found


I now cannot rebuild apache to try again. Any ideas please
 
sorry should have added this, it's the contents of my options.cnf file

#PHP settings. default_php possible values - 4 or 5
default_php=5
php4_cli=no
php4_cgi=no
php5_cli=yes
php5_cgi=no
zend=no

#Possible values - 4.1, 5.0, 5.1
mysql=5.0
mysql_inst=no
mysql_backup=yes

#Possible values - 1.3, 2.0 or 2.2
apache_ver=2.2

#Web applications
phpmyadmin=yes
atmail=no
squirrelmail=yes
roundcube=yes
uebimiau=no

#Mail options
exim=no
mail-header-patch=yes
dovecot=yes

#Statistics
awstats=no
webalizer=yes

#FTP options
proftpd=no

#Jailed shell (beta)
jail=no

#CustomBuild options
custombuild=1.1
autover=no
bold=yes
clean=yes
clean_old_tarballs=no
clean_old_webapps=yes

#Cron settings
cron=no
[email protected]
notifications=yes
da_autoupdate=no
updates=no
webapps_updates=yes

#CustomBuild 1.2 settings
php6_cli=no
php6_cgi=no
php_ini=no
#Possible values - recommended or dist
php_ini_type=recommended
cleanapache=no
fileserver=1
eximconf=no
 
It seems that you possibly have some special symbols in default_php value. Use the following to re-create the options.conf file:
Code:
cd /usr/local/directadmin/custombuild
rm -f options.conf
./build create_options

Or, if you want to use the defaults:
Code:
cd /usr/local/directadmin/custombuild
rm -f options.conf
./build
 
Why are there so many methods of installing zend optimizer on directadmin?

I followed the steps doing

Code:
cd /usr/local/directadmin/custombuild
./build update
./build zend

and rebooted, and still do not see zend optimizer enabled on my phpinfo page.


I am running php as CLI.

Can anyone provide a definitive guide?
 
These forums are full of example son how to install Zend on DirectAdmin. Is it really necessary to go through it all again?

Jeff
 
Edit options.conf. Search for zend; it should be self-explanatory.

Jeff
 
FreeBSD 7.3

Hi.
Can anyone tell me how to install ZendOptimizer on freebsd 7.3?
When i'm trying to install it I see this message
Code:
sudo ./build zend
File already exists:    ZendOptimizer-3.3.0a-freebsd6.0-amd64.tar.gz

Zend requires compat6x-i386 for freebsd 7/8. Trying to install it... Note that you may experience probelms with ZendOptimizer support, because it has no official builds for FreeBSD 7 or higher.

Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.3-release/Latest/compat6x-i386.tbz: File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-7.3-release/Latest/compat6x-i386.tbz' by URL

Location of php.ini:
  /usr/local/lib
Press return to continue...

/libexec/ld-elf.so.1: Shared object "libutil.so.5" not found, required by "php"
 
Back
Top