Edit report at https://bugs.php.net/bug.php?id=60826&edit=1
ID: 60826 Comment by: a...@php.net Reported by: clarkwise at gmail dot com Summary: raw POST data missing with chunked encoding, FastCGI Status: Assigned Type: Bug Package: CGI/CLI related Operating System: Windows XP PHP Version: 5.3.9 Assigned To: ab Block user comment: N Private report: N New Comment: @clarkwise at gmail dot com So could you confirm it works with nginx+chunkin? As well, it's was not hanging with IIS (v7.5) for me. Which IIS version do you have? Previous Comments: ------------------------------------------------------------------------ [2012-02-09 19:17:27] a...@php.net I've additionally tested the two files on nginx with PHP as FCGI. The request simply doesn't go throught to PHP and nginx gives 401 back. I've attached gdb to the PHP and set a break in the accept loop - there was no reaction when using the two test files, but requests without data got down to PHP. So my conclusion were - apache simply ignores the request body where nginx gives a correct http status. Anyways, this has nothing to do with PHP. IIS, Apache and Nginx seem to have no implementation for chunked incoming body stuff, but they do handle that a different way. Btw. Nginx has the "chunkin" module for such actions. ------------------------------------------------------------------------ [2012-02-02 00:35:42] timo dot witte at googlemail dot com I have the same problem on my machine and can confirm this bug! i think this bug affects mod_spdy aswell, because it sends the POST data chunked! ( http://code.google.com/p/mod-spdy/issues/detail?id=22 ). ------------------------------------------------------------------------ [2012-01-20 21:15:54] clarkwise at gmail dot com Description: ------------ When a POST is sent with the header "Transfer-Encoding: chunked" and PHP 5.3 is running via FastCGI, $HTTP_RAW_POST_DATA is not set. In IIS, the receiving PHP process simply hangs and does not execute at all. If chunked encoding is not set, it executes successfully and $HTTP_RAW_POST_DATA is populated. Comparing ISAPI to FastCGI (using PHP 5.2 which has both implementations), PHP ISAPI works fine with "Transfer-Encoding: chunked" but PHP FastCGI does not. This issue also occurred running Linux/Apache with PHP 5.3 FastCGI. In that scenario, the PHP process did not completely hang, but $HTTP_RAW_POST_DATA and php://input were empty when the script executed. Test script: --------------- Two files, postsend.php and postreceive.php, can be found within the question here: http://stackoverflow.com/questions/8899239/http-raw-post-data-not-being-populated-after-upgrade-to-php-5-3 Expected result: ---------------- $HTTP_RAW_POST_DATA and the php://input stream should contain the raw binary data that was sent in the POST. Actual result: -------------- On Windows/IIS, the PHP process hangs and does not execute. On Linux/Apache, the PHP process executes but $HTTP_RAW_POST_DATA and php://input are empty. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=60826&edit=1