php.net |  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: ericsten@php.net Assigned: ericsten (profile)
Status: Wont fix Package: WinCache (PECL)
PHP Version: Irrelevant OS: Windows
Private report: No CVE-ID: None
 [2014-08-05 16:57 UTC] ericsten@php.net
Description:
------------
Problem:
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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-08-05 17:32 UTC] ericsten@php.net
-Assigned To: +Assigned To: ericsten
 [2014-08-05 17:32 UTC] ericsten@php.net
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] pajoye@php.net
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] ericsten@php.net
-Status: Assigned +Status: Wont fix
 [2015-02-03 23:09 UTC] ericsten@php.net
Since the wincache.namesalt is used for this exact scenario, there is no need to add additional code into WinCache.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC