From: Operating system: Windows XP PHP version: 5.3.9 Package: CGI/CLI related Bug Type: Bug Bug description:raw POST data missing with chunked encoding, FastCGI
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 bug report at https://bugs.php.net/bug.php?id=60826&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60826&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60826&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60826&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=60826&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60826&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=60826&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=60826&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=60826&r=needscript Try newer version: https://bugs.php.net/fix.php?id=60826&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=60826&r=support Expected behavior: https://bugs.php.net/fix.php?id=60826&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=60826&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=60826&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=60826&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=60826&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=60826&r=dst IIS Stability: https://bugs.php.net/fix.php?id=60826&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=60826&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=60826&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=60826&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=60826&r=mysqlcfg