I was thinking that myself... It's an old habbit of having the opening and
closing <? ?>

Found another couple rogue spaces at the end of one of my controllers. I get
to blame the add controller wizard in ZendNeon for creating those however.

I'll just have to get in the habit of deleteing the ending ?>

Terre 

-----Original Message-----
From: Jason Webster [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 01, 2008 10:10 PM
To: Zend Framework - General
Subject: Re: [fw-general] help pls: headers being set, before preDispatch

This is a fine example of why we should leave off the closing ?> on our PHP
files!

Terre Porter wrote:
> Ha
>
> That worked. There was a funky character at the end of one of my php 
> includes... Not sure where it came from, but now that it's gone the 
> pages are working again... Yay!
>
> Totally forgot about adding file and line number in that function... 
> It's been a long day...
>
> Thank for the pointer it helped.
>
> Terre
>
> ________________________________
>
> From: carlos koch [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 01, 2008 7:33 PM
> To: fw-general@lists.zend.com
> Subject: Re: [fw-general] help pls: headers being set, before 
> preDispatch
>
>
> change headers_sent() to headers_sent ($filename, $linenum) and see 
> where the output started.
>
>
> 2008/10/1 Terre Porter <[EMAIL PROTECTED]>
>
>
>       Help...
>       
>       I'm having a bit of a pain with some surprise headers being set 
> somewhere...
>       
>       I've put this in my controllers preDispatch function for testing..
>       
>       ---- Code
>       if (headers_sent()) {
>       $this->logger('--> preDispatch - headers sent');
>       logger(headers_list());
>       }
>       ---- Code
>       
>       The logger simply writes to a log file. In the log file I have..
>       
>       ---- Log
>       [ 2008-10-01T18:42:26-04:00 ] [ 3.06 MB ] [ INFO ] : --> preDispatch
> -
>       headers sent
>       [ 2008-10-01T18:42:26-04:00 ] [ 3.07 MB ] [ INFO ] :
>       
>       array(5) {
>        [0] => string(23) "X-Powered-By: PHP/5.2.5"
>        [1] => string(38) "Expires: Thu, 19 Nov 1981 08:52:00 GMT"
>        [2] => string(77) "Cache-Control: no-store, no-cache, 
> must-revalidate,
>       post-check=0, pre-check=0"
>        [3] => string(16) "Pragma: no-cache"
>        [4] => string(23) "Content-type: text/html"
>       }
>       ---- Log
>       
>       My question is WHERE are they coming from...
>       
>       It's driving me nuts as this does not happen on the development 
> server but
>       does when putting the code to the live server.
>       
>       I've added the check function before the $controller->dispatch();
and 
> no
>       headers, but by the time it gets to the controller there are 
> headers...
>       
>       Anyone got some other ideas?
>       
>       Thanks
>       Terre
>       
>       
>
>
>
>   


Reply via email to