Welcome Guest, Not a member yet? Register   Sign In
HELP!!! Header already sent...
#1

[eluser]herlos[/eluser]
Hello,
I'm just freaking out!! Never had this error before and can't find the reason...
Since 30 minutes, I get the following error, when I open a page:

Quote:A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at E:\xampp\htdocs\eventsmanager\application\controllers\admin.php:1)

Filename: libraries/Session.php

Line Number: 671

Could you please help me?? Already removed ALL the code from my controller, excepting the constructor, but still get that error. Like I said, never got that before...

Thank you!

Johannes
#2

[eluser]Sudz[/eluser]
post the first line of admin.php.
"<?php" must be the first word in your php file withot any space.
#3

[eluser]herlos[/eluser]
Yeah, it is.
I found the reason: Changed the coding from UTF-8 to ANSI, now it's working again ... changed it to URF-8 before, because of umlauts.
But please tell me, why the coding can be a reason? Does a file in the UTF-8 format contain chars before the content??
#4

[eluser]Sudz[/eluser]
I don't know about 'UTF-8 to ANSI',
but if you echoed somthing prior to sending header
or leaving any space prior to '<?php' tag in the first line of a file
You will get same error. as i experienced
#5

[eluser]WanWizard[/eluser]
Do not change the encoding from utf-8 to something else, that will lead to issues in your views.

Just make sure you use a proper text editor, that can save utf-8 files without a BOM header.
#6

[eluser]InsiteFX[/eluser]
If you want to change the encoding you need to copy the code to the clipboard and paste it in to a new utf8 document, this is because it saves the byte marker with the code in the file!

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB