PHP optimization configuration - speed up your VBB, phpwind, Discuz, IPB, MolyX page 1/2

WBOY
Release: 2016-07-29 08:37:00
Original
1205 people have browsed it

Make the forum faster PHP acceleration settings PHP acceleration: Zend Optimizer optimizes PHP programs
Zend Optimizer V2.5.7 For Windows
Software language: English
Running environment: Win9x/NT/2000/XP
Zend Optimizer V2.5.7 For Windows software introduction :
Zend Optimizer uses code optimization methods to improve the execution speed of PHP 4.0 applications. The principle of implementation is to optimize the code generated by the run-time compiler (Run-Time Compiler) before being finally executed. In general, PHP programs that use Zend Optimizer are 40% to 100% faster than those that do not. This means website visitors can browse the web faster, get more done, and create better customer satisfaction. Faster response also means saving on hardware investment and enhancing the services provided by the website. Therefore, using Zend Optimizer is equivalent to improving the profitability of e-commerce. Zend Optimizer can bring many benefits to PHP users, especially those who run websites. Running PHP programs quickly can significantly reduce the CPU load on the server and can cut in half the response time, which is the time between when a visitor clicks a link and when the server starts reading the page.
Install Zend Optimizer to optimize PHP programs
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 installation is very simple
1. Run the installation file. You will first be prompted to select the installation directory. Select a directory you like and click "Next".
2. The installation wizard will ask you to select the WEB server you are currently using (Apache, IIS or others). After selecting the server, click "Next"
3. The installation wizard prompts you to confirm the location of php.ini (the default is C: WINDOWS ) Click "Next" and it will prompt "Back up php.ini to C:WINDOWSphp.ini-Optimizer-bak. You can restore to the original php.ini when the software is uninstalled." Click "Next".
4. The installation wizard prompts "In order to continue the installation program, the IIS service needs to be restarted." Click "Yes", the installation program begins to restart the IIS service, and then the installation program will prompt "The IIS service has been successfully restarted." Click "OK". Click "Finish" to complete the installation.
5. After the installation is completed, the program will automatically modify php.ini according to your selection to help you start the engine. Next, we will introduce the configuration options of Zend Optimizer to help you maximize customization. Configuration.
[Zend]
zend_optimizer.optimizati//zend_optimizer.optimization_level = 1023 in my configuration file
zend_extensi
Now we will introduce the meaning of the relevant contents in the above configuration files:
zend_optimizer.optimization_level "== Optimization degree, This defines how many optimization processes are started.
zend_optimizer.encoder_loader == Whether to allow processing of PHP files encrypted by Zend Encoder, allowed by default.
zend_extension_ts == The directory where the optimizer is located. == The optimizer management location. Table of contents.
Optimization process zend_optimizer.optimization_level Detailed explanation
The most important part here, look carefully! Zend Opt has a total of 10 optimization processes. In theory, the more you open, the better the performance. Of course, there are always differences in theory and practice. Gap. The more the optimization process is enabled, the greater the performance consumption. 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 Zend is 15, here 15. It refers to opening optimization processes No. 1-4. Of course, many friends are not satisfied with this. After all, only 4 optimization processes are enabled, not even half of the total. The corresponding numerical codes (values) of each optimization process are as follows:
Don’t use 0 <= If you don’t install it, you can 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
Optimization process 8 (PASS8) 128
Optimization process 9 (PASS9) 256
Optimization process 10 (PASS10) 512
How to start the optimization process is controlled by adding the sum of these digital codes (values) as the parameter value of this parameter. For example, in my configuration file zend_optimizer.optimization_level = 1023, where 1023 is the sum of all digital codes (values) from optimization process 1 to optimization process 10, which means that all 10 optimization processes are enabled. The High mode value defined by the Zend company just mentioned is 15, and 15 means that optimization processes 1-4 are enabled at the same time.
Detailed explanation of encryption code support zend_optimizer.encoder_loader
For this parameter, I think most friends who have not read the Zend Opt FAQ document do not know it. This parameter is used to tell Zend Opt whether to support code encrypted by Zend Encoder. Zend Opt will support encrypted code by default. I recommend turning this option off if you are not using encrypted code. This function involves the process of unpacking and inverting the code, which will increase the system load. My friend has developed the corresponding decompilation tool and is expected to launch it after the Spring Festival.
The values ​​of this parameter are only two: 0 is off and 1 is on. The default is 1, and the recommended setting is 0.
Module location zend_extension_ts and zend_extension_manager.optimizer_ts need no explanation. These parameters are the installation paths of Zend Optimizer related modules on the hard disk.
6. How to know whether Zend Optimizer is running?
The answer is very simple, just use the PHP function phpinfo() to detect it, as shown below:
phpinfo();
?>
The part about Zend Optimizer in the displayed results is as follows: (The information may be different depending on the PHP version. Mine 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
Represents Zend Op timizer for PHP optimization successful .
PHP Optimization Configuration 2
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 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 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 it was developed a long time ago The author was recruited 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 yourself, which is a fantasy for ordinary users... Don't Don’t be discouraged, we still have eAccelerator!

Current page 1/2 12Next page

The above introduces the PHP optimization configuration - speed up your VBB, phpwind, Discuz, IPB, MolyX page 1/2, including the content, I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!