IIS optimization - use eAccelerator to accelerate PHP

  

Earlier said to enable Gzip compression to reduce bandwidth consumption to speed up the website, today said Windows2003 server installation and setup tutorial — — IIS optimization second: use eAccelerator to improve PHP execution efficiency.

Let's talk about what eAccelerator is. It is a free and open source php accelerator, optimized and dynamic content caching, which improves the caching performance of performance php scripts, making PHP scripts compile and server overhead. Almost completely eliminated. It also optimizes the script to speed up its execution. Make your PHP program code efficiency 1-10 times, his official website address is http://eaccelerator.net.

Let's talk about the specific steps to enable eAccelerator:

  1. Determine the installed version of PHP. If you forget the installed version, you can use the phpinfo function to get it;
  2. Download the eAccelerator corresponding to the PHP version. Here, Juyou provides a compressed package that supports PHP version 5.2.0 to 5.2.8. Click here to download eAccelerator. If the PHP version you installed is not in the range, please go to the official website to download. .
  3. After downloading, select the corresponding eAccelerator version of PHP and extract it to the extension directory of php;
  4. Open the PHP configuration file php.ini under the windows installation directory, as shown below [Zend ] previously added eAccelerator configuration information; [eAccelerator] zend_extension_ts="D:\\PHP\\ext\\eAccelerator0953_5.2.8.dll" eaccelerator.shm_size="32" eaccelerator.cache_dir="D:\\PHP\\temp" 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" eaccelerator.keys = "shm" eaccelerator.sessions = " Shm"
  5. Save php.ini;
  6. Check the configuration of eAccelerator again: zend_extension_ts is eAccelerator file path, check whether the file exists; eaccelerator.shm_size is the memory size used by eAccelerator, modified according to requirements and server configuration, the unit is M; eaccelerator.cache_dir is the eAccelerator cache folder, to ensure that the directory has NTFS permissions The Users group is readable and writable; eaccelerator.enable is whether eAccelerator is enabled, 1 is yes, 0 is no; eaccelerator.optimizer is whether eAccelerator optimization is enabled, 1 is yes, 0 is no.
  7. Make eAccelerator and Zend Optimizer get along with each other. Add the following code at the bottom of php.ini: zend_optimizer.optimization_level=0 Use this line of code to achieve non-conflicting purposes
  8. Save php.ini again , restart IIS

    At this point, use eAccelerator to improve the efficiency of PHP execution.

Copyright © Windows knowledge All Rights Reserved