2
We are using php://input
in the requests in Angularjs:
//método
public function putData() {
$params = file_get_contents("php://input");
return json_decode($params);
}
How it’s being used:
$postData = $this->putData();
$request = $this->getRequest();
$request->setParam('data',$postData->token);
I’ve tried to:
$GLOBALS['HTTP_RAW_POST_DATA'] = -1;
Also on htaccess:
<IfModule mod_php5.c>
php_flag always_populate_raw_post_data -1
</IfModule>
And in php.ini:
always_populate_raw_post_data = -1
And none of it worked. I’m using the Zendframework 1.12.20
To see the errors, we are using php-console, which accuses several such warnings.
There is no possibility to replace it with
php://input
? Since it is recommended.– Marcelo de Andrade
So, he already does this, the problem is that in php 5.6 he keeps giving this Warning.
– Ivan Ferrer
In the
php.ini
configure the linealways_populate_raw_post_data = -1
– Marcelo de Andrade
@Marcelodeandrade, I’ve done this, including put in the description of the question.
– Ivan Ferrer
You restarted your server after making the change in
php.ini
nominee?– Not The Real Hemingway
Yes, I restarted, it happened on two different machines, mac and windows.
– Ivan Ferrer