Free PHP buffer implementation method _ PHP Tutorial

Source: Internet
Author: User
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...

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.