From 3da3352ac06053f95f36f75422bffd5fd806b9e1 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Fri, 16 Jun 2023 02:48:37 +0800 Subject: [PATCH] check env fix --- nexus/Install/Install.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nexus/Install/Install.php b/nexus/Install/Install.php index 4a32d189..d44f2828 100644 --- a/nexus/Install/Install.php +++ b/nexus/Install/Install.php @@ -169,8 +169,10 @@ class Install $disabledFunctions = []; foreach ($this->requiredFunctions as $fn) { if (str_starts_with($fn, "pcntl_") && function_exists('exec')) { - $phpPath = nexus_env('PHP_PATH') ?: 'php'; - $exists = executeCommand("$phpPath -r 'var_export(function_exists(\"$fn\"));'") == 'true'; + $command = "php -r 'var_export(function_exists(\"$fn\"));'"; + $result = exec($command, $output, $result_code); + $outputString = implode("\n", $output); + $exists = $outputString == 'true'; if (!$exists) { $disabledFunctions[] = $fn; }