Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCthulhux <git@tuxproject.de>2018-05-07 21:46:19 +0300
committerMorris Jobke <hey@morrisjobke.de>2018-07-11 17:08:40 +0300
commitf6f49c77f7d013e5713c964d4d7e3d4b4eedc636 (patch)
tree98a175eda7b7dbd82d89e219d7c322d549f7024e /settings
parent229289d206c954baede095e2bae2f34915471a44 (diff)
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')
-rw-r--r--settings/Controller/CheckSetupController.php17
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(),