summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/js/setupchecks.js8
-rw-r--r--settings/Controller/CheckSetupController.php15
2 files changed, 23 insertions, 0 deletions
diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js
index fcbbba6af62..53b2e46f90a 100644
--- a/core/js/setupchecks.js
+++ b/core/js/setupchecks.js
@@ -160,6 +160,14 @@
type: OC.SetupChecks.MESSAGE_TYPE_INFO
});
}
+ if(!data.isSettimelimitAvailable) {
+ messages.push({
+ msg: t(
+ 'core',
+ 'The PHP function "set_time_limit" is not available. This could result in scripts being halted mid-execution, breaking your installation. We strongly recommend enabling this function.'),
+ type: OC.SetupChecks.MESSAGE_TYPE_WARNING
+ });
+ }
} else {
messages.push({
msg: t('core', 'Error occurred while checking server setup'),
diff --git a/settings/Controller/CheckSetupController.php b/settings/Controller/CheckSetupController.php
index 016f6a1dab2..5e2aa365f67 100644
--- a/settings/Controller/CheckSetupController.php
+++ b/settings/Controller/CheckSetupController.php
@@ -286,6 +286,20 @@ class CheckSetupController extends Controller {
}
/**
+ * Checks if set_time_limit is not disabled.
+ *
+ * @return bool
+ */
+ private function isSettimelimitAvailable() {
+ if (function_exists('set_time_limit')
+ && strpos(@ini_get('disable_functions'), 'set_time_limit') === false) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
* @return RedirectResponse
*/
public function rescanFailedIntegrityCheck() {
@@ -411,6 +425,7 @@ Raw output
'codeIntegrityCheckerDocumentation' => $this->urlGenerator->linkToDocs('admin-code-integrity'),
'isOpcacheProperlySetup' => $this->isOpcacheProperlySetup(),
'phpOpcacheDocumentation' => $this->urlGenerator->linkToDocs('admin-php-opcache'),
+ 'isSettimelimitAvailable' => $this->isSettimelimitAvailable(),
]
);
}