mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-25 16:22:43 +01:00
Detect and warn about APC 3.1.14 / 3.1.15
Summary: These versions are broken, but package distros seem to be picking them up. :/ Since the error you get is completely useless, fatal immediately with a useful message. Ref T2594. Test Plan: Faked verisions and hit the issue. Reviewers: btrahan Reviewed By: btrahan CC: brennantaylor, Arijit, aran Maniphest Tasks: T2594 Differential Revision: https://secure.phabricator.com/D6415
This commit is contained in:
parent
a55089e628
commit
c05e026e65
2 changed files with 17 additions and 1 deletions
|
@ -6,7 +6,8 @@ final class PhabricatorSetupCheckAPC extends PhabricatorSetupCheck {
|
||||||
if (!extension_loaded('apc')) {
|
if (!extension_loaded('apc')) {
|
||||||
$message = pht(
|
$message = pht(
|
||||||
"Installing the PHP extension 'APC' (Alternative PHP Cache) will ".
|
"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
|
$this
|
||||||
->newIssue('extension.apc')
|
->newIssue('extension.apc')
|
||||||
|
|
|
@ -254,6 +254,21 @@ final class PhabricatorStartup {
|
||||||
"disable it to run Phabricator. Consult the PHP manual for ".
|
"disable it to run Phabricator. Consult the PHP manual for ".
|
||||||
"instructions.");
|
"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.");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue