Skip to content

Commit

Permalink
minor #32573 [Process] Path resolution for FCGI configuration (romant…
Browse files Browse the repository at this point in the history
…ymoshyk)

This PR was merged into the 4.4 branch.

Discussion
----------

 [Process] Path resolution for FCGI configuration

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

This tiny improvement allows to speedup location of PHP executable if script is runned via FCGI.
PHP configured to be runned via Apache module mod_fcgid(usually on Windows), PHP_SAPI contains 'cgi-fcgi' and PHP_BINARY refer to correct PHP binary executable, same as in case of running via CLI.

Commits
-------

22150bc  [Process] Path resolution for FCGI configuration
  • Loading branch information
fabpot committed Jul 18, 2019
2 parents 9ed1dd1 + 22150bc commit 6f78ad8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/Process/PhpExecutableFinder.php
Expand Up @@ -54,7 +54,7 @@ public function find($includeArgs = true)
$args = $includeArgs && $args ? ' '.implode(' ', $args) : '';

// PHP_BINARY return the current sapi executable
if (PHP_BINARY && \in_array(\PHP_SAPI, ['cli', 'cli-server', 'phpdbg'], true)) {
if (PHP_BINARY && \in_array(\PHP_SAPI, ['cgi-fcgi', 'cli', 'cli-server', 'phpdbg'], true)) {
return PHP_BINARY.$args;
}

Expand Down

0 comments on commit 6f78ad8

Please sign in to comment.