Re: why is it so?

From: Date: Thu, 30 Dec 2004 16:33:04 +0000
Subject: Re: why is it so?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-37928@lists.php.net to get a copy of this message
Nayyar Ahmed wrote:
I am unable to understand when I execute etc.php, it give me the error "Warning: session_start(): Cannot send session cache limiter - headers already sent ....."
You need to have session_start() before _any_ output to the browser (such as HTML, spaces, newlines, etc). Sessions rely on cookies and the cookie must be set in the headers before any output. <?php any_php_code(); session_start(); any_other_php_code(); ?> <html> <body>...</body> </html> Also, this is better posted to php-general@lists.php.net since it has nothing to do with databases. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com

« previous php.db (#37928) next »