Bug #75741 [NEW]: enable_post_data_reading not working on PHP-FPM

From: Date: Thu, 28 Dec 2017 01:22:04 +0000
Subject: Bug #75741 [NEW]: enable_post_data_reading not working on PHP-FPM
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-213302@lists.php.net to get a copy of this message
From: manhiro at gmail dot com Operating system: CentOS 6.7 PHP version: 7.1.12 Package: FPM related Bug Type: Bug Bug description:enable_post_data_reading not working on PHP-FPM Description: ------------ Apache 2.4.6 PHP 7.1.12 I'm trying to manually parse multipart form data on PHP-FPM. When I set the 'enable_post_data_reading = Off' in php.ini file, I can get raw post data. Example: $handle = fopen("php://input", "rb"); while (!feof($handle)) { // do something } However, when I set that in .user.ini file, I can't get raw post data. I think that the .user.ini file is correct because phpinfo() shows as bellow. Local Value | Master Value ---------------------------- Off | On Note: sapi_activate() in the file main/SAPI.c: ---------------------------- /* Handle request method */ if (SG(server_context)) { if (PG(enable_post_data_reading) && SG(request_info).content_type && SG(request_info).request_method && !strcmp(SG(request_info).request_method, "POST")) { /* HTTP POST may contain form data to be processed into variables * depending on given content type */ sapi_read_post_data(); } else { SG(request_info).content_type_dup = NULL; } /* Cookies */ SG(request_info).cookie_data = sapi_module.read_cookies(); } if (sapi_module.activate) { sapi_module.activate(); } if (sapi_module.input_filter_init) { sapi_module.input_filter_init(); } ---------------------------- I guess that the above code to handle request method is executed before loading .user.ini file. -- Edit bug report at https://bugs.php.net/bug.php?id=75741&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75741&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75741&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75741&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=75741&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=75741&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=75741&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=75741&r=needscript Try newer version: https://bugs.php.net/fix.php?id=75741&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=75741&r=support Expected behavior: https://bugs.php.net/fix.php?id=75741&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=75741&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=75741&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=75741&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75741&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=75741&r=dst IIS Stability: https://bugs.php.net/fix.php?id=75741&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=75741&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=75741&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=75741&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=75741&r=mysqlcfg

« previous php.bugs (#213302) next »