Browse Source

Only work with the cli sapi

stealth35 13 years ago
parent
commit
caa44aefc1
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/Symfony/Component/Process/PhpExecutableFinder.php

+ 2 - 1
src/Symfony/Component/Process/PhpExecutableFinder.php

@@ -33,7 +33,8 @@ class PhpExecutableFinder
      */
     public function find()
     {
-        if (defined('PHP_BINARY') && PHP_BINARY && ('php' === pathinfo(PHP_BINARY, PATHINFO_FILENAME))) {
+        // PHP_BINARY return the current sapi executable
+        if (defined('PHP_BINARY') && PHP_BINARY && ('cli' === PHP_SAPI)) {
             return PHP_BINARY;
         }