From d60a723fada4a9f10ff2df38c7d03cf6ce398812 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 8 Jun 2013 13:13:46 +0200 Subject: [PATCH] Work-around for broken APC versions APC up to 3.1.3p1 breaks PHP's late static binding, the only way to support it is constantly clearing the opcode cache. This isn't the best solution, but it works out and does not prevent the user from using our software. Sadly 3.1.3p1 (the last broken version) is the stable release available on Debian old-stable "Squeeze" :( --- wcfsetup/install/files/global.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/global.php b/wcfsetup/install/files/global.php index dec01e614d..f0a8b2cdfc 100644 --- a/wcfsetup/install/files/global.php +++ b/wcfsetup/install/files/global.php @@ -1,7 +1,7 @@ * @package com.woltlab.wcf * @category Community Framework @@ -9,6 +9,11 @@ // define the wcf-root-dir define('WCF_DIR', dirname(__FILE__).'/'); +// APC below 3.1.4 breaks PHP's late static binding +if (extension_loaded('apc') && strnatcmp(phpversion('apc'), '3.1.4') < 0) { + apc_clear_cache('opcode'); +} + // initiate wcf core require_once(WCF_DIR.'lib/system/WCF.class.php'); new wcf\system\WCF(); -- 2.20.1