[BUGFIX] WinCache 2.0 and newer have no opcode cache 30/47530/2
authorAlexander Opitz <opitz.alexander@googlemail.com>
Fri, 4 Mar 2016 13:46:45 +0000 (14:46 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 7 Apr 2016 11:37:20 +0000 (13:37 +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/47530
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/Utility/OpcodeCacheUtility.php

index a097577..557c1b9 100644 (file)
@@ -96,7 +96,8 @@ class OpcodeCacheUtility {
 
                        // 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' => FALSE,
                                'canInvalidate' => TRUE, // wincache_refresh_if_changed()
@@ -245,4 +246,4 @@ class OpcodeCacheUtility {
 
                return $canInvalidate;
        }
-}
+}
\ No newline at end of file