Microsoft launches new Wincache extension with fastcgi mode

Source: Internet
Author: User
Keywords Microsoft extension fastcgi mode Wincache
Tags accelerator activate aliyun application applications cache caching code

Microsoft has launched a new wincache extension with fastcgi mode, which is a significant increase in PHP application Http://www.aliyun.com/zixun/aggregation/32995.html "> PHP accelerator using speed in Windows environment. All PHP applications can take advantage of the acceleration provided by this extension without having to modify any code. All that is needed is to activate the extension and read it by the PHP engine. Contrary to Eaccelerator, Wincache requires the use of NTS (not thread-safe) versions of PHP and is therefore more suitable for use with fastcgi.

The Wincache extension includes three different kinds of cache usage, and the following will cover the three caches and the facilities they can provide.

php opcode Cache

PHP is a script-running engine that reads input data streams that contain text and PHP instructions, and then outputs another data stream that is typically in HTML format. This means that on a server, the PHP engine reads, parses, encodes, and executes a script whenever the network user needs it. This reading, parsing, and coding adds an extra burden to the server's CPU and file system, and therefore affects the overall operation of the PHP script. The PHP opcode cache is used to store encoded script bytecode in memory so that the PHP engine can be reused for subsequent operations on the same script.

• File Caching

In addition to using opcode caching, the PHP engine also needs to read script files from the file system. When a PHP script is stored in a remote UNC (Universal naming convention) file share, a significant action appears in the file operation. The Windows cache extension includes a file cache to store the contents of PHP script files in memory, which reduces the number of file operations for the PHP engine.

• Relative path caching

PHP scripts often refer to or use files accessed through relative paths. Each relative path must be converted into an absolute path by the PHP engine to be used. When a PHP application accesses a lot of PHP files through a relative path, the work of turning the relative path into an absolute path will have a negative impact on the operation of the application. The Windows cache extension provides a specific cache for relative paths, which can be stored to transform maps of relative paths to absolute paths, thereby reducing the total amount of conversion of relative paths.

Installation method:

This extension has two installation packages: one for 5.2.X versions of PHP and the other for PHP 5.3.X.
1. Open the installation package for your PHP version
2. Copy the Php_wincache.dll file to the PHP Extensions folder. Usually this folder is called "ext", and all the PHP binaries are in a folder. Like what:
"C:\Program Files\php\ext"
3. Open the php.ini file in a text editor with the same location. Like what:
"C:\Program Files\php\php.ini"
4. Add a line to the end of this document:
Extension=php_wincache.dll
5. Save and close php.ini.
6. Restart your server's application library to read configuration changes.

Configuration requirements:

This extension can only be run on the following configurations:

Windows version:
windows XP SP3 with IIS 5.1 and FastCGI Extension
Windows Server 2003 with IIS 6.0 and FastCGI Extension
windows Vista SP1 with IIS 7.0 and FastCGI Module
Windows Server 2008 with IIS 7.0 and FastCGI Module
windows 7 with IIS 7 and FastCGI Module
Windows Server 2008 R2 with IIS 7.0 and FastCGI Module

PHP Version:
php 5.2.X, non-thread-safe Build
PHP 5.3 X86, Non-thread-safe VC9 Build
Note: This extension can only be used when the server is running PHP through FASTCGI, and the version of PHP must be NTS (not thread safe).

You can download Wincache from the official website Http://www.iis.net/extensions/WinCacheForPHP.

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.