Updated: 11 October 2026 · Applies to: cPanel & WHM 138, PHP 8.1 to 8.4
The always_populate_raw_post_data setting only exists in PHP 5.x, which is end of life. It was removed in PHP 7.0, so it cannot be set on current PHP versions (8.1 and newer), and cPanel's MultiPHP INI Editor does not offer it.
What to use instead
Read the raw request body from the php://input stream. It works in every PHP version:
<?php
$raw = file_get_contents('php://input');
$data = json_decode($raw, true); // for JSON requests
Replace every use of $HTTP_RAW_POST_DATA in the code with this. For multipart/form-data uploads the raw body is not available; use $_POST and $_FILES.
Messages you may see
- Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated: a PHP 5.6 warning. Move to a current PHP version and use
php://input. - Undefined variable $HTTP_RAW_POST_DATA: the code relies on the removed variable. Change it as shown above.
Find old code that still uses it
grep -rnF -e 'HTTP_RAW_POST_DATA' -e 'always_populate_raw_post_data' ~/public_html --include=*.php
Run it in cPanel Advanced › Terminal or over SSH. Each result shows the file and line to change.