This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » legacy support » symfony 1.0 » Warning: Cannot modify header information - headers already sent by
Warning: Cannot modify header information - headers already sent by [message #97076] Sat, 10 April 2010 09:01 Go to next message
gaurangrajvir  is currently offline gaurangrajvir
Messages: 156
Registered: May 2007
Location: RAJKOT
Senior Member
Hello

i search a lot in forum but didnt found any solution..

i just create one action and put code like below

public function executeTest()
{
echo "DD";
return sfView::NONE;
}

it give me warning


DD Warning: Cannot modify header information - headers already sent by (output started at <path>/actions.class.php:102) in /usr/share/pear/symfony/response/sfWebResponse.class.php on line 264



while i tried same code in another application then it is working fine...


what is the problem...


anywhere need to check...or any point where i m able to debug this error..


Thanks in advance
- Gaurang
Re: Warning: Cannot modify header information - headers already sent by [message #97164 is a reply to message #97076 ] Mon, 12 April 2010 11:23 Go to previous messageGo to next message
gaurangrajvir  is currently offline gaurangrajvir
Messages: 156
Registered: May 2007
Location: RAJKOT
Senior Member
anyone know about this...then pls suggest
Re: Warning: Cannot modify header information - headers already sent by [message #97269 is a reply to message #97164 ] Tue, 13 April 2010 13:55 Go to previous messageGo to next message
gaurangrajvir  is currently offline gaurangrajvir
Messages: 156
Registered: May 2007
Location: RAJKOT
Senior Member
anyone know..?
Re: Warning: Cannot modify header information - headers already sent by [message #97276 is a reply to message #97076 ] Tue, 13 April 2010 15:36 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Is your illustrated echo statement at line 102 in actions.class.php?


Remember Palestine
Re: Warning: Cannot modify header information - headers already sent by [message #97277 is a reply to message #97076 ] Tue, 13 April 2010 15:38 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
I would have thought this would work, if you echo out in your action, then return sfView::NONE. Alternatively I think you can throw an sfStopException, but from memory I have not had to do that.

In general though I reserve this technique for when I am echoing out binary data e.g. a dynamically created PDF or bitmap. In most other cases I just let the template take over, even if all it has to do is render a variable.


Remember Palestine
Re: Warning: Cannot modify header information - headers already sent by [message #97307 is a reply to message #97277 ] Wed, 14 April 2010 06:03 Go to previous messageGo to next message
gaurangrajvir  is currently offline gaurangrajvir
Messages: 156
Registered: May 2007
Location: RAJKOT
Senior Member
thanks for reply

yes i just echo in the actions class and return sfview::none..


but in same another project it is working..but in same copy of project it gives the warning message...

Re: Warning: Cannot modify header information - headers already sent by [message #97327 is a reply to message #97076 ] Wed, 14 April 2010 11:04 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
OK, so answer my question from 14:36 yesterday, please?


Remember Palestine
Re: Warning: Cannot modify header information - headers already sent by [message #97328 is a reply to message #97076 ] Wed, 14 April 2010 11:06 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Also, do you have any:
  • Non-standard filters
  • preExecute code
  • postExecute code


Remember Palestine
Re: Warning: Cannot modify header information - headers already sent by [message #102973 is a reply to message #97328 ] Fri, 23 July 2010 05:58 Go to previous message
gaurangrajvir  is currently offline gaurangrajvir
Messages: 156
Registered: May 2007
Location: RAJKOT
Senior Member
HI thanks for reply

i will check that...
Previous Topic:create database
Next Topic:Propel 1.5 for Symfony 1.0?
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software