Problems receiving POST variables from PHP
one text
Solution:
The php://input
stream can only be read once per request. Yii is likely reading the payload before you can, which means that the body is empty when you read the data.
Instead of using php://input
, try the following:
$data = json_decode(Yii::app()->request->getRawBody(), true);
Source