I switched to PHP 5.6.0 and now I get the following warning everywhere:
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
Fine, I rely on some deprecated feature. Except that I don't!
- I haven't ever used this variable in any of my scripts. To be honest I had no idea it even exists.
phpinfo()
shows that I havealways_populate_raw_post_data
set to 0 (disabled). So what is going on?
I don't want to "avoid the warning" by setting this value to -1. This will just hide the warning, and I'll still have deprecated configuration. I want to solve the problem at its source and know why PHP thinks that HTTP_RAW_POST_DATA
populating is turned on.
Uncommenting the
in php.ini ( line# 703 ) and restarting APACHE services help me get rid from the message anyway
Been awhile until I came across this error. Put up my answer for anyone who may stumble upon this issue.
The error only means that you are sending an empty POST request. This error is commonly found on HTTPRequests with no parameters passed. To avoid this error, you can always add a parameter to the POST without changing the php.ini.
Like:
; always_populate_raw_post_data = -1 in php.init remove comment of this line .. always_populate_raw_post_data = -1