diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-02-12 03:09:12 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-02-12 03:09:12 +0400 |
commit | 626dcee73e9bbcd62a4ee9a3d990eb0509682ef4 (patch) | |
tree | 9b055fea03c342b2145b149ec7c917442ac7993d /core/CliMulti.php | |
parent | 531b3576382e3ebefe1b8a645533ea642b9dbd3d (diff) |
refs #4610 another way to get the php binary
Diffstat (limited to 'core/CliMulti.php')
-rw-r--r-- | core/CliMulti.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/CliMulti.php b/core/CliMulti.php index f623290c8e..270274c0b2 100644 --- a/core/CliMulti.php +++ b/core/CliMulti.php @@ -194,6 +194,12 @@ class CliMulti { $bin = shell_exec('which php5'); } + if (empty($bin) && defined('PHP_BINDIR') && Common::isPhpCliMode() && !empty($_SERVER['_']) && is_executable($_SERVER['_'])) { + if (0 === strpos($_SERVER['_'], PHP_BINDIR)) { + $bin = $_SERVER['_']; + } + } + if (!empty($bin)) { return trim($bin); } |