[BUGFIX] OpCache XCache cannot be cleared if xcache.admin.enable_auth 59/28059/5
authorErnesto Baschny <ernst@cron-it.de>
Tue, 4 Mar 2014 20:16:06 +0000 (21:16 +0100)
committerErnesto Baschny <ernst@cron-it.de>
Tue, 4 Mar 2014 20:27:49 +0000 (21:27 +0100)
We can only clear the opcache in XCache if xcache.admin.enable_auth is not
set, else you get a fatal error.

Resolves: #56554
Related: #55252
Releases: 6.2
Change-Id: Ia33afc4141852c58266f6c7dfedec82f4c35148d
Reviewed-on: https://review.typo3.org/28059
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Ernesto Baschny
Tested-by: Ernesto Baschny
typo3/sysext/core/Classes/Utility/OpcodeCacheUtility.php

index 8caf97c..af78c5d 100644 (file)
@@ -120,7 +120,9 @@ class OpcodeCacheUtility {
                                'canInvalidate' => FALSE,
                                'error' => FALSE,
                                'clearCallback' => function ($fileAbsPath) {
-                                       xcache_clear_cache(XC_TYPE_PHP);
+                                       if (!ini_get('xcache.admin.enable_auth')) {
+                                               xcache_clear_cache(XC_TYPE_PHP);
+                                       }
                                }
                        ),