1.2.3. $HTTP_RAW_POST_DATA Usage¶
$HTTP_RAW_POST_DATA
is deprecated, and should be replaced by php://input
.
$HTTP_RAW_POST_DATA
is deprecated since PHP 5.6.
It is possible to prepare code to this lack of feature by setting always_populate_raw_post_data
to -1.
<?php
// PHP 5.5 and older
$postdata = $HTTP_RAW_POST_DATA;
// PHP 5.6 and more recent
$postdata = file_get_contents(php://input);
?>
See also $HTTP_RAW_POST_DATA variable.
1.2.3.1. Connex PHP features¶
1.2.3.1.1. Suggestions¶
Use php://input with fopen() instead.
1.2.3.1.2. Specs¶
Short name |
Php/RawPostDataUsage |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
All |
Severity |
Major |
Time To Fix |
Slow (1 hour) |
Precision |
Very high |
Available in |