Welcome Guest, Not a member yet? Register   Sign In
Cannot modify header information - headers already sent problem
#11

[eluser]Derek Allard[/eluser]
Great stuff. Glad you have it Pk, welcome to CodeIgniter!
#12

[eluser]CodeMagician[/eluser]
[SOLVED]

[SOLUTION] It's due to having some text being sent to the browser before all the header items have completed. Yes, exactly as the CI Administrator stated.

[CASE] In my case it was extra space at the bottom of my Helper page, after the last closing ?> tag.

Hope that helps Smile
#13

[eluser]troy_mccormick[/eluser]
Did you really feel the need to bump a two year old thread just to let us know you found the same mistake the original poster had found two years ago? I'm confused...
#14

[eluser]Unknown[/eluser]
PK Byron I wasted almost 2 hours due to this 'problem' and your solution (enconding the file to UTF8) solved my problem! Thanks for sharing this!

troy_mccormick I really felt like I should thank PK Byron for sharing his solution, even when he posted almost 2 years ago, as I have checked my file thousand times for blank spaces and the problem was solved just by changing the encoding!

Cheers!
#15

[eluser]yayot[/eluser]
[quote author="Derek Allard" date="1204717343"]welcome to CodeIgniter kaging. That's a very common error, if you search the forums you'll find lots of people having that issue, and its always the same solution. Look for spaces or line breaks before your opening <?php tag.[/quote]

That just happend to me, a space before me opening tag was exactly the problem

Thanks!
#16

[eluser]Mojtaba[/eluser]
i've had the same problem with session. i looked for any extra spaces in any file but nothing found!
i just turned on output_buffering in php.ini and yess it workedd!
#17

[eluser]Bart v B[/eluser]
[quote author="Mojtaba" date="1283475358"]i've had the same problem with session. i looked for any extra spaces in any file but nothing found!
i just turned on output_buffering in php.ini and yess it workedd![/quote]

I think that is working around the real problem here.. Tongue

Did you put the end tags on youre files?

say something like this:

Code:
<?php

echo 'hello world!';

?>

Then you can remove the end tag (?&gtWink, and maybe youre problem is solved..
A better example:
Code:
<?php

class Test extends Controller()
{
  public function index()
  {
    echo 'Controller Test called!';
  }
}

?&gt; <- this end tag must be removed..
#18

[eluser]Unknown[/eluser]
Hey guys! This post helped me a lot Smile Apparently I also had some issues with encoding and line endings. I edited some files and it was all running smoothly again Smile

I posted my experience here:

http://www.ixpiabot.com/?p=209

Thanks!




Theme © iAndrew 2016 - Forum software by © MyBB