CodeIgniter Forums
Tracking the "headers allready sent" error. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Tracking the "headers allready sent" error. (/showthread.php?tid=14280)



Tracking the "headers allready sent" error. - El Forum - 12-26-2008

[eluser]Bramme[/eluser]
Hi all

I'm getting the "headers allready" sent error online. The weird thing is: I only get it online, it works perfectly fine on localhost, which leads me to believe it's a server config item that's causing this.

I've kept all EllisLab's hint in check: end files with a comment, no closing ?>, no whitespace before and after the <?php or closing comment etc etc...

Is there any way of tracking this error? You can see it here: http://208.64.71.104/handinhand/admin/


Tracking the "headers allready sent" error. - El Forum - 12-26-2008

[eluser]Pascal Kriete[/eluser]
Do you get this on all pages, or just the admin dashboard?

I would probably recreate the file, manually type in the first & last line, and copy-paste the rest.


Tracking the "headers allready sent" error. - El Forum - 12-26-2008

[eluser]Bramme[/eluser]
only on the dashboard. I'll try that and report back!


Tracking the "headers allready sent" error. - El Forum - 12-26-2008

[eluser]Bramme[/eluser]
okay weird stuff: I emptied the dashboard controller (admin/ gets rerouted to admin/dashboard, as admin is just a subfolder) and now I get one "headers allready sent error" less. But I still get one and then I get the 404 page not found error. So it happens before my controller, is that possible?


edit: your solution worked. However not when done in Dreamweaver, it only worked after I editted them through winscp.


Tracking the "headers allready sent" error. - El Forum - 12-26-2008

[eluser]Bramme[/eluser]
Okay, this is ridiculous, it's causing problems on all my controllers. Could this have something to do with file encoding or smth like that?


Tracking the "headers allready sent" error. - El Forum - 12-26-2008

[eluser]Bramme[/eluser]
Okay, I'm starting to think it's an encoding issue.

They pop up again with every svn revision of my app. I'm thinking: encoding issue. But how do I solve it? What server setting could be causing this?

Okay, I found what's causing the errors, it's the same as my "whitespace problem" thread.
Code:
ï »¿

is added in front of my files and causes the errors.


Tracking the "headers allready sent" error. - El Forum - 12-26-2008

[eluser]Jelmer[/eluser]
I think you have the same problem I had a while ago when I somehow added a "byte-order marker" (BOM), it took me forever to figure out but somehow I accedently set my editor to add a BOM to my ASCII files by default.

My current editor (E-Texteditor) displays the ASCII encoding and other settings like this in the lower right corner of the editor, and allows editing it there. So I had it fixed pretty fast after figuring out the existence of a BOM, but I don't know how other editors handle it.


Tracking the "headers allready sent" error. - El Forum - 12-26-2008

[eluser]Bramme[/eluser]
that is indeed a setting in dreamweaver, but it was unchecked. I did change the unicode normalization form to "none" instead off C, let's see what that gives.


Tracking the "headers allready sent" error. - El Forum - 12-28-2008

[eluser]Bramme[/eluser]
For the records (if anyone might ever acounter this same problem): it was indeed the BOM signature. Even though the setting was unchecked in Dreamweaver, it apparently added one, causing all the problems.

I have encountered the same problem with PhpEdit, but there's a setting that allows you to pick UTF8 encoding without the BOM that actually works.

Thanks for setting me in the right direction Jelmer!