diff options
author | Cthulhux <git@tuxproject.de> | 2018-05-07 20:46:19 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-07-11 16:08:40 +0200 |
commit | f6f49c77f7d013e5713c964d4d7e3d4b4eedc636 (patch) | |
tree | 98a175eda7b7dbd82d89e219d7c322d549f7024e /settings/Controller | |
parent | 229289d206c954baede095e2bae2f34915471a44 (diff) | |
download | nextcloud-server-f6f49c77f7d013e5713c964d4d7e3d4b4eedc636.tar.gz nextcloud-server-f6f49c77f7d013e5713c964d4d7e3d4b4eedc636.zip |
opcache module check
Improved the speed of isOpcacheProperlySetup() (instant return instead of continuing when we're already failed), added a check for the opcache extension itself. Potentially fixes #9410
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'settings/Controller')
-rw-r--r-- | settings/Controller/CheckSetupController.php | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/settings/Controller/CheckSetupController.php b/settings/Controller/CheckSetupController.php index a301ecb1f66..bd493641bf6 100644 --- a/settings/Controller/CheckSetupController.php +++ b/settings/Controller/CheckSetupController.php @@ -396,33 +396,31 @@ Raw output protected function isOpcacheProperlySetup() { $iniWrapper = new IniGetWrapper(); - $isOpcacheProperlySetUp = true; - if(!$iniWrapper->getBool('opcache.enable')) { - $isOpcacheProperlySetUp = false; + return false; } if(!$iniWrapper->getBool('opcache.save_comments')) { - $isOpcacheProperlySetUp = false; + return false; } if(!$iniWrapper->getBool('opcache.enable_cli')) { - $isOpcacheProperlySetUp = false; + return false; } if($iniWrapper->getNumeric('opcache.max_accelerated_files') < 10000) { - $isOpcacheProperlySetUp = false; + return false; } if($iniWrapper->getNumeric('opcache.memory_consumption') < 128) { - $isOpcacheProperlySetUp = false; + return false; } if($iniWrapper->getNumeric('opcache.interned_strings_buffer') < 8) { - $isOpcacheProperlySetUp = false; + return false; } - return $isOpcacheProperlySetUp; + return true; } /** @@ -555,6 +553,7 @@ Raw output 'hasPassedCodeIntegrityCheck' => $this->checker->hasPassedCheck(), 'codeIntegrityCheckerDocumentation' => $this->urlGenerator->linkToDocs('admin-code-integrity'), 'isOpcacheProperlySetup' => $this->isOpcacheProperlySetup(), + 'hasOpcacheLoaded' => extension_loaded("opcache"), 'phpOpcacheDocumentation' => $this->urlGenerator->linkToDocs('admin-php-opcache'), 'isSettimelimitAvailable' => $this->isSettimelimitAvailable(), 'hasFreeTypeSupport' => $this->hasFreeTypeSupport(), |