PHP Optimization Configuration-accelerate your vBB, phpwind, discuz, IPB, molyx page 1/2

Source: Internet
Author: User

Faster Forum speed PHP acceleration setting PHP acceleration: Zend optimizer optimizes PHP Program

Zend optimizer v2.5.7 for Windows
Software language: English
Running Environment: Win9x/NT/2000/XP

Zend optimizer v2.5.7 for Windows:

Zend optimizer OptimizationCodeTo improve the execution speed of PHP 4.0 applications. The principle of implementation is to optimize the code generated by the run-time compiler before it is finally executed. Generally, the execution of a PHP program using Zend optimizer is 40% to 100% faster than that without Zend optimizer. This means that the visitor of the website can browse the webpage faster, so as to complete more transactions and create better customer satisfaction. Faster response also means saving hardware investment and enhancing the services provided by the website. Therefore, using Zend optimizer improves the profitability of e-commerce. Zend optimizer can bring many benefits to PhP users, especially those who operate websites. Quick running of the PHP program can significantly reduce the server's CPU load and reduce the response time by half, that is, the time between the visitor clicking the link to the server and reading the page.

Install Zend optimizer to optimize the PHP Program

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 // In my configuration file, zend_optimizer.optimization_level = 1023
Zend_extension_ts = "C: \ Inetpub \ Zend \ Lib \ zendextensionmanager. dll" // This is related to your installation path
Zend_extension_manager.optimizer_ts = "C: \ Inetpub \ Zend \ Lib \ Optimizer-2.5.5"

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.

6. 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 like the following: (different PHP versions may have different information. My name is php4.3.11)

[Copy to clipboard] [-] Code:
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.6, copyright (c) 2003-2004, by Zend technologies with Zend optimizer v2.5.7, copyright (c) 1998-2004, by Zend Technologies

Indicates that Zend optimizer for PHP has been optimized successfully.

PHP Optimization Configuration 2
Acceleration with eaccelerator (formerly truck mmcache)
What is eaccelerator?
----------------------
Eaccelerator is a free open source PHP accelerator, optimizer, encoder and
Dynamic Content cache for PHP. It increases performance of PHP scripts
Caching them in compiled State, so that the overhead of compiling is almost
Completely eliminated. Also it uses some optimizations to speed up execution
Of PHP scripts. eaccelerator typically reduces server load and increases
Speed of your PHP code by 1-10 times.

Eaccelerator is a fork of turckmmcache
Eaccelerator (formerly truck mmcache)

I believe many of my friends know mmcache, but a long time ago, the developer was hired by Zend, so mmcache has never had an official new version... to support the latest php4.4.0 or php5.04, You need to compile the source code by yourself... don't be discouraged. We also have eaccelerator!

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.