We know that Zend has a free optimization engine for PHP, but Freelamp is using a buffer product called PHP Accelerator. We have explained several ways to accelerate in the "LAMP acceleration" article, which mentions PHP Accelerator, which is very simple to install, but needs to go to his website to get an activation key. First, download: www.php-accelerator.co.uk/download.php Two, get the activation key and install: www.php-accelerator.co.uk/activate.php register their own server_name After that you will get the following hint: Your key for www.freelamp.com are 8edfd13946c96309244fcca309415902 now and must set the key for Www.freela Mp.com in your site configuration. For a domains not using virtual hosts the key can set in the php.ini file as follows: # PHPA key for Www.freel amp.com # Phpa.registration_key = 8edfd13946c96309244fcca309415902 for Domains setup as a virtual host ADD the key To the domain specific sections for your Web server. # www.freelamp.com VHost Entry # < VirtualHost 10.20.30.40> ServerName www.freelamp.com # ... (Other Vhost specific config) # PHP settings Php_value phpa.registration_key 8edfd13946c96309244fcca309415902 # Also Enable PHPA if set to off inThe php.ini (the default is on) Php_value PHPA 1 </virtualhost> the settings for the specific PHPA values, you can refer to the configuration file that accompanies the software. Since most Web sites are virtual host configurations, it is recommended to use Php_value PHPA. The way you set it. Example: Php_value phpa.tweaks off Php_value phpa.cache_dir/tmp php_value phpa.file_perms the Php_value phpa.ignore_fi Les "/index.php,/a/test.php" # php_value Phpa.ignore_dirs "/data/www/site1/,/cache/" Php_value phpa.shm_size 8 Php_ Value Phpa.shm_key 0xc0deb00 php_value phpa.shm_perms 6,643, set php.ini Suppose we unpack the downloaded file to/usr/local/php, then add in php.ini Into: Zend_extension=/usr/local/php/php_accelerator_1.2p2.so and commented out the original Zend Optimization engine: # zend_extension=/usr/local/zend/lib/ze ndoptimizer.so Restart Apache, browse an arbitrary PHP page with your browser to see that the/TMP generates some files that begin with PHPA. Another way to check if the buffer is working is to look at the output of the phpinfo (), the original description of the Zend optimization engine, which has been shown as: This program makes use of the Zend Scripting Language engine : Zend Engine v1.1.1, Copyright (c) 1998-2001 Zend Technologies with the PHP Accelerator v1.2p2, Copyright (c) 2001-20 by Nick LINDRIDGE You need to note that the installation installation instructions on the method, where the. so file and the real. So files are different, so you need to be aware of this difference when installing. Four, adjust the buffer size PHP Accelerator provides buffer management commands: PHPA_CACHE_ADMIN-MV observe the buffer of the memory PHPA_CACHE_ADMIN-FV observe the buffering of the file Phpa_cache_admin -K Set buffer size Five, summarize the software provided by the INSTALL file elaborated on the performance of some statements, the author does not repeat here. It should be stated that Freelamp.com's article is not currently PHP architecture, but the forum system is PHP architecture, so the performance of the upgrade will only be the promotion of the Forum system.
http://www.bkjia.com/PHPjc/531792.html www.bkjia.com true http://www.bkjia.com/PHPjc/531792.html techarticle we know that Zend has a free optimization engine for PHP, but Freelamp is using a buffer product called PHP Accelerator. We are in the "LAMP acceleration" this article ...