I'm sending raw image data from flash to php. However the $HTTP_RAW_POST_DATA always comes up as null. I tried also using file_get_contents('php://input')
to no avail. I also made sure that always_populate_raw_post_data
is set to On. I also check phpinfo() and the Server API is Apache 2.0 Handler, so I'm assuming that means I'm not running in FastCGI.
Asked
Active
Viewed 740 times
0

LoneWolfPR
- 3,978
- 12
- 48
- 84
-
Why do you need the raw post data? Flash makes a web request the same as any browser does. The data should populate $_POST if there was any post data. I would check that you are not sending the data via get instead of post and/or verify that you are actually posting data in flash. – Jonathan Kuhn Apr 09 '14 at 17:37
-
Is the post `enctype="multipart/form-data"`? If so then `$HTTP_RAW_POST_DATA` and `php://input` won't work. – AbraCadaver Apr 09 '14 at 17:39
-
we recently moved our site to a new server. It worked fine on the old server as is. The new server however is having problems. Both are running PHP 5.3.3. The only difference that I'm aware of is that the new server is running SELinux – LoneWolfPR Apr 09 '14 at 17:41
-
1the issue was that our site forces a redirect for all http requests to https. The flash was passing everything to http, so it was being redirected to https causing the post data to get lost. – LoneWolfPR Apr 09 '14 at 18:28
-
@LoneWolfPR What did you do in order to solve the problem? I am having the same issue, using php 5.4. I am making an API call with GZIP data and decompressing with $HTTP_RAW_POST_DATA. I have also used php://input and nothing works. It worked on another server. – Kenneth Streit Mar 24 '15 at 04:22