Zend optimizer installation Configuration

Source: Internet
Author: User
Zend optimizer is a free PHP optimization software developed by Zend technology, the creator of the PHP Core Engine "Zend" http://www.zend.com. According to Zend, using this software can improve performance by at least 30% in some cases! Now let's take a look at how to configure this software.

Zend optimizer is easy to install

1. Run the installation file, first prompt you to select the installation directory, select a directory you like, and click "Next ".
2. The installation wizard requires you to select the current Web Server (Apache, IIS, or other), select the server, and click "Next"
3. The installation wizard prompts you to confirm PHP. INI location (C:/Windows/by default) Click "Next" and the prompt "Back up PHP. INI to C:/Windows/PHP. ini-optimizer-Bak. When the software is uninstalled, it can be restored to the original PHP. INI) Click "Next ".
4. The installation wizard prompts "you need to restart the IIS service to continue the installation.) Click" yes "and the installation program starts to restart the IIS service, then, the installer prompts "IIS service restarted successfully", click "OK", and then click "finish" to complete the installation.
5. After the installation is complete, the program will automatically modify PHP. ini based on your choice to help you start the engine. The following describes the configuration options of Zend optimizer to help you customize reasonable configurations.

[Zend]
Zend_optimizer.optimization_level = 15
Zend_extension_ts = "C:/program files/Zend/lib/zendextensionmanager. dll"
Zend_extension_manager.optimizer_ts = "C:/ProgramFiles/Zend/lib/Optimizer-2.5.5"

※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※

[Zend]
Zend_optimizer.optimization_level = 1023
Zend_optimizer.encoder_loader = 0
Zend_extension_ts = "C:/program files/Zend/lib/zendoptimizer. dll"

(The content shown in the online materials may be due to different versions)

※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※

Now we will introduce the meanings of the above configuration files:
Zend_optimizer.optimization_level = degree of optimization. Here we define how many optimization processes are started.
Zend_optimizer.encoder_loader = whether to allow processing of PHP files encrypted by Zend encoder.
Zend_extension_ts '= the directory where the optimizer is located.
Zend_extension_manager.optimizer_ts = the directory where the optimizer is managed.

Zend_optimizer.optimization_level

Take a closer look at the most important part here! Zend OPT has a total of 10 optimization processes. Theoretically speaking, the more Zend OPT, the better the performance. Of course, there is always a gap between theory and practice. The more the optimization process is enabled, the higher the performance consumption. The 10 optimization processes of Zend OPT are different, that is, the effect is not average. Zend defines the maximum value (high mode) as 15. Here 15 refers to enabling the optimization process from 1 to 4. Of course, many friends are not satisfied with this. After all, up to four optimization processes are enabled, even half of the total number. The numeric code (value) corresponding to each optimization process is as follows:

Do not use 0 <= if this is the case, it is better not to install, but also save some memory!
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
Optimized Process 8 (pass8) 128
Optimization process 9 (pass9) 256
Optimization Procedure 10 (pass10) 512

The method in which the optimization process is enabled is controlled by the sum of the numeric code (value) and the parameter value used as the parameter value of this parameter. For example, in my configuration file, zend_optimizer.optimization_level = 1023. Here, 1023 is the sum of all the numerical codes (values) in the optimization process 1 to the optimization process 10, indicating that all 10 optimization processes are enabled. The high mode value defined by Zend is 15, which indicates that the optimization process 1-4 is enabled at the same time.

The encryption code supports zend_optimizer.encoder_loader.

Most of the users who have not read the Zend opt FAQ document do not know this parameter. This parameter is used to tell Zend opt whether to support code encrypted by Zend encoder. By default, Zend opt supports encrypted code. If you do not use the encrypted code, we recommend that you disable this option. This function involves the process of unpackage and decomcode, which will increase the system load. My friend has developed the corresponding decompilation tool, which is expected to be released after the Spring Festival.

The value of this parameter is disabled only by two zeros, and 1 is enabled. The default value is 1, and the recommended value is 0.

The installation path of zend_extension_ts and zend_extension_manager.optimizer_ts on the hard disk of Zend optimizer.

How do I know if Zend optimizer is running?
The answer is very simple. You only need to use the PHP function phpinfo () for detection, as shown below:

<?
Phpinfo ();
?>

The Zend optimizer section in the displayed result is as follows:

This program makes use of the Zend scripting language engine:
Zend engine v1.3.0, copyright (c) 1998-2004 Zend technologies with Zend Extension Manager v1.0.3, copyright (c) 2003-2004, by Zend technologies with Zend optimizer v2.5.3, copyright (c) 1998-2004, by Zend Technologies

Indicates that Zend optimizer for PHP has been optimized successfully.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.