hi Derick, yes, that's what is done in the ini detection implementation, which is now used in main/.
The only remaining related bug I like to fix is ot PHP_BINDIR, which is now set at compile time. We could do the same thing than now PG(PHP_BINDIR). On Wed, Dec 7, 2011 at 6:45 PM, Derick Rethans <der...@php.net> wrote: > On Wed, 7 Dec 2011, Sebastian Bergmann wrote: > >> Can somebody look into https://bugs.php.net/bug.php?id=54514 please? >> This causes issues for CLI tools implemented in PHP that are invoked >> through Apache Ant, for instance, and need to know the PHP interpreter >> that is running them. >> >> See https://github.com/sebastianbergmann/phpunit/issues/432 for an >> example of how this affects PHPUnit. > > I've code to do this on Windows: > > #if WIN32 > PHP_FUNCTION(get_php_process) > { > char filename[1024]; > GetModuleFileName(NULL, filename, 1024); > RETURN_STRING(filename, 1) > } > #endif > > On linux, we currently do: > > $pid = getmypid(); > $process = "/proc/{$pid}/exe" > > cheers, > Derick > > -- > http://derickrethans.nl | http://xdebug.org > Like Xdebug? Consider a donation: http://xdebug.org/donate.php > twitter: @derickr and @xdebug > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php