I'm running PHP under Apache and I'd like to send a slow trickle of POST data to the page that will write messages into a database as the POST data arrives. I'm sending the data from a .NET app using WebRequest
and I've set SendChunked
to true.
Unfortunately, it looks like the PHP script doesn't start executing until all the POST data has arrived. I looked in the apache log, and I see that the request starts right away, but echo strftime(...)
statements in the PHP script show that it isn't running until after all the POST data was received.
Is there any way to tell PHP to start right away? I tried setting always_populate_raw_post_data = Off
in the PHP.ini file, but that didn't make any difference. My request has a content type of application/octet-stream
, and $HTTP_RAW_POST_DATA
is still filled with all the POST data.