From 166b8b8135bf4e4b62f1730faf625d0c503cc8e5 Mon Sep 17 00:00:00 2001 From: Josh Richards Date: Thu, 9 May 2024 11:45:16 -0400 Subject: [PATCH] fix(setupCheck): Only warn when memcache present w/o memcached Signed-off-by: Josh Richards --- apps/settings/lib/SetupChecks/MemcacheConfigured.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/settings/lib/SetupChecks/MemcacheConfigured.php b/apps/settings/lib/SetupChecks/MemcacheConfigured.php index 1afe9cb879c7c..98192f6289e1b 100644 --- a/apps/settings/lib/SetupChecks/MemcacheConfigured.php +++ b/apps/settings/lib/SetupChecks/MemcacheConfigured.php @@ -53,15 +53,16 @@ public function run(): SetupResult { $memcacheLocalClass = $this->config->getSystemValue('memcache.local', null); $caches = array_filter([$memcacheDistributedClass,$memcacheLockingClass,$memcacheLocalClass]); if (in_array(\OC\Memcache\Memcached::class, array_map(fn (string $class) => ltrim($class, '\\'), $caches))) { - if (extension_loaded('memcache')) { + // wrong PHP module is installed + if (extension_loaded('memcache') && !extension_loaded('memcached')) { return SetupResult::warning( - $this->l10n->t('Memcached is configured as distributed cache, but the wrong PHP module "memcache" is installed. \\OC\\Memcache\\Memcached only supports "memcached" and not "memcache".'), - 'https://code.google.com/p/memcached/wiki/PHPClientComparison' + $this->l10n->t('Memcached is configured as distributed cache, but the wrong PHP module ("memcache") is installed. Please install the PHP module "memcached".') ); } + // required PHP module is missing if (!extension_loaded('memcached')) { return SetupResult::warning( - $this->l10n->t('Memcached is configured as distributed cache, but the PHP module "memcached" is not installed.') + $this->l10n->t('Memcached is configured as distributed cache, but the PHP module "memcached" is not installed. Please install the PHP module "memcached".') ); } }