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
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
Speed of your PHP code by 1-10 times.
Eaccelerator is a fork of turckmmcache
I believe many of my friends know mmcache, but a long time ago, the developer was hired by Zend, so mmcache has never had an official new version... to support the latest php4.3.10 or php5.03, You need to compile the source code by yourself. For common users, it is no different from the rest of the world... don't be discouraged. We also have eaccelerator!
1. First, we download the compiled module.
Http://www.arnot.info/eaccelerator/
Select to download the eaccelerator corresponding to your system and PHP version
2. rename it as eaccelerator. DLL (WIN version) or eaccelerator. so (for Linux) is then moved to your PHP extention folder, and its path is defined in the PHP. ini
3. Depending on your system, there are generally two installation methods: Zend extension and PHP extension.
If it is the former, add it to your php. ini file.
Zend_extension = "/usr/lib/PhP4/eaccelerator. So" // The Path depends on your system. The file extension is the same, and the DLL is used in win system.
Eaccelerator. shm_size = "16"
Eaccelerator. cache_dir = "/tmp/eaccelerator" // you need to manually create
Eaccelerator. Enable = "1"
Eaccelerator. optimizer = "1"
Eaccelerator. check_mtime = "1"
Eaccelerator. DEBUG = "0"
Eaccelerator. Filter = ""
Eaccelerator. shm_max = "0"
Eaccelerator. shm_ttl = "0"
Eaccelerator. shm_prune_period = "0"
Eaccelerator. shm_only = "0"
Eaccelerator. Compress = "1"
Eaccelerator. compress_level = "9"
If security mode is enabled, it must be used. "zend_extension_ts" I replaces "zend_extension ".
PHP extension installation mode, please add in your php. ini
Extension = "eaccelerator. So" // The Path depends on your system. The file extension is the same. In Windows, the file extension is DLL.
Eaccelerator. shm_size = "16"
Eaccelerator. cache_dir = "/tmp/eaccelerator" // you need to manually create
Eaccelerator. Enable = "1"
Eaccelerator. optimizer = "1"
Eaccelerator. check_mtime = "1"
Eaccelerator. DEBUG = "0"
Eaccelerator. Filter = ""
Eaccelerator. shm_max = "0"
Eaccelerator. shm_ttl = "0"
Eaccelerator. shm_prune_period = "0"
Eaccelerator. shm_only = "0"
Eaccelerator. Compress = "1"
Eaccelerator. compress_level = "9"
The eaccelerator can be compatible with Zend, but the above Code is in PHP. INI must be prior to defining Zend-related code, and it is strongly recommended that, unless you must use Zend-related code, it is best not to use Zend and eaccelerator at the same time
After completing the above work, save PHP. ini and restart Apache to see if phpinfo is different? Then, let's see if PHP's execution time is much faster?