Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56843 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98273 invoked from network); 7 Dec 2011 21:49:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Dec 2011 21:49:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.170 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.160.170 mail-gy0-f170.google.com Received: from [209.85.160.170] ([209.85.160.170:41413] helo=mail-gy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1C/51-23442-B4FDFDE4 for ; Wed, 07 Dec 2011 16:48:59 -0500 Received: by ghbg16 with SMTP id g16so1005795ghb.29 for ; Wed, 07 Dec 2011 13:48:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=+sFI+jscTdlhYiVnKj0INkTLnnUdXczXZ65CAXPDbqQ=; b=XBk22StW3eftjBddy+RKmCfpY8mQQR3zdEsv7C282abwOuwe1srJ18H7yDnSHPrO35 5aSSitugskqnGVwAjljNY1aZJgrHzrxWAyTy2MUyZ13mZPr7oarDz1hxIG82w8OXHP+p K+OXhJcdxBq1WSSJXASji4Vc1efJKmx0VazFY= MIME-Version: 1.0 Received: by 10.236.156.5 with SMTP id l5mr403013yhk.29.1323294536153; Wed, 07 Dec 2011 13:48:56 -0800 (PST) Received: by 10.146.204.6 with HTTP; Wed, 7 Dec 2011 13:48:56 -0800 (PST) In-Reply-To: References: <4EDF1433.4050604@php.net> Date: Wed, 7 Dec 2011 22:48:56 +0100 Message-ID: To: Derick Rethans , =?UTF-8?B?5oOg5paw5a64?= Cc: Sebastian Bergmann , internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Bug #54514 From: pierre.php@gmail.com (Pierre Joye) 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 wrote: > On Wed, 7 Dec 2011, Sebastian Bergmann wrote: > >> =A0Can somebody look into https://bugs.php.net/bug.php?id=3D54514 please= ? >> =A0This causes issues for CLI tools implemented in PHP that are invoked >> =A0through Apache Ant, for instance, and need to know the PHP interprete= r >> =A0that is running them. >> >> =A0See https://github.com/sebastianbergmann/phpunit/issues/432 for an >> =A0example of how this affects PHPUnit. > > I've code to do this on Windows: > > #if WIN32 > PHP_FUNCTION(get_php_process) > { > =A0 =A0char filename[1024]; > =A0 =A0GetModuleFileName(NULL, filename, 1024); > =A0 =A0RETURN_STRING(filename, 1) > } > #endif > > On linux, we currently do: > > $pid =3D getmypid(); > $process =3D "/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 > --=20 Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org