Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to install zend optimizer two version on window

Posted on 2006-07-05
3
Medium Priority
?
1,310 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 40

Accepted Solution

by:
Richard Quadling earned 1000 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:Richard Quadling
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to dynamically set the form action using jQuery.
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.
Suggested Courses

618 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