always_populate_raw_post_data报错

问题

当你在维护项目时候遇到如下问题:
always_populate_raw_post_data报错,提示不建议使用$HTTP_RAW_POST_DATA

Invalid JSON:
Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0

Warning: Cannot modify header information - headers already sent in Unknown on line 0

方法

1 通过修改php.ini配置文件:


image.png

2 或者直接升级到php7,官方说明: 点我打开

image.png

你可能感兴趣的:(always_populate_raw_post_data报错)