PHP出现Deprecated Automatically populating is deprecated and will be removed in a future version

本地新搭建的PHP环境,出现下面的问题:

1
2
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

这个问题和PHP版本有关系,PHP 5.6已经废弃了$HTTP_RAW_POST_DATA。
解决方法:
修改php.ini

1
always_populate_raw_post_data = -1

重启PHP即可

  • 作者: Sam
  • 发布时间: 2017-12-05 23:24:30
  • 最后更新: 2019-12-09 23:03:26
  • 文章链接: https://ydstudios.gitee.io/post/96d1bc5c.html
  • 版权声明: 本网所有文章除特别声明外, 禁止未经授权转载,违者依法追究相关法律责任!