Only work with the cli sapi

This commit is contained in:
stealth35 2012-03-02 16:42:35 +01:00
parent e2fc3cde90
commit caa44aefc1

View File

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