Skip to content

Commit

Permalink
bug #25624 [WebServerBundle] Fix escaping of php binary with argument…
Browse files Browse the repository at this point in the history
…s (nicolas-grekas)

This PR was merged into the 3.3 branch.

Discussion
----------

[WebServerBundle] Fix escaping of php binary with arguments

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Not really needed in practice, yet more correct, and will open some improvements in PhpExecutableFinder for master.

Commits
-------

6629ae5 [WebServerBundle] Fix escaping of php binary with arguments
  • Loading branch information
nicolas-grekas committed Dec 29, 2017
2 parents 67ceb50 + 6629ae5 commit f20515a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Symfony/Bundle/WebServerBundle/WebServer.php
Expand Up @@ -146,11 +146,11 @@ public function isRunning($pidFile = null)
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);

Expand Down

0 comments on commit f20515a

Please sign in to comment.