-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expected application/json response, got text/html after moving to web server #65
Comments
The error is pretty explicit. The Broker didn't receive JSON from the server. Maybe the URL is misconfigured or there is somekind of server error. I can't tell. You need to debug to see what the server has send. |
i think the most problem with getallheaders(), as example running with PHP-FPM. So maybe you must put this code on your script
thank you, sorry for bad english |
I got the same error while integrating it with Laravel 5.4. This is how i solved it: Now return from your controller with json header, for example in case of laravel i did:
|
I've problem with getting error "Expected application/json response, got text/html ". On my localhost it works well but not from web server. I'm running Pl*sk and base with FatFreeFramwork, tried to switching php version but nothing happens, even to put "curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);" into broker.php as @petitbx said. But for php 7.0 i got this error "Broker didn't send a session key".
![](https://camo.githubusercontent.com/c52b3b26b2321d3315d8d003f0794402d43f2925588ed31097e6bf64b81e784c/687474703a2f2f692e696d6775722e636f6d2f6c4875515364762e706e67)
![](https://camo.githubusercontent.com/7ed8431d9ec03133c40cd7061c05ace8bd98531162f4d40d04496d1523cffbac/687474703a2f2f692e696d6775722e636f6d2f557652696233302e706e67)
![](https://camo.githubusercontent.com/6045313aa13a95a49069ae75da54ca5232a24e6d65ea24382db24649dc1ab668/687474703a2f2f692e696d6775722e636f6d2f34706a6f5143502e706e67)
Thx
php 7.1
php 7.0.15
The text was updated successfully, but these errors were encountered: