Hi Jim,

Ok, in your case the "headers already sent" message seems unrelated to Zend_Session.

Since _redirect() adds a "Location" HTTP header to the response object, and, by default, sends the HTTP headers in the response object before exit()'ing, why use "some sort of echo"
before calling $this->_redirect()?

The headers_sent() function can be used to help precisely locate accidental output sent before the headers:
http://www.php.net/headers_sent

Cheers,
Gavin

Jim Scherer wrote:
I am using 8.0, not sure what revision but I updated it within the last three
days. My error occurs from a $this->_redirect('/') in my AuthorizeController
(Zend_Controller_Action). It only occurs if I have done some sort of echo
anytime previous to the $this->_redirect('/'). If I'm not performing a
$this->_rediect('/') the echo doesn't seem to matter. Hopefully that helps.

Jim
PHP/Linux/Apache/etc


GavinZend wrote:
There are several possible reasons for this, including both Zend_Session related and non-ZF related.
Which version of the ZF are you using?
Which method/function call is the immediate cause of the "Cannot modify" message?

Cheers,
Gavin

Jim Scherer wrote:
Hi,

I've been getting the 'Cannot modify header information - headers already
sent ' on my hosted server for the last couple of days but not on a local
server, and for the life of me couldn't figure out why. At least now I
understand why I get it on one and not the other.  I also get mine during
authentication. I recently added caching to my application and thought
that
it somehow was related, but I wasn't able to pinpoint it. Hopefully
someone
knows what is going on. Thanks for the post, this was bothering me.

Jim

Reply via email to