Ver código fonte

Only work with the cli sapi

stealth35 13 anos atrás
pai
commit
caa44aefc1

+ 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;
         }