Bug #70538 [NEW]: "php-fpm -i" crashes
| From: | rainer dot jung at kippdata dot de | Date: | Sun, 20 Sep 2015 21:50:12 +0000 |
| Subject: | Bug #70538 [NEW]: "php-fpm -i" crashes | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-196120@lists.php.net to get a copy of this message | ||
From: rainer dot jung at kippdata dot de
Operating system: Any
PHP version: 7.0.0RC3
Package: FPM related
Bug Type: Bug
Bug description:"php-fpm -i" crashes
Description:
------------
Executing "php-fpm -i" crashes. This is due to the commit abb616ae which
is a merge of the cgi commit 6bc16cce to fpm.
The crash happens, because in sapi/fpm/fpm/fpm_main.c in function
sapi_cgi_register_variables() the variable request is NULL in line
char *path_info = FCGI_GETENV(request, "PATH_INFO");
Before the merge the line was
char *path_info = sapi_cgibin_getenv("PATH_INFO", sizeof("PATH_INFO") -
1);
and sapi_cgibin_getenv() falls back to simple getenv() if request is
NULL (and also if fpm_is_running is not set. The original change in cgi
should not have this problem, only the port to fpm can execute "phpinfo"
without actually running a real request.
I'll try if it is enough to simply change the one line back for a fix,
or if the crash then moves to a later place in code and more work needs
to be done.
Test script:
---------------
Run php-fpm -i
--
Edit bug report at https://bugs.php.net/bug.php?id=70538&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70538&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70538&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70538&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=70538&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=70538&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=70538&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=70538&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=70538&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=70538&r=support
Expected behavior: https://bugs.php.net/fix.php?id=70538&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=70538&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=70538&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=70538&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70538&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=70538&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=70538&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=70538&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70538&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=70538&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=70538&r=mysqlcfg