From 0a00ce7497428f8597806727262a1513294a19bd Mon Sep 17 00:00:00 2001 From: Gevorg Mansuryan Date: Fri, 10 Mar 2023 11:59:29 +0400 Subject: [PATCH] eth #6123: Requirement Checker proc_open (#6154) * eth #6123: Requirement Checker proc_open * Update SelfTest.php * Update CHANGELOG-DEV.md * Update CHANGELOG-DEV.md --------- Co-authored-by: Lucas Bartholemy --- CHANGELOG-DEV.md | 1 + protected/humhub/libs/SelfTest.php | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/CHANGELOG-DEV.md b/CHANGELOG-DEV.md index 089fa9771d..316e55626e 100644 --- a/CHANGELOG-DEV.md +++ b/CHANGELOG-DEV.md @@ -29,3 +29,4 @@ HumHub Changelog (DEVELOP) - Enh #5625: Update jQuery UI to version 1.13 - Enh #6144: Added ability to change/disable `Forgot your password?` link - Fix #4988: Unable to archive space on Form Validation errors +- Enh #6123: Added check for `proc_open` function in Requirement Checker diff --git a/protected/humhub/libs/SelfTest.php b/protected/humhub/libs/SelfTest.php index dd1b598721..b1ca440349 100644 --- a/protected/humhub/libs/SelfTest.php +++ b/protected/humhub/libs/SelfTest.php @@ -407,6 +407,21 @@ class SelfTest ]; } + // Checks `proc_open` is on in Disabled Functions + $title = 'PHP - ' . Yii::t('AdminModule.information', 'Disabled Functions'); + if (function_exists('proc_open')) { + $checks[] = [ + 'title' => $title, + 'state' => 'OK' + ]; + } else { + $checks[] = [ + 'title' => $title, + 'state' => 'WARNING', + 'hint' => Yii::t('AdminModule.information', 'Make sure that the `proc_open` function is not disabled.') + ]; + } + // Checks Database Data $checks = self::getDatabaseResults($checks);