• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1325
  • Last Modified:

How to install zend optimizer two version on window

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
Sam Panwar
Asked:
Sam Panwar
  • 2
1 Solution
 
Richard QuadlingSenior Software DeveloperCommented:
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
 
Sam PanwarSr. Server AdministratorAuthor Commented:
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
 
Richard QuadlingSenior Software DeveloperCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now