From 6629ae535d88c6b974853b9bb54f19442545c3a5 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 29 Dec 2017 12:04:53 +0100 Subject: [PATCH] [WebServerBundle] Fix escaping of php binary with arguments --- src/Symfony/Bundle/WebServerBundle/WebServer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bundle/WebServerBundle/WebServer.php b/src/Symfony/Bundle/WebServerBundle/WebServer.php index 4e5c001849..beb5190b72 100644 --- a/src/Symfony/Bundle/WebServerBundle/WebServer.php +++ b/src/Symfony/Bundle/WebServerBundle/WebServer.php @@ -146,11 +146,11 @@ class WebServer private function createServerProcess(WebServerConfig $config) { $finder = new PhpExecutableFinder(); - if (false === $binary = $finder->find()) { + if (false === $binary = $finder->find(false)) { throw new \RuntimeException('Unable to find the PHP binary.'); } - $process = new Process(array($binary, '-dvariables_order=EGPCS', '-S', $config->getAddress(), $config->getRouter())); + $process = new Process(array_merge(array($binary), $finder->findArguments(), array('-dvariables_order=EGPCS', '-S', $config->getAddress(), $config->getRouter()))); $process->setWorkingDirectory($config->getDocumentRoot()); $process->setTimeout(null);