[Solved] PHP Error: always_populate_raw_post_data = -1

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

Solution: Under php.ini file: turn on always_populate_raw_post_data = -1 and then save and restart

Reason: Once enabled, you can receive data with $HTTP_RAW_POST_DATA, but usually we use php://input

Similar Posts: