Re: Cannot send session cache limiter - headers already sent Cannot send session cookie - headers already sent by

From: Date: Thu, 11 Jan 2001 10:03:53 +0000
Subject: Re: Cannot send session cache limiter - headers already sent Cannot send session cookie - headers already sent by
References: 1  Groups: php.db php.general 
Request: Send a blank email to php-general+get-33940@lists.php.net to get a copy of this message
Hi JB! On Wed, 10 Jan 2001, JB wrote: > actually.. still give me the same error after i fixed that. new code as > follows along with the error: > > if (!session_is_registered('cart')) { > $cart = array(); > session_register('cart'); > } > else { > session_start(); > } > > any other ideas? =) be sure you don't output *anything* before the session_start() or session_register() call. They imply sending a cookie header to the browser, and having something already sent means the headers cannot be sent anymore like in: Content-Type: text/html <html> output already here Set-Cookie: foobar=baz; ^... cannot see this as a header, cause it's in the body of the response. -- teodor

« previous php.general (#33940) next »