diff --git a/lib/private/memcache/apcu.php b/lib/private/memcache/apcu.php index 7f780f3271..1043690a36 100644 --- a/lib/private/memcache/apcu.php +++ b/lib/private/memcache/apcu.php @@ -14,6 +14,8 @@ class APCu extends APC { return false; } elseif (!ini_get('apc.enable_cli') && \OC::$CLI) { return false; + } elseif (version_compare(phpversion('apc'), '4.0.6') === -1) { + return false; } else { return true; } diff --git a/settings/admin.php b/settings/admin.php index cdbc2700a8..32e92edb14 100644 --- a/settings/admin.php +++ b/settings/admin.php @@ -85,6 +85,10 @@ $template->assign('databaseOverload', $databaseOverload); // warn if Windows is used $template->assign('WindowsWarning', OC_Util::runningOnWindows()); +// warn if outdated version of APCu is used +$template->assign('ApcuOutdatedWarning', + extension_loaded('apcu') && version_compare(phpversion('apc'), '4.0.6') === -1); + // add hardcoded forms from the template $forms = OC_App::getForms('admin'); $l = OC_L10N::get('settings'); diff --git a/settings/templates/admin.php b/settings/templates/admin.php index 363b4741b7..1f7eacd746 100644 --- a/settings/templates/admin.php +++ b/settings/templates/admin.php @@ -143,9 +143,24 @@ if ($_['WindowsWarning']) {

+ +
+

t('APCu below version 4.0.6 installed'));?>

+ +

+ t('APCu below version 4.0.6 is installed, for stability and performance reasons we recommend to update to a newer APCu version.')); ?> +

+ +
+ +