Browse Source

Merge pull request #45282 from nextcloud/backport/45242/stable28

[stable28] fix(setupCheck): Only warn when memcache present w/o memcached
tags/v28.0.6rc1^0
Josh 1 month ago
parent
commit
278aafd4a4
No account linked to committer's email address
1 changed files with 5 additions and 4 deletions
  1. 5
    4
      apps/settings/lib/SetupChecks/MemcacheConfigured.php

+ 5
- 4
apps/settings/lib/SetupChecks/MemcacheConfigured.php View File

@@ -53,15 +53,16 @@ class MemcacheConfigured implements ISetupCheck {
$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".')
);
}
}

Loading…
Cancel
Save