Re: Bug #54514
| From: | Pierre Joye | Date: | Wed, 07 Dec 2011 21:48:56 +0000 |
| Subject: | Re: Bug #54514 | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-56843@lists.php.net to get a copy of this message | ||
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 <derick@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 wf/7Æêäëa
>> vOÈÔRjhttps://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