From: Alexander Ebert Date: Sat, 8 Jun 2013 11:13:46 +0000 (+0200) Subject: Work-around for broken APC versions X-Git-Tag: 2.0.0_Beta_4~100 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d60a723fada4a9f10ff2df38c7d03cf6ce398812;p=GitHub%2FWoltLab%2FWCF.git 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" :( --- 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();