diff --git a/src/applications/config/check/PhabricatorSetupCheckAPC.php b/src/applications/config/check/PhabricatorSetupCheckAPC.php index 3eacc03d53..0e72954e01 100644 --- a/src/applications/config/check/PhabricatorSetupCheckAPC.php +++ b/src/applications/config/check/PhabricatorSetupCheckAPC.php @@ -6,7 +6,8 @@ final class PhabricatorSetupCheckAPC extends PhabricatorSetupCheck { if (!extension_loaded('apc')) { $message = pht( "Installing the PHP extension 'APC' (Alternative PHP Cache) will ". - "dramatically improve performance."); + "dramatically improve performance. Note that APC versions 3.1.14 and ". + "3.1.15 are broken; 3.1.13 is recommended instead."); $this ->newIssue('extension.apc') diff --git a/support/PhabricatorStartup.php b/support/PhabricatorStartup.php index a4d241198d..e4198d163d 100644 --- a/support/PhabricatorStartup.php +++ b/support/PhabricatorStartup.php @@ -254,6 +254,21 @@ final class PhabricatorStartup { "disable it to run Phabricator. Consult the PHP manual for ". "instructions."); } + + if (extension_loaded('apc')) { + $apc_version = phpversion('apc'); + $known_bad = array( + '3.1.14' => true, + '3.1.15' => true, + ); + if (isset($known_bad[$apc_version])) { + self::didFatal( + "You have APC {$apc_version} installed. This version of APC is ". + "known to be bad, and does not work with Phabricator (it will ". + "cause Phabricator to fatal unrecoverably with nonsense errors). ". + "Downgrade to version 3.1.13."); + } + } }