PHP 5.6 deprecated error

dutchbb

Well-known member
#1
On php 5.6 you get this error:

PHP 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

Can you safely set always_populate_raw_post_data to -1 ? Or just ignore the error?
 

dutchbb

Well-known member
#2
Ok, did some research and it is just a notice it will be removed in future versions so you don't have to change anything. Only when you don't want to get the error, but no idea if always_populate_raw_post_ date is used on xenforo. I think not because many are using php 7 and 7.1 without a problem.
 

dutchbb

Well-known member
#3
On the other hand i read here the error will only show when it is used.

always_populate_raw_post_data will now generate an E_DEPRECATED error when$HTTP_RAW_POST_DATA is populated. New code should use php://input instead of $HTTP_RAW_POST_DATA, which will be removed in a future release. You can opt in for the new behaviour (in which $HTTP_RAW_POST_DATA is never defined hence no E_DEPRECATED error will be generated) by setting always_populate_raw_post_data to -1.

http://php.net/manual/en/migration56.deprecated.php
 
Top