Welcome Guest, Not a member yet? Register   Sign In
Output.php with compress_output = true, always calls ob_start(‘ob_gzhandler’) causing warning with ajax
#3

[eluser]Felice Ostuni[/eluser]
I ve the same problem on php 5.2 (and CI 1.7.3) with $config['compress_output'] = TRUE;

problem is on "ajax methods" where I send output with somethings like (innstead using views):
Code:
...
echo json_encode($myarray);

I solved with 2 more lines (explicit content type, and a die):
Code:
...
header("Content-type: application/json; charset=utf-8");
echo json_encode($myarray);
die;

Hope this help


Messages In This Thread
Output.php with compress_output = true, always calls ob_start(‘ob_gzhandler’) causing warning with ajax - by El Forum - 06-01-2011, 07:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB