How to install zend optimizer in php

藏色散人
Release: 2023-03-03 19:52:02
Original
3851 people have browsed it

How to install zend optimizer in php: first download and install zend optimizer; then select the WEB service platform used in the PHP environment; then select the specific directory location of "php.ini"; finally specify the installation directory of the Apache server That’s it.

How to install zend optimizer in php

Recommended: "PHP Video Tutorial"

The installation and configuration of zend optimizer is very simple. I didn’t originally plan to write a zend optimizer configuration tutorial, but in order to ensure the integrity of the introductory tutorial on PHP environment configuration on the Windows platform, I installed zend optimizer 3.3.3 carefully. I accidentally discovered that zend optimizer3.3.3 currently does not support PHP5.3, so I would like to remind everyone to make sure that your PHP operating environment is PHP5.2 when reading this zend optimizer installation and configuration tutorial.

For beginners of PHP, you must first know what zend optimizer is?

zend optimizer has two main functions: 1. Improve the performance of PHP programs; 2. Run zend-encrypted programs PHP files.

zend optimizer installation tutorial

First download zend optimizer, I downloaded zend optimizer3.3.3 for windows, please click the download address to download. Downloading zend optimizer is free, but when you download it from the zend official website, you first need to register. Please note this.

After downloading zend optimizer3.3.3, double-click the installation file to start installing zend optimizer. There are several points to note during the installation process:

1. First, you will be asked to select the installation directory of zend optimizer. , you can choose according to your needs. My suggestion is that for security reasons, it is best to install it outside the website directory.

 2. During the installation process of zend optimizer, you will be asked to choose the WEB service platform used by your PHP environment. The default ones are IIS, Apache, etc. I use Apache2.x, please be sure to select the right one. , which involves subsequent operations.

 3. Afterwards, the zend optimizer installation program will ask you to select the specific directory location of php.ini. This is because zend optimizer needs to find the PHP configuration file as a backup and add the corresponding zend optimizer configuration information here. By default For C:\Windows, if your PHP version is PHP5.2, the default does not need to be changed. As an aside, although zend optimizer currently does not support PHP5.3, it will definitely support it sooner or later. So if you install zend optimizer in a PHP5.3 environment in the future, you will need to change the directory location of the default php.ini configuration file. . This is because there are differences in the installation of PHP5.3 and PHP5.2. Click to view the tutorial on installing and configuring PHP5 using FastCgi and ISAPI methods under Windows 7 IIS7.

4. Finally, according to the type of WEB server you choose, select the specific installation directory of the server. I chose the Apache server before, so I only need to specify the installation directory of the Apache server.

 5. During the installation process of zend optimizer, you will be asked to stop or start the Apache or IIS server. You only need to click OK and it will automatically stop or start the Apache or IIS server.

 6. If you uninstall zend optimizer in the future, the zend optimizer installation program will automatically restore the previously backed up php.ini file by default.

At this point, the installation of zend optimizer3.3.3 is completed, it is very simple.

The next step is to verify whether zend optimizer3.3.3 is installed successfully. You only need to create a new php file and enter the phpinfo() function. Access this file in the browser and see that Zend is included in the output PHP configuration information. Optimizer column and

1

Zend Engine v2.2.0, copyright (c) 1998-2009, Zend Technologies Ltd., with the Zend Optimizer v3.3.3, copyright (c) 1998-2007 Zend Technologies Ltd.

Information, just explain zend optimizer was installed successfully.

zend optimizer configuration tutorial

The zend optimizer configuration information will be automatically written to the end of the PHP configuration file php.ini during installation. The default zend optimizer configuration information is as follows

1
2
##zend_extension_manager.optimizer_ts="D:\PHPTools\Zend\ZendOptimizer-3.3.0 \lib\Optimizer-3.3.0"

zend_extension_ts="D:\PHPTools\Zend\ZendOptimizer-3.3.0\lib\ZendExtensionManager.dll"

zend_extension_manager.optimizer_ts and zend_extension_ts respectively specify the directory address of the zend optimizer manager and the directory address of the zend optimizer extension file.

 

Note: The two configuration options of zend optimizer are different for different PHP5 versions. The zend optimizer configuration information for PHP5 Non-Thread Safe version is as follows

##1zend_extension=

In addition to these two configuration options, zend optimizer also has several configuration options

1. zend_optimizer.enable_loader: Tell zend optimizer whether it can execute code encrypted by Zend Encoder. The default configuration is zend optimizer support. If you want to cancel, you just need to add

1

to the zend optimizer configuration information in php.ini zend_optimizer.enable_loader = 0

, 0 means off, 1 means on.

2. zend_optimizer.optimization_level: There are a total of 10 optimization processes of zend optimizer. The maximum value is 1023. The highest value (High mode) defined by Zend Company is 15, which means opening the optimization processes 1-4. This 15 is the sum of the values ​​of the four optimization processes. The 10 optimization processes are as follows

1
2
3
4
5
6
7
8
9
10

Optimization process 1 (PASS1) 1
Optimization process 2 (PASS2) 2
Optimization process 3 (PASS3) 4
Optimization process 4(PASS4) 8
Optimization process 5(PASS5) 16
Optimization process 6(PASS6) 32
Optimization process 7(PASS7) 64
Optimization process 8(PASS8) 128
Optimization process 9 (PASS9) 256
Optimization process 10 (PASS10) 512

3. The other two zend optimizers The configuration option zend_optimizer.disable_licensing is related to zend_optimizer.licence_path, zend_optimizer.obfuscation_level_support and zend guard. I will talk about it next time.

After completing the zend optimizer configuration, restart the WEB server. You can see in phpinfo that the zend optimizer column has information about Optimization Pass 1-4 enabled and Zend Loader enabled. This indicates that the zend optimizer configuration has been modified. It worked.

At this point, the installation of zend optimizer and the basic configuration of zend optimizer on the windows platform are completed. You can try to execute the zend encrypted PHP program to experience the changes brought by zend optimizer and deepen your understanding for beginners of PHP. helpful.

The above is the detailed content of How to install zend optimizer in php. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template