在php5.6下Hprose for PHP报错:Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version.的解决

1、打开:https://github.com/hprose/hprose-php/blob/master/README_zh_CN.md ,下载Hprose for PHP;

2、以http://www.hprose1.com/http_server.php为服务端,运行结果如图1:

以http://www.hprose1.com/http_server.php为服务端,运行结果

以http://www.hprose1.com/http_server.php为服务端,运行结果

3、以http://www.hprose2.com/http_client.php为客户端,运行结果如图2:报错:

以http://www.hprose2.com/http_client.php为客户端,运行结果,报错:Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version.

以http://www.hprose2.com/http_client.php为客户端,运行结果,报错:Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version.

4、在php.ini文件中设置:always_populate_raw_post_data = -1,以http://www.hprose2.com/http_client.php为客户端,再次运行结果如图3:

在php.ini文件中设置:always_populate_raw_post_data = -1

在php.ini文件中设置:always_populate_raw_post_data = -1

以http://www.hprose2.com/http_client.php为客户端,再次运行结果:Hello World

以http://www.hprose2.com/http_client.php为客户端,再次运行结果:Hello World

 

注:https://bugs.php.net/bug.php?id=66763

原创文章,作者:carmelaweatherly,如若转载,请注明出处:https://blog.ytso.com/tech/webdev/180185.html

(0)
上一篇 2021年10月31日 05:06
下一篇 2021年10月31日 05:19

相关推荐

发表回复

登录后才能评论