浏览代码
merged branch stealth35/patch-16 (PR #3487)
Commits
-------
caa44ae Only work with the cli sapi
e2fc3cd [Process] PHP_BINARY return the current process
Discussion
----------
[Process] PHP_BINARY only return the current sapi process
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
PHP_BINARY return the current process, so under the apache module I get (on Windows) `httpd.exe`
---------------------------------------------------------------------------
by vicb at 2012-03-02T14:48:04Z
Could it be '.../php5' ?
Is it a PHP bug ?
---------------------------------------------------------------------------
by stealth35 at 2012-03-02T15:00:57Z
@vicb
> Could it be '.../php5' ?
Yes, but it's not the standard installation, you also call you php executable 'blabla.exe'
> Is it a PHP bug ?
I'don't now, I think it's get the SAPI but If it's work under Unix so yes it's a PHP Bug
http://lxr.php.net/opengrok/xref/PHP_5_4/main/main.c#binary_location
I'll test this on my Mac
---------------------------------------------------------------------------
by vicb at 2012-03-02T15:08:25Z
@stealth35
* asking about 'php5' because it seems some systems use this name,
* would testing for a cli sapi be more robust than making assumptions about the process name ?
---------------------------------------------------------------------------
by stealth35 at 2012-03-02T15:24:24Z
@vicb yes I think it's better
Anybody can test `PHP_BINARY` with some sapi like : `cgi`, `cgi-fcgi`, `fpm-fcgi` ... ?