Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error $HTTP_RAW_POST_DATA is deprecated, use the php://input stream instead."

Using PHP 5.6.2 on MAMP. I upgraded Laravel from 4.1 to 4.2, after fixing some errors and changes as described in Laravel's upgrade docs, I finally get this error:

"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."

Why is that? Where should I change any code? I am not using $HTTP_RAW_POST_DATA anywhere in my code.

I also changed my php.ini as stated, same error... How can I solve this?

like image 602
Shlomo Avatar asked Nov 24 '14 14:11

Shlomo


2 Answers

The solution to this problem was editing the right php.ini. Then everything worked.

like image 187
Shlomo Avatar answered Nov 05 '22 09:11

Shlomo


Please use :

Content-Type = application/x-www-form-urlencoded 

To solve this issue.

like image 22
Kaushik solanki Avatar answered Nov 05 '22 10:11

Kaushik solanki