Accelerate PHP with Zend

xiaoxiao2021-03-06  68

ZendOptimizer makes PHP support encryption and speeds up PHP speed (free)

Zend Encoder encrypts PHP file into binary (charge)

Zendsafeguard includes Zend Encoder and Zend License

1. First install the ZendOptimizer installed, in PHP.ini, add the following code (version 2.5.5 will be added)

#############################################################

[Zend]

zend_optimizer.optimization_level = 15zend_extension_ts = "C: / Program Files / Zend / lib / ZendExtensionManager.dll" zend_extension_manager.optimizer_ts = "C: / Program Files / Zend / lib / Optimizer-2.5.5" zend_optimizer.encoder_loader = 1 //2.5 .5 version seems to be useless Zend_Loader.enable = Off

#############################################################

Explanation:

Zend_optimizer.optimization_LEVEL "== Optimization, how many optimization processes are initiated here.

Zend_extension_TS "== Optimizer to be executed.

ZEND_EXTENSION_MANAGER.OPTIMIZER_TS "== The directory where the optimizer is located.

Zend_optimizer.Encoder_Loader == Whether it is allowed to process the PHP file encrypted by Zend Encoder.

Zend_Loader.enable = Off "== It seems that this Zend_Loader will make optimized speed faster.

Optimization process Zend_optimizer.optimization_LEVEL explanation

The most important part of this here, look carefully! Zend Opt has a total of 10 optimization processes, the better the more performance that is theoretically. Of course, there is a gap between theory and reality. The more the optimization process is turned on, the greater the performance consumption, and the 10 optimization processes of Zend Opt is not the same, that is, the effect is not average. The highest value (high mode) defined by Zend is 15, here 15 refers to the Open 1-4 optimization process. Of course, many friends are not satisfied, after all, the highest opens only half of the optimization process even half of the total number. The corresponding digital code (value) of each optimization process is as follows:

Do not use 0 <= If this is not as good, save point memory! Optimization Process 1 (Pass1) 1 Optimization Process 2 (Pass2) 2 Optimization Process 3 (Pass3) Optimization Process 4 (PASS4) 8 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

What is the way to turn on an optimization process is controlled by these digital code (value) and as the parameter value of this parameter. As in my profile, Zend_Optimizer.Optimization_Level = 1023, the 1023 here is an optimization process 1 to the optimization process 10 all digital code (value) added and indicates that all 10 optimization processes are turned on. The HIGH mode value defined by Zend Company mentioned is 15, 15 indicates that the optimization process is simultaneously turned on. Encryption code support Zend_Optimizer.Encoder_Loader explanation

For this parameter, I think most of the friends who have never seen Zend Opt FAQ documents don't know. This parameter is used to tell Zend Opt to support code encrypted by Zend Encoder. By default, Zend Opt will support the encrypted code. If you don't use the encrypted code, I recommend you to close this option. This feature involves the process of unpacking the inverse code, which causes the system load to increase the weight. My friend has developed the corresponding anti-compilation tool, which is expected to be launched after the Spring Festival.

This parameter is only two 0 off, 1 is turned on. Default is 1, the recommended is set to 0.

Module positioning zend_extension_ts No need to explain

This is the easiest place, the parameter is the installation path of the Zend Opt module on the hard disk.

2, encrypt the PHP program with Zend Encoder can be released

Note: When using Zendsafeguard, click "Disable PHP-Compatible Header" will not enter the head of Zend's file.

carry out

转载请注明原文地址:https://www.9cbs.com/read-91877.html

New Post(0)