CodeIgniter Forums
Premature end of script headers - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Premature end of script headers (/showthread.php?tid=18780)

Pages: 1 2


Premature end of script headers - El Forum - 05-19-2009

[eluser]SeasonedCoder[/eluser]
If I disable loading the `mall` model it works (but I have to disable all the method called on this model), in this case the page is blank (!).


Premature end of script headers - El Forum - 05-19-2009

[eluser]Dam1an[/eluser]
So chances are, its something with the model?
Have you got any methods which only use a single method from this model?
If so, create a new model (rename the current one for now) and stub that method do the function executes as normal... Repeat until you find the exact cause of the problem


Premature end of script headers - El Forum - 05-19-2009

[eluser]SeasonedCoder[/eluser]
I guess I have figured out the problem (may be not the root of it, but at least I know how to fix it). This is really weird to me so far.

The thing is that in my controller I have a method called view(). And whenever I open a page that should map to index(), it gets redirected to this method as well.

Now, if I rename view() to, say, view1() it works perfectly.

Do you have a reasonable explanation for this?


Premature end of script headers - El Forum - 05-19-2009

[eluser]Dam1an[/eluser]
Huh? can you show the relevant code

Is this done via a redirect, calling the view method or a route?


Premature end of script headers - El Forum - 05-22-2009

[eluser]ConnorD[/eluser]
Maybe Ci didn't like you naming one of your methods after it's own $this->load->view(). That's the only other explanation I have.