How to disable php wincache extension from php.ini on Azure

less than 1 minute read

To disable a PHP extension, such as wincache.dll, you will need to modify php.ini, here are the steps how to do it:

(Reference )

  1. Create “applicationhost.xdt” file at “d:\home\site”,

  2. Copy the content to applicationhost.xdt (see from the above link)

     <?xml version=“1.0“?> 
     <configuration xmlns:xdt=““> 
         <application fullPath=“D:\Program Files (x86)\PHP\v5.x\php-cgi.exe“ xdt:Locator=“Match(fullPath)“>
             <environmentVariable name=“PHPRC“ xdt:Locator=“Match(name)“ value=“d:\home\site\php.ini“ xdt:Transform=“SetAttributes(value)“ />
  3. Find your PHP version from kudu debug console, copy default php.ini to “d:\home\site”, location of default php.ini is “D:\local\Config\PHP-5.x.xx”

  1. Edit your local “d:\home\site\php.ini”, search for wincache and comment/remove all wincache related directives.

  2. Cleanup .user.ini, remove the directives that disable wincache cache options if there is any.

  3. Restart the site, check from phpinfo, validate custom PHP runtime


Note: Match youe PHP version with “v5.x” and “v5.x.xx”.