PHP error log: PHP deprecated:automatically populating $HTTP _raw_post_data is Deprecated

Source: Internet
Author: User
Tags deprecated php error php error log

After upgrading the online PHP service to version 5.6.x a few days ago, Php-error.log reported an error:
PHP deprecated:automatically populating $HTTP _raw_post_data is Deprecated

Reason:
The above error means "Automatic variable $http_raw_post_data obsolete (deprecated)"
This issue is related to the PHP version, the PHP5.6 after the high version has been deprecated $http_raw_post_data this global variable setting, you can use Php://input instead of $HTTP _raw_post_data.
Using always_populate_raw_post_data causes e_deprecated errors to be generated when the $http_raw_post_data is populated.
Set Always_populate_raw_post_data as-to experience new behavior because it forces $HTTP _raw_post_data undefined, and therefore does not cause e_deprecated errors) to experience the new behavior.


Workaround:
To modify the php.ini configuration file:
[Email protected] etc]# vim php.ini
........
; Always populate the $HTTP _raw_post_data variable.
; always_populate_raw_post_data = On
Always_populate_raw_post_data =-1
.......

Then restart the PHP service!

PHP error log: PHP deprecated:automatically populating $HTTP _raw_post_data is Deprecated

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.