[eluser]Unknown[/eluser]
Hi,
I had similar problem and I would like to share info on my case
I was trying to implement JSON reply with CodeIgniter but when I try to change the headers using "header("content-type:application/json")";, I got the following unexpected response.
Code:
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at D:\xampp\htdocs\filemoo\system\application\controllers\vote.php:1)
Filename: controllers/vote.php
Line Number: 21
I then change the file encoding from UTF-8 to ANSI using Notepad++, a free text editor. And the error was gone
But since I am in Asian countries, I do need UTF-8 support. So I changed the encoding from UTF-8 to UTF-8 without BOM. And then everything is going as expected. The BOM (Byte-order mask) at the beginning of UTF-8 file maybe the culprit.