<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>RuslanY Blog &#187; WinCache</title>
	<atom:link href="http://ruslany.net/tag/wincache/feed/" rel="self" type="application/rss+xml" />
	<link>http://ruslany.net</link>
	<description>IIS, FastCGI, PHP and other interesting stuff</description>
	<lastBuildDate>Fri, 30 Jul 2010 23:07:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>WinCache Extension 1.1 for PHP &#8211; Release to Web</title>
		<link>http://ruslany.net/2010/06/wincache-extension-1-1-for-php-release-to-web/</link>
		<comments>http://ruslany.net/2010/06/wincache-extension-1-1-for-php-release-to-web/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 19:44:11 +0000</pubDate>
		<dc:creator>ruslany</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WinCache]]></category>
		<category><![CDATA[IIS News Item]]></category>

		<guid isPermaLink="false">http://ruslany.net/?p=784</guid>
		<description><![CDATA[Today IIS team has published the final release of WinCache Extension 1.1 for PHP. This is the latest stable and production ready version of the extension. The v1.1 has all the features available in version 1.0 plus the following features. User Cache API’s can be used by PHP scripts to store PHP objects and variables [...]]]></description>
			<content:encoded><![CDATA[<p>Today IIS team has published the final release of <a href="http://www.iis.net/download/wincacheforphp">WinCache Extension 1.1 for PHP</a>. This is the latest stable and production ready version of the extension. The v1.1 has all the features available in <a href="http://www.iis.net/download/wincacheforphp">version 1.0</a> plus the following features.</p>
<ul>
<li><strong><a href="http://docs.php.net/manual/en/ref.wincache.php">User Cache API’s</a></strong> can be used by PHP scripts to store PHP objects and variables in shared memory. This way PHP scripts may improve the execution speed by storing processed data in the cache and then using it in subsequent requests instead of re-creating the data on every request.</li>
<li><strong><a href="http://docs.php.net/manual/en/wincache.sessionhandler.php">WinCache Session Handler</a></strong> can be used to configure PHP to store the session data in shared memory cache. Using shared memory instead of the default file session storage helps improve performance of PHP applications that store large amount of data in session objects. The content of the WinCache session cache is persisted on disk so that it is not lost during IIS worker process recycling.</li>
<li><strong>File Change Notifications</strong> – the entries in the opcode and file caches are now updated as soon as the corresponding PHP files are modified on a file system. This is very useful for PHP applications that store its configuration in PHP files – for example Joomla!. Now the configuration changes for those applications take effect right away instead of a 30 seconds delay (default cache refresh interval).</li>
<li><a href="http://us3.php.net/manual/en/function.wincache-lock.php"><strong>Lock/Unlock API’s</strong></a> – these API’s can be used to obtain/release an exclusive lock on a key in the cache.</li>
</ul>
<h3>Install the Windows Cache Extension 1.1 for PHP – RTW</h3>
<p>To install the WinCache Extension 1.1 for PHP 5.2 and PHP 5.3, use the download links at the extension’s home page at <a href="http://www.iis.net/expand/WinCacheForPhp">http://www.iis.net/expand/WinCacheForPhp</a>.<span id="more-784"></span></p>
<p>The installation with Web Platform Installer is the easiest as it will automatically place the extension binary into proper location and will update the PHP configuration to enable the extension. Also, if you have the previous version of the extension installed, then Web PI will upgrade it. If you install any PHP application by using Web PI then the WinCache Extension 1.1 for PHP will be offered as an optional component.</p>
<p>If you install the extension manually, then follow the instructions at <a href="http://us2.php.net/manual/en/wincache.setup.php">Installing/Configuring WinCache for PHP</a>.</p>
<h3>Getting the extension source code</h3>
<p>The source code for the extension is available at <a href="http://pecl.php.net/package/WinCache/1.1.0stable">http://pecl.php.net/package/WinCache/1.1.0stable</a>. For the instructions on how to build the extension yourself refer to <a href="http://us2.php.net/manual/en/wincache.win32build.php">Building WinCache Extension</a>.</p>
<h3>Getting support</h3>
<p>The WinCache extension is not supported by Microsoft Product Support Services. Instead it is supported as any other community PHP extension via the forums, mailing lists and the PECL bugs database. Use the following resources:</p>
<ul>
<li>To get help with installation, configuration and usage – <a href="http://www.php.net/wincache/">WinCache documentation on php.net</a>;</li>
<li>To ask questions about the extension – <a href="http://forums.iis.net/1164.aspx">WinCache forum on iis.net</a>;</li>
<li>To report a bug in the extension – <a href="http://pecl.php.net/bugs/">PECL bug tracking system</a>.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://ruslany.net/2010/06/wincache-extension-1-1-for-php-release-to-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WinCache Extension 1.1 for PHP &#8211; Beta 2</title>
		<link>http://ruslany.net/2010/04/wincache-extension-1-1-for-php-beta-2/</link>
		<comments>http://ruslany.net/2010/04/wincache-extension-1-1-for-php-beta-2/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 18:03:01 +0000</pubDate>
		<dc:creator>ruslany</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WinCache]]></category>
		<category><![CDATA[IIS News Item]]></category>

		<guid isPermaLink="false">http://ruslany.net/?p=755</guid>
		<description><![CDATA[Today IIS team has published a second beta of WinCache 1.1, which has the following new features and improvements : File Change Notifications &#8211; the entries in the opcode and file caches are now updated as soon as the corresponding PHP files are modified on a file system. This is very useful for PHP applications [...]]]></description>
			<content:encoded><![CDATA[<p>Today IIS team has published a <a href="http://www.iis.net/download/WinCacheForPhp">second beta of WinCache 1.1</a>, which has the following new features and improvements :</p>
<ul>
<li><strong>File Change Notifications</strong> &#8211; the entries in the opcode and file caches are now updated as soon as the corresponding PHP files are modified on a file system. This is very useful for PHP applications that store its configuration in PHP files – for example Joomla!. Now the configuration changes for those applications take effect right away instead of a 30 seconds delay (default cache refresh interval);</li>
<li><a href="http://docs.php.net/manual/en/wincache.sessionhandler.php"><strong>Persistent Session Handler</strong></a> &#8211; the content of the WinCache session cache is persisted on disk so that it is not lost during IIS worker process recycling.</li>
<li><a href="http://us3.php.net/manual/en/function.wincache-lock.php"><strong>Lock/Unlock API’s</strong></a> – these API’s can be used to obtain/release an exclusive lock on a key in the cache.</li>
</ul>
<p>The beta builds of the extension can be downloaded and installed from the extension home page at: <a href="http://www.iis.net/expand/wincacheforphp">http://www.iis.net/expand/wincacheforphp</a> (look for the “<strong>WinCache 1.1 – Beta 2</strong>” section there). The source code can be obtained from <a title="http://pecl.php.net/package/WinCache/1.1.0beta2" href="http://pecl.php.net/package/WinCache/1.1.0beta2">http://pecl.php.net/package/WinCache/1.1.0beta2</a>. The documentation for the extension can be found on <a href="http://www.php.net/manual/en/book.wincache.php">PHP.NET WinCache documentation</a>.</p>
<p>To learn how to change popular PHP applications to use WinCache 1.1 features refer to the following:</p>
<ul>
<li><a href="http://blogs.iis.net/donraman/archive/2010/03/05/performance-improvement-in-joomla-using-wincache-user-cache.aspx">Performance Improvement in Joomla using WINCACHE user cache</a></li>
<li><a href="http://blogs.iis.net/donraman/archive/2010/03/15/performance-improvements-in-drupal-with-wincache-user-cache.aspx">Performance Improvement in Drupal using WINCACHE user cache</a></li>
<li><a href="http://ruslany.net/2010/03/make-wordpress-faster-on-iis-with-wincache-1-1/">Make WordPress faster on IIS with Wincache 1.1</a></li>
</ul>
<p>This is the beta release and the WinCache team is looking for your feedback on new features and functionality. Use the <a href="http://forums.iis.net/1164.aspx">WinCache Community Forum</a> to ask questions about the extension, report bugs and problems and to suggest features and improvements.</p>
]]></content:encoded>
			<wfw:commentRss>http://ruslany.net/2010/04/wincache-extension-1-1-for-php-beta-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slides and Questions from PHP on Windows Webcast</title>
		<link>http://ruslany.net/2010/04/slides-and-questions-from-php-on-windows-webcast/</link>
		<comments>http://ruslany.net/2010/04/slides-and-questions-from-php-on-windows-webcast/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 19:11:56 +0000</pubDate>
		<dc:creator>ruslany</dc:creator>
				<category><![CDATA[FastCGI]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WinCache]]></category>

		<guid isPermaLink="false">http://ruslany.net/?p=737</guid>
		<description><![CDATA[On April 9, Mark Brown and I did a PHP&#124;Architect webcast “PHP Performance On Windows”. The slides from the presentation have been published at the following link: PHP Performance on Windows – slides There were a number of question at the end of the webcast that we did not get to answer due to lack [...]]]></description>
			<content:encoded><![CDATA[<p>On April 9, <a href="http://blogs.msdn.com/markbrown/">Mark Brown</a> and I did a PHP|Architect webcast “PHP Performance On Windows”. The slides from the presentation have been published at the following link:</p>
<p><a href="http://www.slideshare.net/ruslany/php-performance-on-windows">PHP Performance on Windows – slides</a></p>
<p>There were a number of question at the end of the webcast that we did not get to answer due to lack of time. This blog post provides answers to those questions.<span id="more-737"></span></p>
<p><strong>Q: Why is php_mssql.dll removed from php 5.3.2?<br />
</strong>A: The reason why it was removed was because of an incompatible driver. The last SDK supported by Microsoft was not compatible anymore with VC6. Anyway, php_mssql.dll is not recommended to be used with SQL Server because there is a SQL Driver for PHP that is officially supported by Microsoft. You can get more information about the driver at <a href="http://blogs.iis.net/donraman/archive/2010/01/25/working-with-microsoft-sql-server-driver-php-sqlsrv-dll-for-php-on-windows.aspx">Working with Microsoft SQL Server driver (php_sqlsrv.dll) for PHP on Windows</a>.</p>
<p><strong>Q: How can we have .htaccess file features work on IIS? Is there an alternative?<br />
</strong>A: There are several options. If you just want Apache mod_rewrite rules to work on IIS, then you can <a href="http://learn.iis.net/page.aspx/470/import-apache-modrewrite-rules/">import them from a .htaccess file</a>. If you want complete support for all .htaccess features then you can try <a href="http://www.helicontech.com/ape/">Helicon Ape</a> from HeliconTech. Regarding PHP specific features in .htaccess file &#8211; for PHP 5.2 you could use htscanner PECL extension. In PHP 5.3 there is a new feature for <a href="http://ruslany.net/2009/07/per-site-php-configuration-with-php-5-3-and-iis/">per directory PHP configuration and .user.ini files</a>.</p>
<p><strong>Q: Do you have any numbers to compare iis performance with other web servers(apache, nginx, lighttpd)?<br />
</strong>A: No, we do not have any numbers that can be shared. It’s difficult to come up with an objective test that compares web server technologies – there are too many variables and interpretations of the results and even if Microsoft ever produced such numbers they would probably cause a lot of controversy over the objectivity of those tests.</p>
<p><strong>Q: Do you plan to implement wincache library for Zend Framework(Zend_Cache)?<br />
</strong>A: WinCache team does not have plans for that, but there is already a PHP developer who is working on implementing this: <a href="http://github.com/juokaz/wincache">http://github.com/juokaz/wincache</a>.</p>
<p><strong>Q: We have discussed here sugar CRM. Is Microsoft planning to do enhancement in sugar CRM functionality?</strong><br />
A: Microsoft works well with Sugar CRM development team and Sugar CRM add enhancements to their future versions to support new features from Microsoft, such as WinCache user and session cache for example. Microsoft, however does not contribute any code and does not work directly on any enhancements to Sugar CRM.</p>
<p><strong>Q: Is Microsoft planning to develop any dll which can make PHP code to Intermediate language?</strong><br />
A: Assuming that the question is about .NET intermediate language &#8211; no, there are no plans for this.</p>
<p><strong>Q: Would there be any tool in Microsoft development tool kit for PHP?<br />
</strong>A: There are several projects in Microsoft that provide development tools and instructions for enabling interoperability between PHP and other Microsoft technologies. You can find more details about those projects here: <a href="http://www.interoperabilitybridges.com/">http://www.interoperabilitybridges.com/</a>.</p>
<p><strong>Q: Is WinCache shared data accessible for CLI? Script A launches Script B, C and D &#8230; ?<br />
</strong>A: Yes, you can access the shared data from CLI as long as you set wincache.enablecli = 1 in php.ini and all the CLI processes have the same parent process.</p>
<p><strong>Q: Are the statistics results of WinCache the same in 5.2.13 as in 5.3?<br />
</strong>A: If the question is about wincache.php statistics script then yes – the data presented by that script is the same regardless of the PHP version.</p>
<p><strong>Q: Are there any security concerns with having wincache store session data in shared memory?</strong><br />
A: If you use different IIS application pools for different web sites (which is the recommended configuration), then WinCache ensures that those web sites can not access each other’s cache data. All caches, not just the session cache are not shared across IIS application pools.</p>
<p><strong>Q: Is it safe to write to the user cache assuming data disappears from the system after the cache times out? Is the content of the user cache in wincache 1.1 written to disk at all?<br />
</strong>A: Normally the data in the user cache is deleted from the cache after the time to live interval, but the deletion happens on the main request processing thread. This means that if there are no requests to process, the entries in the cache may stay longer than the TTL. WinCache does not write user cache content to disk, but if memory pagefile is enabled on the server, then it may happen that the memory content will be stored by OS in a pagefile. If a maching (not just a process) crashes when user cache content is in the pagefile, then the content may be present on disk.</p>
<p><strong>Q: Is the sqlsrv driver going to be compatible with PDO?<br />
</strong>A: <a href="http://blogs.msdn.com/interoperability/archive/2010/04/19/sql-server-driver-for-php-2-0-ctp-adds-php-s-pdo-style-data-access-for-sql-server.aspx">SQL Driver for PHP 2.0</a> will include PDO support.</p>
<p><strong>Q: Is there any documentation on securely configuring php/FastCGI in a shared application pool environment on IIS6 so that websites?<br />
</strong>A: Check the article about <a href="http://www.php.net/manual/en/install.windows.iis6.php">setting up PHP on IIS6</a> and look for the section called “Impersonation and file system access”. If this is not what you are looking for – let me know.</p>
<p><strong>Q: When are we going to see PHP 5.3 in the WPI?<br />
</strong>A: Web PI team is planning to add support for PHP 5.3 in near future. Most probably it will be possible to select which version of PHP to install from Web PI. This is because there are some PHP applications in Web PI that will never support PHP 5.3.</p>
<p>Thanks to all who has attended the webcast and asked interesting questions!</p>
]]></content:encoded>
			<wfw:commentRss>http://ruslany.net/2010/04/slides-and-questions-from-php-on-windows-webcast/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Make WordPress faster on IIS with WinCache 1.1</title>
		<link>http://ruslany.net/2010/03/make-wordpress-faster-on-iis-with-wincache-1-1/</link>
		<comments>http://ruslany.net/2010/03/make-wordpress-faster-on-iis-with-wincache-1-1/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 00:12:42 +0000</pubDate>
		<dc:creator>ruslany</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WinCache]]></category>

		<guid isPermaLink="false">http://ruslany.net/?p=673</guid>
		<description><![CDATA[This post explains how to improve performance of WordPress on Windows by using the WinCache Extension 1.1 – Beta for PHP. You probably already know that just by enabling the WinCache extension and without any code changes it is possible to get a significant increase in WordPress performance – this is described in details in [...]]]></description>
			<content:encoded><![CDATA[<p>This post explains how to improve performance of WordPress on Windows by using the WinCache Extension 1.1 – Beta for PHP. You probably already know that just by enabling the WinCache extension and without any code changes it is possible to get a significant increase in WordPress performance – this is described in details in <a href="http://techportal.ibuildings.com/2009/11/19/php-on-windows-the-wincache-1-0-benchmark/">PHP on Windows: The WinCache 1.0 Benchmark</a>. But this can be taken even further by using the <a href="http://www.php.net/manual/en/ref.wincache.php">user cache API’s</a> available in WinCache 1.1 release.<span id="more-673"></span></p>
<p>To configure WordPress to use WinCache user cache API’s copy the following code and put it in the file named <strong>object-cache.php</strong> located at the <strong>/wp-content/</strong> directory of your WordPress site. Note that this code was copied from <a href="http://txfx.net/files/wordpress/apc-object-cache.phps">here</a> and the only change was to replace all the APC cache function with corresponding WinCache functions.</p>
<pre name="code" class="php">
&lt;?php

/*
Name: WinCache Cache
Description: WinCache backend for the WP Object Cache.
Version: 0.1
URI: http://ruslany.net/
Author: Ruslan Yakushev

Install this file to wp-content/object-cache.php

Big thanks to Mark Jaquith (http://markjaquith.wordpress.com/)
whose apc-object-cache.php was used as a basis for this code.
*/

// gracefully revert to default cache if WinCache is not installed
if ( !extension_loaded(&#039;wincache&#039;) ||
      !function_exists(&#039;wincache_ucache_get&#039;) ||
      strcmp(ini_get(&#039;wincache.ucenabled&#039;), &quot;1&quot;) )  {
 include_once(ABSPATH . WPINC . &#039;/cache.php&#039;);
} else {

function wp_cache_add($key, $data, $flag = &#039;&#039;, $expire = 0) {
  global $wp_object_cache;
  return $wp_object_cache-&gt;add($key, $data, $flag, $expire);
}

function wp_cache_close() {
  return true;
}

function wp_cache_delete($id, $flag = &#039;&#039;) {
  global $wp_object_cache;
  return $wp_object_cache-&gt;delete($id, $flag);
}

function wp_cache_flush() {
  global $wp_object_cache;

  return $wp_object_cache-&gt;flush();
}

function wp_cache_get($id, $flag = &#039;&#039;) {
  global $wp_object_cache;
  return $wp_object_cache-&gt;get($id, $flag);
}

function wp_cache_init() {
  global $wp_object_cache;
  $wp_object_cache = new WP_Object_Cache();
}

function wp_cache_replace($key, $data, $flag = &#039;&#039;, $expire = 0) {
  global $wp_object_cache;
  return $wp_object_cache-&gt;replace($key, $data, $flag, $expire);
}

function wp_cache_set($key, $data, $flag = &#039;&#039;, $expire = 0) {
  global $wp_object_cache;
  return $wp_object_cache-&gt;set($key, $data, $flag, $expire);
}

class WP_Object_Cache {
  var $global_groups = array (&#039;users&#039;, &#039;userlogins&#039;, &#039;usermeta&#039;);
  var $cache = array ();

  function add($id, $data, $group = &#039;default&#039;, $expire = 0) {
    return $this-&gt;set($id, $data, $group, $expire);
  }

  function delete($id, $group = &#039;default&#039;) {
    $key = $this-&gt;key($id, $group);
    $result = wincache_ucache_delete($key);
    if ( false !== $result )
      unset($this-&gt;cache[$key]);
    return $result;
  }

  function flush() {
    wincache_ucache_clear();
    return true;
  }

  function get($id, $group = &#039;default&#039;) {
    $key = $this-&gt;key($id, $group);
     if ( isset($this-&gt;cache[$key]) )
      $value = $this-&gt;cache[$key];
    else
      $value = wincache_ucache_get($key);
    /* echo &quot;Cache key: $key&lt;br/&gt;&quot;;
    echo &#039;Cache value:&lt;br/&gt;&#039;;
    var_dump($value);
    echo &#039;&lt;br/&gt;&#039;; */
    if ( NULL === $value )
      $value = false;
    $this-&gt;cache[$key] = $value;
    return $value;
  }

  function key($key, $group) {
    global $blog_id;
    if ( empty($group) )
      $group = &#039;default&#039;;
    if (false !== array_search($group, $this-&gt;global_groups))
      $prefix = &#039;&#039;;
    else
      $prefix = $blog_id . &#039;:&#039;;
    return md5(ABSPATH . &quot;$prefix$group:$key&quot;);
  }

  function replace($id, $data, $group = &#039;default&#039;, $expire = 0) {
    return $this-&gt;set($id, $data, $group, $expire);
  }

  function set($id, $data, $group = &#039;default&#039;, $expire = 0) {
    $key = $this-&gt;key($id, $group);
    $result = wincache_ucache_set($key, $data, $expire);
    if ( false !== $result )
      $this-&gt;cache[$key] = $data;
    return $result;
  }

  function stats() {
    $wincache_info = wincache_ucache_info();
    echo &quot;&lt;p&gt;\n&quot;;
    echo &quot;&lt;strong&gt;Cache Hits:&lt;/strong&gt; {$wincache_info[&#039;total_hit_count&#039;]}&lt;br/&gt;\n&quot;;
    echo &quot;&lt;strong&gt;Cache Misses:&lt;/strong&gt; {$wincache_info[&#039;total_miss_count&#039;]}&lt;br/&gt;\n&quot;;
    echo &quot;&lt;/p&gt;\n&quot;;
    if ( ! empty($this-&gt;cache) ) {
      echo &quot;&lt;pre&gt;\n&quot;;
      print_r($this-&gt;cache);
      echo &quot;&lt;/pre&gt;\n&quot;;
    }
  }

  function WP_Object_Cache() {
   // Nothing here
  }
 }
}
?&gt;
</pre>
<p>You can also download the code by using the link below:</p>
<p><a href="http://ruslany.net/download/object-cache.zip" title="Version 0.1 downloaded 181 times" >Object Cache for WordPress</a></p>
<p>Make sure that the code is saved in a file called <strong>object-cache.php</strong> inside of the <strong>/wp-content/</strong> directory.</p>
<p>That should be all you need to do. To verify that the WordPress is actually using the object cache use the <a href="http://www.php.net/manual/en/wincache.stats.php">WinCache Statistics Script</a> and check the “<strong>User and Session Cache</strong>” page:</p>
<p><a href="http://ruslany.net/wp-content/uploads/2010/03/WinCache_UserCache.png"><img class="alignnone size-medium wp-image-680 screenshot" title="WinCache-UserCache" src="http://ruslany.net/wp-content/uploads/2010/03/WinCache_UserCache-500x390.png" alt="" width="500" height="390" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://ruslany.net/2010/03/make-wordpress-faster-on-iis-with-wincache-1-1/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>More Performance Improvements in WinCache 1.1</title>
		<link>http://ruslany.net/2010/03/more-performance-improvements-in-wincache-1-1-beta/</link>
		<comments>http://ruslany.net/2010/03/more-performance-improvements-in-wincache-1-1-beta/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 09:10:19 +0000</pubDate>
		<dc:creator>ruslany</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[IIS News Item]]></category>
		<category><![CDATA[WinCache]]></category>

		<guid isPermaLink="false">http://ruslany.net/?p=660</guid>
		<description><![CDATA[Since the WinCache Extension for PHP has been released last year it has been widely deployed by customers who run PHP on Windows OS and it has proven to provide a substantial performance boost for PHP applications hosted on Windows-based web servers. Today IIS team has published a beta of WinCache 1.1, which provides more [...]]]></description>
			<content:encoded><![CDATA[<p>Since the <a href="http://www.iis.net/expand/wincacheforphp">WinCache Extension for PHP</a> has been released last year it has been widely deployed by customers who run PHP on Windows OS and it has proven to provide a substantial performance boost for PHP applications hosted on Windows-based web servers.</p>
<p>Today IIS team has published a beta of WinCache 1.1, which provides more options for improving performance of PHP applications on Windows. Specifically, the new version includes :</p>
<ul>
<li><strong><a href="http://docs.php.net/manual/en/ref.wincache.php">User Cache API’s</a></strong>, that can be used by PHP scripts to store PHP objects and variables in shared memory. This way PHP scripts may improve the execution speed by storing processed data in the cache and then using it in subsequent requests instead of re-creating the data on every request. The addition of these API&#8217;s closes the remaining feature gap that WinCache had when compared with other similar caching solutions like APC and XCache.</li>
<li><strong><a href="http://docs.php.net/manual/en/wincache.sessionhandler.php">WinCache Session Handler</a></strong>, that can be used to configure PHP to store the session data in shared memory cache. Using shared memory instead of the default file session storage helps improve performance of PHP applications that store large amount of data in session objects.</li>
</ul>
<p>The beta builds of the extension can be downloaded and installed from the extension home page at: <a href="http://www.iis.net/expand/wincacheforphp">http://www.iis.net/expand/wincacheforphp</a> (look for the “<strong>WinCache 1.1 – Beta</strong>” section there). The source code can be obtained from <a href="http://pecl.php.net/package/WinCache/1.1.0">http://pecl.php.net/package/WinCache/1.1.0</a>. The documentation for the extension can be found on <a href="http://www.php.net/manual/en/book.wincache.php">PHP.NET WinCache documentation</a>.</p>
<p>This is the beta release and the WinCache team is looking for your feedback on new features and functionality. Use the <a href="http://forums.iis.net/1164.aspx">WinCache Community Forum</a> to ask questions about the extension, report bugs and problems and to suggest features and improvements.</p>
]]></content:encoded>
			<wfw:commentRss>http://ruslany.net/2010/03/more-performance-improvements-in-wincache-1-1-beta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WinCache Extension 1.0.1 &#8211; Servicing Release</title>
		<link>http://ruslany.net/2010/01/wincache-extension-1-0-1-servicing-release/</link>
		<comments>http://ruslany.net/2010/01/wincache-extension-1-0-1-servicing-release/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 22:39:41 +0000</pubDate>
		<dc:creator>ruslany</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[IIS News Item]]></category>
		<category><![CDATA[WinCache]]></category>

		<guid isPermaLink="false">http://ruslany.net/?p=643</guid>
		<description><![CDATA[The new release of WinCache Extension for PHP - version 1.0.1 &#8211; is available for download. This is a servicing release that has fixes for bugs reported in v1.0. In particular the following fixes and changes have been made in this release: Fixed require_once on PHP5.3. If the files were absolute and similar files were included [...]]]></description>
			<content:encoded><![CDATA[<p>The new release of WinCache Extension for PHP - version 1.0.1 &#8211; is available for <a href="http://www.iis.net/expand/wincacheforphp">download</a>. This is a servicing release that has fixes for bugs reported in v1.0. In particular the following fixes and changes have been made in this release:</p>
<ul>
<li>
<div>Fixed require_once on PHP5.3. If the files were absolute and similar files were included in different case, require_once was including it twice.</div>
</li>
<li>
<div>Changed relative path cache to act as resolve path cache. Incremented refcounts under aplist lock. Did comparison using InterlockedCompareExchange.</div>
</li>
<li>
<div>Fixed crashes which were happening because aplist refcount and opcode cache refcount can get out of sync due to local cache.</div>
</li>
<li>
<div>Exposed is_local_cache property from ocache_fileinfo and fcache_fileinfo. Stats page will use this to indicate when local opcode data is shown.</div>
</li>
<li>
<div>Updated the wincache.php to pass chart data on query string to ensure that the charts show the same data that is displayed in tables</div>
</li>
<li>
<div>Updated the wincache.php to show whether information about a global or local cache instance is being displayed</div>
</li>
<li>
<div>Changed variable names and comments to indicate rplist is resolve path cache and not just relative path cache</div>
</li>
<li>
<div>Changed wincache.php to use resolve_path instead of relative_path</div>
</li>
</ul>
<p>The new release is available for download from the extension&#8217;s home page at: <a href="http://www.iis.net/expand/wincacheforphp">http://www.iis.net/expand/wincacheforphp</a>. The source code for the extension is available on PHP PECL page here: <a href="http://pecl.php.net/package/WinCache/1.0.1">http://pecl.php.net/package/WinCache/1.0.1</a>. The documenation for the extension can be found at <a href="http://www.php.net/manual/en/book.wincache.php">http://www.php.net/manual/en/book.wincache.php</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ruslany.net/2010/01/wincache-extension-1-0-1-servicing-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WinCache Extension 1.0 for PHP &#8211; Release to Web</title>
		<link>http://ruslany.net/2009/11/wincache-extension-1-0-for-php-release-to-web/</link>
		<comments>http://ruslany.net/2009/11/wincache-extension-1-0-for-php-release-to-web/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 19:01:05 +0000</pubDate>
		<dc:creator>ruslany</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[WinCache]]></category>

		<guid isPermaLink="false">http://ruslany.net/?p=605</guid>
		<description><![CDATA[The Windows Cache Extension 1.0 for PHP &#8211; RTW is available for download. This is a final, production-ready release that is provided under an open source BSD license with the source code hosted and maintained on http://pecl.php.net/packages/wincache/. Install the Windows Cache Extension 1.0 for PHP &#8211; RTW To install the Windows Cache Extension for PHP [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.iis.net/extensions/wincacheforphp">Windows Cache Extension 1.0 for PHP</a> &#8211; RTW is available for download. This is a final, production-ready release that is provided under an open source <a href="http://www.opensource.org/licenses/bsd-license.php">BSD license</a> with the source code hosted and maintained on <a href="http://pecl.php.net/packages/wincache/">http://pecl.php.net/packages/wincache/</a>.</p>
<h3>Install the Windows Cache Extension 1.0 for PHP &#8211; RTW</h3>
<p>To install the Windows Cache Extension for PHP 5.2 and PHP 5.3, use the download links at the extension&#8217;s home page at <a href="http://www.iis.net/expand/WinCacheForPhp">http://www.iis.net/expand/WinCacheForPhp</a>.</p>
<p>The installation with Web Platform Installer is the easiest as it will automatically place the extension binary into proper location and will update the PHP configuration to enable the extension. Also, if you have the beta or RC release of the extension installed, then Web PI will upgrade it. If you install any PHP application by using Web PI then the Windows Cache Extension for PHP will be offered as an optional component.<span id="more-605"></span></p>
<p>If you install the extension manually, then follow the instructions at <a href="http://us2.php.net/manual/en/wincache.setup.php">Installing/Configuring WinCache for PHP</a>.</p>
<p><strong>Note:</strong></p>
<ul>
<li>The extension can only be used with non-thread-safe builds of PHP</li>
<li>The extension can only be used when IIS is configured to run PHP via FastCGI</li>
<li>The Windows Cache Extension 1.0 for PHP 5.3 can only be used with the x86 VC9 build of PHP 5.3.</li>
</ul>
<h3>Getting support</h3>
<p>The WinCache extension is not supported by Microsoft Product Support Services. Instead it is supported as any other community PHP extension via the forums, mailing lists and the PECL bugs database. Use the following resources:</p>
<ul>
<li>To get help with installation, configuration and usage &#8211; <a href="http://www.php.net/wincache/">WinCache documentation on php.net</a>;</li>
<li>To ask questions about the extension &#8211; <a href="http://forums.iis.net/1164.aspx">WinCache forum on iis.net</a>;</li>
<li>To report a bug in the extension &#8211; <a href="http://pecl.php.net/bugs/">PECL bug tracking system</a>.</li>
</ul>
<h3>Getting the extension source code</h3>
<p>The source code for the extension is available at <a href="http://pecl.php.net/package/wincache/">http://pecl.php.net/package/wincache/</a>. For the instructions on how to build the extension yourself refer to <a href="http://us2.php.net/manual/en/wincache.win32build.php">Building WinCache Extension</a>.</p>
<h3>Bug fixes and changes since the RC release:</h3>
<p>Here is the list of changes and bug fixes that have been made since the RC release of WinCache. For the complete list of WinCache features and configuration options refer to the <a href="http://www.php.net/wincache">WinCache documentation</a>:</p>
<ul>
<li>Added new INI directive <strong><a href="http://us2.php.net/manual/en/wincache.configuration.php#ini.wincache.fcenabledfilter">wincache.fcenabledfilter</a></strong> that can be used to turn on/off file cache for individual IIS sites.</li>
<li>Fixed a bug that caused include_once() function to load file twice because relative file path was case insensitive.</li>
<li>Changed cache size default values. Default size of file cache is 32 MB and opcode cache is 96 MB.</li>
<li>Changed minimum and maximum values of file cache size and opcode cache size.</li>
<li>Added an auto adjustment of the opcode cache size to ensure it is at least 3 times bigger than file cache size.</li>
<li>Fixed several bugs in cache scavenger logic that caused access violations and crashes in php-cgi.exe processes.</li>
<li>Fixed a bug in exception handling that caused php-cgi.exe process to crash.</li>
<li>Modified the charts in wincache.php to display the numbers rounded to 2 digits after decimal point.</li>
<li>Fixed the wincache.php authenticaiton logic to not conflict with IIS built-in authentication.</li>
<li>Added memory usage pie charts to wincache.php file.</li>
<li>Updated the wincache.php to show a warning if opcode cache size is too small and it has been automatically increased.</li>
<li>wincache.php will now display entries in opcode cache, file cache and relative path cache in lexicographical sorted way.</li>
</ul>
<h3>Thanks!</h3>
<p>WinCache Team thanks all of you who have installed and tried early releases of WinCache extension and provided us with feedback, bug reports and feature suggestions through the <a href="http://forums.iis.net/1164.aspx">Windows Cache Extension for PHP Forum</a>. Your involvement throughout the release process has been very valuable to us and really helped us make this a great release!</p>
]]></content:encoded>
			<wfw:commentRss>http://ruslany.net/2009/11/wincache-extension-1-0-for-php-release-to-web/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Windows Cache Extension 1.0 for PHP &#8211; RC</title>
		<link>http://ruslany.net/2009/10/windows-cache-extension-1-0-for-php-rc/</link>
		<comments>http://ruslany.net/2009/10/windows-cache-extension-1-0-for-php-rc/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 05:45:47 +0000</pubDate>
		<dc:creator>ruslany</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[IIS News Item]]></category>
		<category><![CDATA[WinCache]]></category>

		<guid isPermaLink="false">http://ruslany.net/?p=576</guid>
		<description><![CDATA[The Windows Cache Extension 1.0 for PHP &#8211; Release Candidate is available for download. The release contains functionality and stability improvements and it is believed to have the quality level suitable for production deployments. Install the Windows Cache Extension 1.0 for PHP &#8211; RC To install the Windows Cache Extension for PHP 5.2 and PHP [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.iis.net/extensions/wincacheforphp">Windows Cache Extension 1.0 for PHP</a> &#8211; Release Candidate is available for download. The release contains functionality and stability improvements and it is believed to have the quality level suitable for production deployments.</p>
<h3>Install the Windows Cache Extension 1.0 for PHP &#8211; RC</h3>
<p>To install the Windows Cache Extension for PHP 5.2 and PHP 5.3, use the download links at the extension&#8217;s home page at <a href="http://www.iis.net/extensions/wincacheforphp">http://www.iis.net/extensions/wincacheforphp</a>.</p>
<p>The installation with Web Platform Installer is the easiest as it will automatically place the extension binary into proper location and will update the PHP configuration to enable the extension. Also, if you have the beta release of the extension installed, then Web PI will upgrade it. If you install any PHP application by using Web PI then the Windows Cache Extension for PHP &#8211; RC will be offered as an optional component.</p>
<p>If you install the extension manually, then follow the instructions at &#8220;<a href="http://learn.iis.net/page.aspx/678/using-windows-cache-extension-for-php/">Using Windows Cache Extension for PHP</a>&#8220;.<span id="more-576"></span></p>
<p><strong>Note:</strong></p>
<ul>
<li>The extension can only be used with non-thread-safe builds of PHP</li>
<li>The extension can only be used when IIS is configured to run PHP via FastCGI</li>
<li>The Windows Cache Extension 1.0 for PHP 5.3 can only be used with the x86 VC9 build of PHP 5.3.</li>
</ul>
<h3>Changes since the beta release</h3>
<p>Here are the features that are new since the beta release (for complete list of bug fixes and features since the beta release refer to the <a href="http://blogs.iis.net/ksingla/archive/2009/10/05/feature-additions-and-bug-fixes-coming-up-in-wincache.aspx">blog post</a> by the WinCache developer Kanwaljeet Singla):</p>
<ul>
<li><a href="http://learn.iis.net/page.aspx/678/using-windows-cache-extension-for-php/#Extension_Functions"><strong>New API to refresh the cached files</strong></a>. If your PHP application updates some PHP files (for example files with configuration settings or template files) and then needs to load those files on a next request then this API can be used to refresh the cache for those files.</li>
<li><a href="http://learn.iis.net/page.aspx/678/using-windows-cache-extension-for-php/#Configuration_settings"><strong>Disabling the file change checking</strong></a>. The Windows Cache Extension periodically checks if the cached files have been changed on a file system. By default the check happens every 30 seconds. If you do not expect the PHP files for your application to ever change then you can disable this check.</li>
<li><a href="http://learn.iis.net/page.aspx/678/using-windows-cache-extension-for-php/#Configuration_settings"><strong>Enabling or disabling the opcode cache on a per-site basis</strong></a>. The new configuration setting <em>wincache.ocenabledfilter</em> can be used in conjunction with <em>wincache.ocenabled</em> to specify a comma-separated list of IIS web site identifiers that should have the opcode caching enabled or disabled.</li>
<li><a href="http://learn.iis.net/page.aspx/678/using-windows-cache-extension-for-php/#Configuration_settings"><strong>Disabling the cache when PHP is run in command line mode</strong></a>. By default the cache will be disabled when PHP scripts are executed in a command line mode (CLI). If necessary the cache can be turned on by using the configuration setting <em>wincache.enablecli</em>.</li>
<li><a href="http://learn.iis.net/page.aspx/678/using-windows-cache-extension-for-php/#Example_1:_Obtaining_cache_information"><strong>Total cache uptime information</strong></a>. The API&#8217;s <em>wincache_fcache_fileinfo() </em>and <em>wincache_ocache_fileinfo()</em> now also report the total cache uptime.</li>
<li><a href="http://learn.iis.net/page.aspx/678/using-windows-cache-extension-for-php/#Using_Windows_Cache_for_PHP_Statistics_Script_"><strong>Cache statistics web page</strong></a>. The RC installation package includes a PHP script that can be used to get the cache statistics.<br />
<a href="http://ruslany.net/wp-content/uploads/2009/10/WincachePHP.png"><img class="alignnone size-medium wp-image-578 screenshot" title="WinCache Statistics Script" src="http://ruslany.net/wp-content/uploads/2009/10/WincachePHP-500x441.png" alt="WinCache Statistics Script" width="500" height="441" /></a></li>
</ul>
<h3>More information</h3>
<ul>
<li><a href="http://www.iis.net/extensions/WinCacheForPHP" target="_blank">Windows Cache Extension for PHP on IIS.NET</a></li>
<li><a href="http://learn.iis.net/page.aspx/678/using-windows-cache-extension-for-php/" target="_blank">Using Windows Cache Extension for PHP</a></li>
</ul>
<p>Use the <a href="http://forums.iis.net/1164.aspx">Windows Cache Extension for PHP Forum</a> to ask questions, report bugs and provide feature suggestions.</p>
]]></content:encoded>
			<wfw:commentRss>http://ruslany.net/2009/10/windows-cache-extension-1-0-for-php-rc/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Windows Cache Extension for PHP and CPU usage</title>
		<link>http://ruslany.net/2009/09/windows-cache-extension-for-php-and-cpu-usage/</link>
		<comments>http://ruslany.net/2009/09/windows-cache-extension-for-php-and-cpu-usage/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 00:17:49 +0000</pubDate>
		<dc:creator>ruslany</dc:creator>
				<category><![CDATA[FastCGI]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WinCache]]></category>

		<guid isPermaLink="false">http://ruslany.net/?p=538</guid>
		<description><![CDATA[The FastCGI module in IIS has a configuration setting maxInstances, which controls the number of concurrently running php-cgi.exe processes that IIS creates to process PHP requests. To achieve optimal performance, it is recommended to fine tune this setting for your specific environment starting with 8-10 instances per CPU core (e.g. maxInstances=32 for quad-core CPU). The [...]]]></description>
			<content:encoded><![CDATA[<p>The FastCGI module in IIS has a configuration setting <strong><a href="http://www.iis.net/ConfigReference/system.webServer/fastCgi/application" target="_blank">maxInstances</a></strong>, which controls the number of concurrently running <strong>php-cgi.exe</strong> processes that IIS creates to process PHP requests. To achieve optimal performance, it is recommended to fine tune this setting for your specific environment starting with 8-10 instances per CPU core (e.g. maxInstances=32 for quad-core CPU).</p>
<p>The <a href="http://www.iis.net/extensions/WinCacheForPHP" target="_blank">Windows Cache Extension for PHP</a> can be used to improve performance of PHP applications running on Windows operating systems. The extension caches the compiled PHP opcode in the shared memory, which helps to avoid re-doing of such CPU intensive operations as parsing and compiling of the PHP source code. This means that when Windows Cache Extension for PHP is enabled, less CPU cycles are required for a web server to process PHP requests. Because of that, the previously configured value for the FastCGI maxInstances setting may not be adequate to load the server’s CPU completely and it may be necessary to increase the value further.<span id="more-538"></span></p>
<p>To increase the maxInstances value on IIS 7 run this command from an elevated command line prompt:</p>
<pre name="code" class="dos">
appcmd.exe set config  -section:system.webServer/fastCgi /[fullPath=&#039;C:\PHP\php-cgi.exe&#039;,arguments=&#039;&#039;].maxInstances:&quot;32&quot;  /commit:apphost
</pre>
<p><strong>Note</strong>: replace the fullPath with the path to php-cgi.exe on your server.</p>
<p>Alternatively you can just edit the &lt;fastCGI&gt; section the <strong>applicationHost.config</strong> file located at <strong>C:\Windows\System32\inetsrv\config\</strong> folder:</p>
<pre name="code" class="xml">
&lt;fastCgi&gt;
  &lt;application fullPath=&quot;C:\PHP\php-cgi.exe&quot; maxInstances=&quot;32&quot;&gt;
  &lt;!-- Some other settings may go here--&gt;
  &lt;/application&gt;
&lt;/fastCgi&gt;
</pre>
<p>To increate the maxInstances value on IIS 5.1 and IIS 6.0 run this command:</p>
<pre name="code" class="dos">
&gt;cscript C:\windows\system32\inetsrv\fcgiconfig.js -set -section:&quot;PHP&quot; –MaxInstances:32
</pre>
<p><strong>Note</strong>: replace the section name if necessary.</p>
<p>Alternatively you can edit the <strong>fcgiext.ini</strong> file located at <strong>C:\Windows\System32\inetsrv\</strong> folder:</p>
<pre name="code" class="dos">
[PHP]
ExePath=C:\PHP\php-cgi.exe
;some other settings may go here
MaxInstances=32
</pre>
<p>When you measure the performance of the Windows Cache Extension for PHP, make sure to monitor the CPU usage. If you see that CPU is not fully utilized try increasing the FastCGI maxInstances setting and you may be able to get better performance results.</p>
]]></content:encoded>
			<wfw:commentRss>http://ruslany.net/2009/09/windows-cache-extension-for-php-and-cpu-usage/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
