Left khtml in the response Ajax?

Good day.
The kind of hell going on.
There is a project, the customer took it to a local machine under a dedicated IP, there own BULBS, as I understand it from the structure. There is a copy in the normal human host (where the following issues are not available).

On the website the form is submitted, the response waiting in JSON'e, only instead of normal response the json coming from some obscure divas, whose origin I can not understand.
<div style="display: block;"><div style="display: block;"><div style="display: block;">{"type":"success","title":"\u0413\u043e\u0442\u043e\u0432\u043e!","text":"\u042d\u043a\u0437\u0430\u043c\u0435\u043d \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u043c\u043e\u0434\u0435\u0440\u0430\u0442\u043e\u0440\u0443 \u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443."}

what dev version does not.
In the error handler there is, in fact, return only the string response
 'type' => 'success',
 'title' => 'Done!',
 'text' => 'Exam sent to moderator for review. <a href="' . nc_folder_path(5) . '">Back to courses</a>' 

And, on the same server, for some reason, stopped recording custom cookies, but the session are written normally.
Trying to find a relationship between these two shoals, as though a suspicion in their LAMPS Assembly, but in this case to draw attention - in a head did not come.
March 12th 20 at 08:41
1 answer
March 12th 20 at 08:43
in your code ob_ functions are there ?
before displaying die(json_ add

if the trash does not sell the reason may be in avtomobilyami php scripts written at the level of config php and Apache
I note the decision, but there's really before output die was a function, hidden in the bowels of the project, where one friend managed inadvertently left these devki instead of writing to a variable to bring them through the echo.
Bastard, 4 hours down the drain!

But, anyway, thanks! - Edd_MacGyver commented on March 12th 20 at 08:46
suggest output before json so

function json_responce($len=null){
 // Clean output buffer
 if (ob_get_level() !== 0 && @ob_end_clean() === FALSE)

 header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
 header("Cache-Control: post-check=0, pre-check=0", false);
 header("Pragma: no-cache");
 header('Content-Type: application/json');
 header('Content-Length:' . $len);
- Euna.Schamberger commented on March 12th 20 at 08:49
first it to clean the output stream and the formation of the headers , and after that you need to withdraw - Euna.Schamberger commented on March 12th 20 at 08:52

Find more questions by tags JSONAJAX