Fixing “Automatically populating $HTTP_RAW_POST_DATA is deprecated”

To reproduce try:

curl -X POST -H "Content-Type: application/json" -d "{foo: bar}" http://example.com

Great explanation can be found at https://www.bram.us/2014/10/26/php-5-6-automatically-populating-http_raw_post_data-is-deprecated-and-will-be-removed-in-a-future-version/

For me the solution on the shared hosting was adding the following line in .htaccess:

php_value always_populate_raw_post_data -1

Thanks to https://www.drupal.org/node/2485847#comment-10068266

Advertisements

Author: Michal Zuber

Full stack developer, biker and rollerblader. Owner and developer at https://nevilleweb.sk/ Co-founded http://neville.sk/ Blog at https://michalzuber.wordpress.com/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s