|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67775 Within a single IIS AppPool, cannot mix different PHP/Wincache versions
Submitted: 2014-08-05 16:57 UTC Modified: 2015-02-03 23:09 UTC
From: Assigned: ericsten (profile)
Status: Wont fix Package: WinCache (PECL)
PHP Version: Irrelevant OS: Windows
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2014-08-05 16:57 UTC]
Wincache uses the IIS Application Pool ID to create the shared memory block for its caches (opcode, file, session).

If IIS is configured to have more than one PHP version within a single AppPool, then opcode arrays from different PHP versions will be stored in the same Wincache opcode cache.  If a single *.php file is compiled by two different PHP versions within the same AppPool, one PHP version will get a cached opcode array that was compiled for the other PHP version.  This may lead to AVs.

Additionally, if two different PHP versions specify different Wincache cache sizes (ocachesize, fcachesize, ucachesize, or internedsize), then Wincache will perform incorrect calculations when adding or removing items from its caches, and potentially deadlock.

Expected result:
No A/V and/or deadlock when using Wincache with different PHP versions in a single AppPool

Actual result:
A/V and/or deadlock


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-08-05 17:32 UTC]
-Assigned To: +Assigned To: ericsten
 [2014-08-05 17:32 UTC]
Workaround: use the wincache.namesalt setting in the system-level php.ini for each PHP version.  This will separate the caches within a single AppPool.
 [2014-08-06 10:36 UTC]
Would it make sense to automatically add major and minor version as prefix for the name directly in wincache? That should prevent users to wonder what happens. I can  write a patch quickly for that, if it is something you like to do :)
 [2015-02-03 23:09 UTC]
-Status: Assigned +Status: Wont fix
 [2015-02-03 23:09 UTC]
Since the wincache.namesalt is used for this exact scenario, there is no need to add additional code into WinCache.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Feb 28 10:01:26 2020 UTC