From c7ccc9c24224da6821a367b8fbc571c7d545ae75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Douze=20B=C3=A9?= <12b@distrilab.fr> Date: Tue, 20 Feb 2024 20:01:03 +0100 Subject: [PATCH] Fix issue with multiple php versions on YUNoHost (get php binary for async processes from env var ASYC_PHP_BINARY if it exists) --- includes/services/ConsoleService.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/services/ConsoleService.php b/includes/services/ConsoleService.php index 9116ccaf8..233b43456 100644 --- a/includes/services/ConsoleService.php +++ b/includes/services/ConsoleService.php @@ -37,7 +37,10 @@ public function __construct(Wiki $wiki, ParameterBagInterface $params) */ public function startConsoleAsync(string $command, array $args = [], string $subfolder = "", bool $newConsole = true, int $timeoutInSec = 60): ?Process { - $phpBinaryPath = $this->phpBinaryFinder->find(); + $phpBinaryPath = getenv('ASYNC_PHP_BINARY'); + if(!$phpBinaryPath) { + $phpBinaryPath = $this->phpBinaryFinder->find(); + } $newCommand = $phpBinaryPath; $newArgs = [self::CONSOLE_BIN,$command]; foreach ($args as $arg) {