Determining the exact location of the CLI executing the current

Determining the exact location of the CLI executing the current

am 24.08.2009 16:12:21 von Richard Quadling

Hi.

Seems like I'm missing something REALLY obvious.

I can find the name of the script at runtime, the parameters, the
SAPI, etc. Loads of info.

But I can't seem to find the exact name of the executable handing the script.

Which seems a little odd.

Unless I'm missing something.

Regards,

Richard.

--
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Determining the exact location of the CLI executing thecurrent script?

am 24.08.2009 16:22:38 von harlequin2

Hi Richard,

Richard wrote:
> But I can't seem to find the exact name of the executable handing the
> script.
>
> Which seems a little odd.

you are right, I couldn't find it either! All I get is:

Server API: Command Line Interface -> command line call
Server API: CGI/FastCGI -> handled by IIS

so it seems as if the path to the executable is not detectable? I wonder if there is an undocumented way to access this property?

Regards,

Sascha

--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Determining the exact location of the CLI executing the

am 24.08.2009 16:52:10 von Stut

2009/8/24 Richard Quadling :
> Hi.
>
> Seems like I'm missing something REALLY obvious.
>
> I can find the name of the script at runtime, the parameters, the
> SAPI, etc. Loads of info.
>
> But I can't seem to find the exact name of the executable handing the script.
>
> Which seems a little odd.
>
> Unless I'm missing something.

There is nothing built-in to get you this, but assuming you're on a
unix platform you can use an evil combination of getmypid() and
executing ps to get what you want. I'm sure similar is possible under
Windows but either way it's not very clean.

-Stuart

--
http://stut.net/

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php