[BUGFIX] WinCache 2.0 and newer have no opcode cache 51/47051/3
authorAlexander Opitz <opitz.alexander@googlemail.com>
Fri, 4 Mar 2016 13:46:45 +0000 (14:46 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Thu, 7 Apr 2016 11:31:42 +0000 (13:31 +0200)
Detect WinCache 2.0 and newer not as opcode cache system.

Resolves: #74131
Releases: 7.6, 6.2
Change-Id: If7ce68b884d84638484f7b8225d175f5875fb683
Reviewed-on: https://review.typo3.org/47051
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/core/Classes/Service/OpcodeCacheService.php

index e6df3a6..7e55a59 100644 (file)
@@ -54,7 +54,8 @@ class OpcodeCacheService
 
             // http://www.php.net/manual/de/book.wincache.php
             'WinCache' => array(
-                'active' => extension_loaded('wincache') && ini_get('wincache.ocenabled') === '1',
+                'active' => extension_loaded('wincache') && ini_get('wincache.ocenabled') === '1'
+                    && version_compare(phpversion('wincache'), '2.0.0.0', '<'),
                 'version' => phpversion('wincache'),
                 'canReset' => true,
                 'canInvalidate' => true, // wincache_refresh_if_changed()