Problem with $ HTTP_RAW_POST

0

Good morning.  I was making a Vue.js connection with Axios and Laravel and I noticed this problem. 1. I added a method and wanted to show the element by console.

  methods: {
        newThought(){
            const params = {
                description: this.description
            }
            axios.post('/thoughts', params).then((Response) => console.log(Response));

            this.$emit('new', thought);
            this.$description = '';
        }
    }

I checked it in the search engine on the Network tab and the following line came out

  

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 : Can not modify header information - headers already sent in Unknown on line 0   {"description": "Thought", "user_id": 1, "updated_at": "2018-05-29 11:22:55", "created_at": "2018-05-29 11:22:55", " id ": 2}

that same data comes out in place of the Data that I expected.

I'm using Wamp. I leave the github repo in case the problem requires me to know if I do something else wrong.

link

    
asked by Cragser 29.05.2018 в 18:39
source

1 answer

0
  

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: Can not modify header information - headers already sent in   Unknown on line 0   {"description": "Thought", "user_id": 1, "updated_at": "2018-05-29   11:22:55 "," created_at ":" 2018-05-29 11:22:55 "," id ": 2}

After doing my research, I report that the error was caused by WAMP, a problem directly from the local server that I used. The most viable solution I had at that time was to change to an alternative called Laragon, in which it worked great for me.

But you can try to change the PHP.ini configuration and directly the host configuration in windows; however, the ideal to my point of view is that if you have this error, try it on a virtual machine first with a Linux distro.

Good morning.

    
answered by 04.06.2018 в 17:57