Recommended Configuration on Windows systems

OpCache

Highly Recommended that you enable OpCache. This extension is included with PHP for Windows. It compiles and optimizes PHP scripts and caches them in memory so that they aren't compiled every time the page is loaded.

In your php.ini, set

Example #1 Recommended OpCache configuration

zend_extension=php_opcache.dll
opcache.enable=On
opcache.enable_cli=On
And restart your web server. For more info, see: OpCache Configuration

WinCache

Recommended that you use WinCache if using IIS, especially if in a shared web hosting environment or using networked file storage (NAS). All PHP Applications automatically benefit from WinCache's file cache feature. File system operations are cached in memory. WinCache also can cache user objects in memory and share them between php.exe or php-cgi.exe processes (share objects between requests). Many major web applications have a plugin or extension or configuration option to make use of the WinCache user object cache. If you need high performance, you should use the object cache in your applications. See: » http://pecl.php.net/package/WinCache to download a WinCache DLL (or tgz) to your PHP extensions directory (extensions_dir in your php.ini). In your php.ini, set

Example #2 Recommended WinCache configuration


extension=php_wincache.dll
wincache.fcenabled=1
wincache.ocenabled=1 ; removed as of wincache 2.0.0.0

For more info, see: » http://php.net/manual/en/wincache.configuration.php

IIS Configuration

In IIS Manager, Install FastCGI module and add a handler mapping for `.php` to the path to PHP-CGI.exe (not PHP.exe)

You may use the APPCMD command line tool to script IIS configuration.

Database

You'll probably need a Database Server. Popular databases provide PHP extensions to use them. If your web site doesn't get a lot of traffic, you can run your database server on the same server as your web server. Many popular database servers run on Windows.

PHP includes mysqli and pdo_mysql extensions. PHP 5.5 and 5.6 include mysql extension (deprecated in 7.0).

See » https://dev.mysql.com/downloads/windows/

add a note add a note

User Contributed Notes 1 note

up
4
paul dot lindgreen at msvu dot ca
6 years ago
Has anyone demonstrated in Windows/IIS a performance improvement regarding  opcache alone VS opcache/wincache used together? Is there any potential downside to using them both?
To Top