PHP optimized configuration--Accelerate your Vbb,phpwind,discuz,ipb,molyx 1th/2 page _php Tutorial

Source: Internet
Author: User
Tags phpinfo
Make the Forum Faster PHP acceleration Setup PHP acceleration: Zend Optimizer Optimized PHP program

Zend Optimizer V2.5.7 for Windows
Software language: English
Operating Environment: WIN9X/NT/2000/XP

Zend Optimizer V2.5.7 for Windows software Description:

Zend Optimizer uses optimized code to improve the execution speed of PHP 4.0 applications. The principle of implementation is to optimize the code that is generated by running the compiler (Run-time Compiler) before it is finally executed. In general, PHP programs that use Zend Optimizer are 40% to 100% faster than unused. This means that visitors to the site can browse the Web more quickly, completing more transactions and creating better customer satisfaction. A faster response also means that you can save on hardware investment and enhance the services offered by the site. Therefore, the use of Zend Optimizer, is tantamount to improve the profitability of e-commerce. Zend Optimizer can bring a lot of benefits to PHP users, especially those who run the site. Running a PHP program quickly can significantly reduce the CPU load on the server and can reduce the response time by half, that is, the time between when a visitor clicks the link to the server to start reading the page.

Installing Zend Optimizer optimizing PHP programs

Zend Optimizer is a free PHP optimization software opened by the PHP core engine "Zend" http://www.zend.com creator Zend technology company. According to Zend Company disclosed that using this software in some cases can at least improve performance by more than 30%! Now let's take a look at how to configure this set of software.

The installation of Zend optimizer is simple

1, run the installation files, first prompts you to select the installation directory, select a directory you like, click "Next".
2. The installation Wizard will ask you to select the currently used Web server (Apache, IIS, or other), select a good server and click "Next"
3. The installation Wizard prompts you to confirm the location of the php.ini (by default, C:\WINDOWS\) click "Next" and Prompt "backup php.ini to C:\WINDOWS\php.ini-Optimizer-bak, When uninstalling the software, you can revert to the original php.ini) and click "Next".
4. The installation Wizard prompts "to restart the IIS service in order to continue Setup", click Yes, Setup starts restarting the IIS service, and the installer prompts "The IIS service has successfully restarted" Click OK, and then click Finish to complete the installation.
5, after the installation process will automatically according to your choice to modify PHP.ini help you start the engine. Let's introduce the configuration options for Zend Optimizer to help you maximize your custom and reasonable configuration.

[Zend]
ZEND_OPTIMIZER.OPTIMIZATION_LEVEL=15//Zend_optimizer.optimization_level = 1023 in my profile
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 let's cover the implications of the above in these configuration files:
Zend_optimizer.optimization_level "= = Optimization degree, here defines how many optimization processes to start.
Zend_optimizer.encoder_loader "= = whether to allow processing of PHP files encrypted by Zend Encoder, which is allowed by default.
Zend_extension_ts the directory where the = = Optimizer resides.
Zend_extension_manager.optimizer_ts the = = Optimizer manages the directory.

Zend_optimizer.optimization_level detailed explanation of the optimization process

Here is the most important part, look carefully! Zend opt has a total of 10 optimization processes, the more theoretically the more performance the better. Of course, there is always a gap between theory and practice. The more the optimization process opens, the more the performance is consumed, and the 10 optimization processes of Zend opt are not the same, which means that the effect is not average. The highest value defined by the Zend Company (high mode) is 15, and here 15 refers to the 1-4 optimization process. Of course, many friends are not satisfied with this, after all, the highest only open 4 optimization process even half of the total is not. The corresponding numeric codes (values) for each optimization process are as follows:

Do not use 0 <= if this is not installed, but also save a bit of memory to say!
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 (PASS10) 512

The way in which the optimization process is turned on is controlled by the addition of these numeric codes (values) and by the parameter values of the parameters. As in my config file Zend_optimizer.optimization_level = 1023, here's 1023 is the optimization process 1 to the optimization process 10 all the numerical code (value) is added to the sum, indicating the opening of all 10 optimization process. The Zend Company-defined high mode value mentioned earlier is 15,15, which also opens the optimization process 1-4.

Cryptographic code support Zend_optimizer.encoder_loader detailed explanation

For this parameter, I think most of the friends who have not seen the Zend Opt FAQ document do not know. This parameter is used to tell Zend opt to support code that has been Zend Encoder encrypted. By default, Zend Opt will support encrypted code. I recommend that you turn off this option if you do not use code that has been encrypted. This function involves the process of unpacking the anti-code, which can lead to the aggravation of the system load. My friend has developed the corresponding anti-compilation tool, which is expected to be launched after the Spring Festival.

The value of this parameter is only two 0 off, 1 is turned on. The default is 1 and the recommended setting is 0.

Module positioning zend_extension_ts, Zend_extension_manager.optimizer_ts without explanation, these parameters are Zend Optimizer related modules on the hard disk installation path.

6, how to know Zend Optimizer is running?
The answer is simple, just use PHP's function phpinfo () to detect the knowledge, as follows:
Phpinfo ();
?>

The results shown in the section about Zend Optimizer are as follows: (different PHP version, the information may be different, mine is PHP4.3.11)


[Copy to Clipboard] [ - ] CODE:
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 II
Accelerate 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 by
Caching them in compiled state, so, the overhead of compiling are almost
Completely eliminated. Also it uses some optimizations to speed up execution
of PHP scripts. Eaccelerator typically reduces server load and increases the
Speed of your PHP code by 1-10 times.

Eaccelerator is a fork of Turckmmcache
Eaccelerator (formerly Truck MMCache)

I believe many friends know MMCache, but a long time ago developers were Zend pacified, so MMCache has no official new version ... To support the latest PHP4.4.0 or PHP5.04 need to compile their own source code, for ordinary users is no different than the Arabian Nights ... Don't lose heart, we still have eaccelerator!.

http://www.bkjia.com/PHPjc/318489.html www.bkjia.com true http://www.bkjia.com/PHPjc/318489.html techarticle make the Forum faster PHP acceleration Setup PHP acceleration: Zendoptimizer optimized PHP program zendoptimizerv2.5.7forwindows software language: English operating Environment: WIN9X/NT/2000/XP zendoptimizerv2.5.7f ...

  • Related Article

    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.