This is the order of processing, when you request a symfony page: - the action is executed (this is where you put your var_dump) - the actions template is rendered - the output is decorated with the layout
I cannot think of any way you could execute your code after the last step - as far as I understand you want to do this. I recommend you put your var_dump in the template (second step above) - it's not the bottom of the page, but it's good enough, it's only for debugging anyway. On Mon, Nov 16, 2009 at 20:12, tirengarfio <tirengar...@gmail.com> wrote: > > Thanks Gábor!, but...what should i do? Im just trying to show the > var_dump output below the web page content. > > On Nov 16, 2:07 pm, Gábor Fási <maerl...@gmail.com> wrote: >> You call var_dump while executing the action, *before* any output >> (including the headers) is sent. It writes to the stand output, and >> when symfony tries to send the http headers, it cannot - hence the >> warnings. >> >> On Mon, Nov 16, 2009 at 19:55, tirengarfio <tirengar...@gmail.com> wrote: >> >> > Hi, >> >> > i have this code below: >> >> > class profileActions extends sfActions >> > { >> > public function executeIndex(sfWebRequest $request) >> > { >> > // Extraemos todos los miembros de la red social. >> > $this->lista_miembros = Doctrine::getTable('Profile') >> > ->createQuery('a') >> > ->execute(); >> >> > // Extraemos los amigos del usuario de la sesion. >> > $this->lista_amigos = Doctrine::getTable('FriendReference') >> > ->createQuery('a') >> > ->select('a.user2') >> > ->where("a.user1 LIKE ?", $this->getUser()->getGuardUser()->getId >> > ()) >> > ->execute(); >> >> > // Datos es el array que contiene los id de los amigos del usuario >> > de la sesion. >> > $this->datos = $this->lista_amigos->toArray(); >> >> > var_dump($this->datos); >> >> > } >> >> > When i try to use a var_dump as you can see in the code i get this >> > warnings: >> >> > Warning: Cannot modify header information - headers already sent by >> > (output started at /home/aplis_sf/rs4/apps/frontend/modules/profile/ >> > actions/actions.class.php:30) in /home/aplis_sf/rs4/lib/vendor/symfony/ >> > lib/response/sfWebResponse.class.php on line 335 >> >> > Warning: Cannot modify header information - headers already sent by >> > (output started at /home/aplis_sf/rs4/apps/frontend/modules/profile/ >> > actions/actions.class.php:30) in /home/aplis_sf/rs4/lib/vendor/symfony/ >> > lib/response/sfWebResponse.class.php on line 349 >> >> > Any idea? >> >> > Bye >> >> > Javi > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---