[WebServerBundle] Fix escaping of php binary with arguments

This commit is contained in:
Nicolas Grekas 2017-12-29 12:04:53 +01:00
parent 8a1a9f94d6
commit 6629ae535d
1 changed files with 2 additions and 2 deletions

View File

@ -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);