According to the PHP manual, php://input is not available with enctype="multipart/form-data".
. If this is what's being POSTed to you, PHP will not allow you to access the raw data.
One workaround to this issue:
(source: https://stackoverflow.com/questions/1361673/get-raw-post-data)
Add this to your apache.conf:
<Location "/backend/XXX.php">
SetEnvIf Content-Type ^(multipart/form-data)(.*) MULTIPART_CTYPE=$1$2
RequestHeader set Content-Type application/x-httpd-php env=MULTIPART_CTYPE
RequestHeader set X-Real-Content-Type %{MULTIPART_CTYPE}e env=MULTIPART_CTYPE
</Location>
As of PHP 5.4, there is also the "enable-post-data-reading" ini setting (http://php.net/manual/en/ini.core.php#ini.enable-post-data-reading).
From the PHP manual: "Disabling this option causes $_POST and $_FILES not to be populated. The only way to read postdata will then be through the php://input stream wrapper. This can be useful to proxy requests or to process the POST data in a memory efficient fashion."
Try disabling this setting and then reading from php://input
.