diff --git a/app/Console/Commands/Test.php b/app/Console/Commands/Test.php index 93fcdba7..cc5a006f 100644 --- a/app/Console/Commands/Test.php +++ b/app/Console/Commands/Test.php @@ -95,7 +95,7 @@ class Test extends Command */ public function handle() { - $r = extension_loaded('Zend OPcache'); + $r = nexus_env('PHP_PATH') ?: 'php'; dd($r); } diff --git a/include/cleanup.php b/include/cleanup.php index 8d397be0..8a9704e0 100644 --- a/include/cleanup.php +++ b/include/cleanup.php @@ -303,7 +303,7 @@ function docleanup($forceAll = 0, $printProgress = false) { $requestId = nexus()->getRequestId(); $maxUidRes = mysql_fetch_assoc(sql_query("select max(id) as max_uid from users limit 1")); $maxUid = $maxUidRes['max_uid']; - $phpPath = nexus_env('PHP_PATH', 'php'); + $phpPath = nexus_env('PHP_PATH') ?: 'php'; $webRoot = rtrim(ROOT_PATH, '/'); $chunk = 2000; $beginUid = 0; diff --git a/include/globalfunctions.php b/include/globalfunctions.php index aaf7e8e9..c3e225df 100644 --- a/include/globalfunctions.php +++ b/include/globalfunctions.php @@ -1150,7 +1150,7 @@ function executeCommand($command, $format = 'string', $artisan = false, $excepti $command .= $append; } if ($artisan) { - $phpPath = nexus_env('PHP_PATH', 'php'); + $phpPath = nexus_env('PHP_PATH') ?: 'php'; $webRoot = rtrim(ROOT_PATH, '/'); $command = "$phpPath $webRoot/artisan $command"; } diff --git a/public/take-increment-bulk.php b/public/take-increment-bulk.php index 34cd1e5a..c339258e 100644 --- a/public/take-increment-bulk.php +++ b/public/take-increment-bulk.php @@ -42,7 +42,7 @@ if ($isTypeTmpInvite && (empty($_POST['duration']) || $_POST['duration'] < 1)) { stderr("Error","Invalid duration"); } $whereStr = implode(' OR ', $conditions); -$phpPath = nexus_env('PHP_PATH', 'php'); +$phpPath = nexus_env('PHP_PATH') ?: 'php'; $webRoot = rtrim(ROOT_PATH, '/'); while (true) { $msgValues = $idArr = [];