PHP optimized configuration--accelerates your vbb,phpwind,discuz,ipb,molyx 1th/2 page _php tips

Source: Internet
Author: User
Tags phpinfo zend
Make the Forum faster PHP acceleration set PHP Acceleration: Zend Optimizer Optimize 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 Introduction:

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 those that are not used. This means that visitors to the site can browse the Web more quickly, thus accomplishing more business and creating better customer satisfaction. Faster response also means that hardware investment can be saved and the services provided by the site are enhanced. Therefore, the use of Zend Optimizer, is tantamount to improving 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 reduce the response time by half, which is the time between when the visitor clicks on the link to the server and starts reading the page.

Installing Zend Optimizer optimizing PHP programs

Zend Optimizer is a free PHP optimization software run by the PHP core engine "Zend" Http://www.zend.com founder Zend technology company. According to Zend company revealed that the use of this software in some cases can at least improve performance of 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 choose the installation directory, select a directory you like, click "Next".
2, the Installation Wizard will ask you to select the current 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 (default is C:\WINDOWS\) click "Next" to Prompt "backup php.ini to C:\WINDOWS\php.ini-Optimizer-bak, When you uninstall the software you can revert to the original php.ini) click "Next".
4. The Setup Wizard prompts you to restart the IIS service in order to continue Setup, the installer starts restarting the IIS service, and the installer prompts the IIS service to restart successfully Click OK, and then click Finish to complete the installation.
5, after the installation of the program will automatically according to your choice to modify php.ini to help you start this engine. Here's a description of the Zend Optimizer configuration options to help you maximize your customized configuration.

[Zend]
ZEND_OPTIMIZER.OPTIMIZATION_LEVEL=15//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 let's introduce the implications of the relevant content in these configuration files:
Zend_optimizer.optimization_level the degree of optimization, here defines how many optimization processes to start.
Zend_optimizer.encoder_loader = = Whether to allow processing of PHP files encrypted by Zend Encoder is allowed by default.
Zend_extension_ts = = The directory where the optimizer is located.
Zend_extension_manager.optimizer_ts "= = the optimizer manages in the directory.

Optimization Process Zend_optimizer.optimization_level Detailed explanation

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 is opened, the more the performance consumption is, and the 10 optimization processes of Zend opt are not the same, which means that the effect is not average. The highest value (high mode) defined by the Zend Company is 15, where 15 refers to the process of opening the 1-4 optimization. Of course, many friends are not satisfied with this, after all, the highest is only open 4 optimization process even half of the total did 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 some memory 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 opened is controlled by the addition of these numeric codes (values) and the parameter values that are used as the parameters. As in my configuration file, Zend_optimizer.optimization_level = 1023, where 1023 is the sum of the optimization process 1 to the optimization process 10 all numeric codes (values), which indicates that all 10 optimization processes are turned on. The Zend Company-defined high mode value, as mentioned earlier, is 15,15 to open the optimization process at the same time 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 whether to support code that has been Zend Encoder encrypted. By default, Zend Opt will support encrypted code. If you do not use the encrypted code I recommend that you turn off this option. This function is involved in the process of unpack and reverse code, which will result in heavier load of the system. My friend has developed a corresponding counter-compiling tool, which is expected to be launched after the Spring Festival.

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

Module positioning zend_extension_ts, zend_extension_manager.optimizer_ts do not need to explain, these parameters are Zend Optimizer related modules on the hard disk installation path.

6, how to learn Zend Optimizer is running?
The answer is simple, as long as the PHP function phpinfo () to detect, as follows:
?
Phpinfo ();
?>

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


[Copy to Clipboard] [ - ] CODE:
This program makes 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 and Zend Optimizer v2.5.7, Copyright (c) 1998-2004, by Zend Technologies

Indicates that Zend Optimizer for PHP optimization succeeded.

PHP optimized Configuration bis
Accelerate with Eaccelerator (predecessor 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 this 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 the
Speed of your PHP code by 1-10.

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

I believe many friends know MMCache, but a long time ago the developer was Zend Amnesty, so MMCache has been 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 tantamount to the Arabian Nights ... Don't be discouraged, we still have eaccelerator!.
Current 1/2 page 12 Next read the full text

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.