Solved

How to install zend optimizer two version on window

Posted on 2006-07-05
3
1,250 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

708 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

18 Experts available now in Live!

Get 1:1 Help Now