CDN Website accelerates php buffering by Php-accelerator website

Source: Internet
Author: User
http://php-accelerator.co.uk/can be downloaded and is a powerful opponent of Zend. is free of charge. I'm already using it. The effect is good.
Modify PHP.ini Plus:
Zend_extension =/usr/local/lib/php_accelerator_1.3.3r2.so
PHPA = On
Phpa.tweaks = On
Phpa.cache_dir =/tmp
Phpa.file_perms = 400
Phpa.cache_file_prune_period = 1h
Phpa.cache_file_ttl = 1d
Phpa.shm_size = 10
Phpa.shm_key = 0xc0deb00
Phpa.shm_perms = 666
Phpa.shm_user = Nobody
Phpa.shm_group = Nobody
Phpa.shm_release_at_exit = On
Phpa.shm_stats_check_period = 5m
Phpa.shm_ttl = 12h
Phpa.shm_max_processes = 512
PHPA.SHM_LOCK_THRESHOLD0 = 10
Apachectl graceful can be used. See its documentation for specific parameters.

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
Second, get the activation key and install:
www.php-accelerator.co.uk/activate.php
After registering your own server_name, you will get the following tips:
Your key for www.freelamp.com is 8edfd13946c96309244fcca309415902
Now your must set the key for www.freelamp.com in your site configuration.
For single domains not using virtual hosts
The key can is 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 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 in the php.ini (the default was on)
Php_value PHPA 1
</virtualhost>
The specific PHPA value settings, you can refer to the configuration files that are supplied with the software.
Since most Web sites are virtual host configurations, it is recommended to use Php_value PHPA. The way you set it.
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
Third, set php.ini
Suppose we unpack the downloaded file to/usr/local/php, then add it to the php.ini:
Zend_extension=/usr/local/php/php_accelerator_1.2p2.so
and comment out the original Zend optimization engine:
# zend_extension=/usr/local/zend/lib/zendoptimizer.so
To restart Apache, browse an arbitrary PHP page with your browser to see that some of the files beginning with PHPA are generated under/tmp. 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:
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-2002, by Nick Lindridge
It is important to note that there is a difference between the. so files and the actual. So files installed on the install installation instructions, so you need to be aware of this difference when installing.
Four, adjust the buffer size
The PHP Accelerator provides buffer management commands:
PHPA_CACHE_ADMIN-MV observe the buffer of memory
PHPA_CACHE_ADMIN-FV observing the buffering of files
Phpa_cache_admin-k Setting the buffer size
V. Summary
The INSTALL file provided by the software describes some of the performance statements, the author does not repeat here.
It should be explained 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

The above describes the CDN website to accelerate the Php-accelerator website accelerated php buffering method, including CDN site acceleration content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.