重新搭建了一个PHP运行环境,发现运行项目时报如下错误:

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

查找原因后,发现错误原因如下:
官方在PHP5.6就把$HTTP_RAW_POST_DATA废弃了,而且在PHP7中把它移除了。因为这个参数影响性能,所以要废弃掉,官方建议用php://input来代替。

解决办法:
修改php.ini

always_populate_raw_post_data = -1

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-03-09
  • 2021-08-23
  • 2021-07-17
  • 2022-12-23
  • 2022-12-23
  • 2021-08-25
猜你喜欢
  • 2022-12-23
  • 2022-02-02
  • 2021-10-21
  • 2021-05-04
  • 2021-12-12
  • 2022-01-13
  • 2021-09-02
相关资源
相似解决方案