In a recent service update to Windows Azure Web Sites, the Windows Azure Web Sites team has updated the version of Wincache for PHP 5.3 sites to WinCache 1.3.4, which resolves this issue!
A while back I posted an article called Workaround for deleted folder still exists in Windows Azure Web Sites, which talks about how to get around an issue specifically with WordPress plugin upgrading. Recently, on twitter there have been a few people running into this issue, so I thought I would go into a little bit more detail on the issue and how to work around it, permanently.
The Cause of the WP Plugin Issue
In order to dig to the root of the problem, let’s take a few steps back here and get a little bit better of an understanding of the different pieces at play.
PHP is an interpreted language, simply put it is not compiled into machine code, but instead read and executed step-by-step by an interpreter in this instance, the PHP runtime.
This means that every line would need to be read, interpreted and executed on each request. Which in computer science we understand is not very efficient. For this reason PHP can employ caching to avoid parsing every instruction on each request, instead it stores a certain amount of interpreted instructions in shared memory.
It’s no secret that Windows Azure Web Sites leverages IIS as it’s Web Server. IIS uses FastCGI to interact with the PHP Interpreter. With the Web Server being able to interact with an interpreter, we have the means to serve up PHP code on IIS. As stated above, PHP can leverage a cache in order to avoid parsing each line of a script, enter WinCache.
WinCache is installed and enabled by default for PHP Runtimes maintained by the Windows Azure Web Sites team.
WinCache is a caching system which can be enabled for PHP application which run on Windows leveraging IIS. This is done by Installing WinCache, then adding a reference to
php_wincache.dll from within your
By default, Windows Azure Web Sites has PHP 5.3 installed with WinCache 1.1.
Now that we have a better understanding of the different pieces involved, let’s take a closer look at the issue at hand.
How to Resolve the Plugin Updating Issue
The resolution is fairly simple. The bug has been fixed in a newer release of WinCache (version 1.3 which works with PHP 5.4).