From 60f711143d490f8109f9653293189ac6fc0f782c Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Mon, 6 Jul 2020 09:27:11 +0800 Subject: [PATCH] add more checks before setup --- bootstrap/chkenv.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/bootstrap/chkenv.php b/bootstrap/chkenv.php index 577051f4..d079d15a 100644 --- a/bootstrap/chkenv.php +++ b/bootstrap/chkenv.php @@ -14,6 +14,22 @@ ); } + if (!empty(ini_get('disable_functions'))) { + die_with_utf8_encoding( + '[Error] Please don\'t disable any functions, which is specified in "php.ini" file.
'. + '[错误] 请不要在 php.ini 中禁用任何函数。'. + '我们不建议使用您使用宝塔等面板软件,因为容易引起兼容性问题。' + ); + } + + if (!empty(ini_get('open_basedir'))) { + die_with_utf8_encoding( + '[Error] Please disable "open_basedir" option by editing "php.ini" file.
'. + '[错误] 请修改 php.ini 以关闭 "open_basedir" 选项。'. + '我们不建议使用您使用宝塔等面板软件,因为容易引起兼容性问题。' + ); + } + $requiredVersion = '7.2.5'; preg_match('/(\d+\.\d+\.\d+)/', PHP_VERSION, $matches); $version = $matches[1];