diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-06 09:24:03 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-06 09:24:03 +0200 |
commit | 822e8fbfe10c287218d66674d7f5749a4f1b7c2f (patch) | |
tree | 696d2eb45871967f018325d46503b9f956df3f9b /settings | |
parent | 26b92c406c20c13cfa37e7de0dbfa06de50a4eb9 (diff) | |
parent | b51996540889b29b3b1d2bc118f652c7b942404b (diff) | |
download | nextcloud-server-822e8fbfe10c287218d66674d7f5749a4f1b7c2f.tar.gz nextcloud-server-822e8fbfe10c287218d66674d7f5749a4f1b7c2f.zip |
Merge pull request #19535 from owncloud/check-memcache-module
[admin] check for correct PHP memcached module
Diffstat (limited to 'settings')
-rw-r--r-- | settings/controller/checksetupcontroller.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/settings/controller/checksetupcontroller.php b/settings/controller/checksetupcontroller.php index ca4eb255f6b..34fe824bc97 100644 --- a/settings/controller/checksetupcontroller.php +++ b/settings/controller/checksetupcontroller.php @@ -211,6 +211,23 @@ class CheckSetupController extends Controller { } /** + * Checks if the correct memcache module for PHP is installed. Only + * fails if memcached is configured and the working module is not installed. + * + * @return bool + */ + private function isCorrectMemcachedPHPModuleInstalled() { + if ($this->config->getSystemValue('memcache.distributed', null) !== '\OC\Memcache\Memcached') { + return true; + } + + // there are two different memcached modules for PHP + // we only support memcached and not memcache + // https://code.google.com/p/memcached/wiki/PHPClientComparison + return !extension_loaded('memcached') && extension_loaded('memcache'); + } + + /** * @return DataResponse */ public function check() { @@ -226,6 +243,7 @@ class CheckSetupController extends Controller { 'phpSupported' => $this->isPhpSupported(), 'forwardedForHeadersWorking' => $this->forwardedForHeadersWorking(), 'reverseProxyDocs' => $this->urlGenerator->linkToDocs('admin-reverse-proxy'), + 'isCorrectMemcachedPHPModuleInstalled' => $this->isCorrectMemcachedPHPModuleInstalled() ] ); } |