Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(setupCheck): Only warn when memcache present w/o memcached #45242

Merged
merged 1 commit into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions apps/settings/lib/SetupChecks/MemcacheConfigured.php
Original file line number Diff line number Diff line change
Expand Up @@ -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".')
);
}
}
Expand Down