Get php binary path during script execution
| Request #54514 | Get php binary path during script execution | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2011-04-12 14:11 UTC | Modified: | 2012-01-27 19:58 UTC |
|
||||||||||
| From: | frederic dot hardy at mageekbox dot net | Assigned: | laruence (profile) | |||||||||||
| Status: | Closed | Package: | PHP options/info functions | |||||||||||
| PHP Version: | Irrelevant | OS: | ||||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2011-04-12 14:11 UTC] frederic dot hardy at mageekbox dot net
Description: ------------ Currently, PHP does not provide any solution to retrieve PHP binary path in userland. There is a workaround with some *NIX shells like bash, which provide $_, available in $_SERVER['_'] in userland. However, it's not a reliable solution (cron task, etc.), and this hack is not available on Windows. So, a constant like PHP_BINARY (similar to PHP_VERSION and other PHP_* constants) seems to be a good solution.
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2011-12-07 08:57 UTC] patrickallaert@php.net
[2011-12-07 10:37 UTC] laruence@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: laruence
[2011-12-07 10:37 UTC] laruence@php.net
[2012-08-23 20:57 UTC] glen at delfi dot ee