Solved

How to install zend optimizer two version on window

Posted on 2006-07-05
3
1,257 Views
Last Modified: 2013-12-13
Hi-

How to install zend optimizer 2 . X and 3.X  both version on window server for php 4 and php5? Can we do this please help.

When I use installer for it then one version automatic uninstall so please help me.
0
Comment
Question by:Sam Panwar
  • 2
3 Comments
 
LVL 40

Accepted Solution

by:
RQuadling earned 250 total points
ID: 17048823
UNTESTED!!!!!

Remove all Zend optimizers.
Make sure your PHP.INI files are clean of the Zend section.
Install Zend Optimizer 2
Make a copy of the install directory and the php.ini contents.
Uninstall ZO2.
Install ZO3.
Make a copy of the install directory and the php.ini contents.
Uninstall ZO3.

From the copies, re-create folders, one for ZO2 and one for ZO3.

As you want different PHP versions, you will be using different INI files.

I assume you are using CGI for PHP4 and ISAPI for PHP5. You have to be using different SAPIs for each version of PHP. Unfortunately, you cannot yet add PHP6 to the mix as this will use the same ini file as one of these versions.

So, PHP4 CGI will use php-cgi.ini or php-fcgi.ini. Create both of these ini files and manually add the Zend section for ZO2.
PHP5 ISAPI will use php-isapi.ini. Create this file and manually add the Zend section for ZO3.

Having said all of that, is there any reason why you don't want to use ZO3 for both PHP4 and PHP5. I run PHP4 and PHP5 on the same machine with ZO3.

PHP 4.4.2 (cgi-fcgi) (built: Jan 13 2006 13:53:43)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    with Zend Extension Manager v1.0.10, Copyright (c) 2003-2006, by Zend Technologies
    with Zend Optimizer v3.0.1, Copyright (c) 1998-2006, by Zend Technologies

PHP 5.2.0-dev (cli) (built: Jun 29 2006 08:19:09)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
    with Zend Extension Manager v1.0.10, Copyright (c) 2003-2006, by Zend Technologies

Though as I am CURRENTLY using a DEV version, I don't have ZO3 enabled as ZO only supplys stable releases.

If I was using PHP5.1.4, then I would have activated ZO3 and I would be using the same installation for both.

NOTE: In the ZO3 directory you have a different version of the optimizer for each version of PHP.

My C:\Program Files\Zend\ZendOptimizer-3.0.1\lib\Optimizer-3.0.1 contains directories and libraries for ...

php-4.2.0
php-4.2.x
php-4.3.x
php-4.4.x
php-5.0.x
php-5.1.x

0
 
LVL 18

Author Comment

by:Sam Panwar
ID: 17049174
Very very thank you for effort ok I will try and can you please also advise about you tell me this

Having said all of that, is there any reason why you don't want to use ZO3 for both PHP4 and PHP5. I run PHP4 and PHP5 on the same machine with ZO3.

Ok... Then how to configure ZO3 for both php 4 and 5

I am using php.ini  which is in c:\php5\php.ini
0
 
LVL 40

Expert Comment

by:RQuadling
ID: 17049226
Your PHP5 php.ini is in c:\php5\php.ini, so edit that one to include the Zend elements ...

[Zend]
zend_optimizer.enable_loader=0
zend_optimizer.enable_slow=0
zend_optimizer.disable_licensing=1
zend_optimizer.optimization_level=-1
zend_optimizer.obfuscation_level_support=0
zend_extension_manager.optimizer_ts="C:\Program Files\Zend\ZendOptimizer-3.0.1\lib\Optimizer-3.0.1"
zend_extension_manager.verbose=Off
zend_extension_ts="C:\Program Files\Zend\ZendOptimizer-3.0.1\lib\ZendExtensionManager.dll"

And then edit your appropriate php.ini file for PHP4.

What SAPI are you using for PHP4 and PHP5?

CLI/CGI/FCGI/ISAPI?

I would use

C:\windows\php-xxxxx.ini where xxxx is the SAPI being used.

So, use CGI for PHP4 and this would use c:\windows\php-cgi.ini or c:\windows\php-fcgi.ini and ISAPI for PHP5 and this would use C:\windows\php-isapi.ini

I'm working on the PHP authors to extend the ini filename to include the PHP major version to allow PHP4/5/6 to all run as ISAPI and use different php.ini files php4-isapi.ini, php5-isapi.ini and php6-isapi.ini, but this is not current or expected anytime soon.

If you are capable of compiling the PHP source, then the patch is ultra simple to incorporate (just 1 .c file to edit).

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now