Free PHP buffer implementation method. Author: Xu permanent we know that Zend has a free optimization engine for PHP, but FreeLAMP uses a buffer product called PHPAccelerator this time. Our author in LAMP: Xu permanent
We know that Zend has a free optimization engine for PHP, but FreeLAMP uses a buffer product called PHP Accelerator this time.
We have explained several methods of acceleration in the article "LAMP acceleration", which mentions PHP Accelerator. its installation method is very simple, but it needs to get an activation key from its website.
1. download:
Http://www.php-accelerator.co.uk/download.php
2. obtain and install the activation key:
Http://www.php-accelerator.co.uk/activate.php
After registering your SERVER_NAME, you will receive the following prompt:
Your key for www.freelamp.com is 8edfd13946c96309244fcca309415902
Now you must set the key for www.freelamp.com in your site configuration.
For single domains not using virtual hosts
The key can be set in the php. ini file as follows:
# PHPA key for www.freelamp.com
#
Phpa. registration_key = 8edfd13946c96309244fcca309415902
For domains setup as a virtual host
Add the key to the domain specific section for your web server.
# Www.freelamp.com VHost entry
#
ServerName www.freelamp.com
#... (Other vhost specific config)
# Php settings
Php_value phpa. registration_key 8edfd13946c96309244fcca309415902
# Also enable phpa if set to off in the php. ini (the default is on)
Php_value phpa 1
For details about how to set the phpa value, refer to the CONFIGURATION file with the software.
Because most websites are configured as virtual hosts, we recommend that you use php_value phpa.
For example:
Php_value phpa. tweaks off
Php_value phpa. cache_dir/tmp
Php_value phpa. file_perms 400
Php_value phpa. ignore_files "/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 664
3. set php. ini
Suppose we unbind the downloaded file to/usr/local/php, then add the following to php. ini:
Zend_extension =/usr/local/php/php_accelerator_1.2p2.so
Comment out the original Zend optimization engine:
# Zend_extension =/usr/local/Zend/lib/ZendOptimizer. so
Author: Xu permanent we know that Zend has a free optimization engine for PHP, but FreeLAMP uses a buffer product called PHP Accelerator this time. We are working on LAMP and...