Re: Sessions - session_start()

From: Date: Mon, 15 May 2006 23:15:36 +0000
Subject: Re: Sessions - session_start()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-236232@lists.php.net to get a copy of this message
On Mon, May 15, 2006 8:53 am, Jonas Rosling wrote: > Warning: session_start(): Cannot send session cookie - headers already > sent > by (output started at /var/www/html/index.php:9) in > /var/www/html/index.php > on line 82 > > But I found out that if I put the tag in the absolute top of every > page it > seems to work. But then I need to do alot of changes on all the pages. This *is* the right answer, from a structured logical code point of view. > Does anyone know if there's any workaround for this? The reason it works on your dev site is that you've got output buffering turned "on" in php.ini -- which is a workaround, but I honestly believe you'd be better off re-factoring your code, in the long run. -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#236232) next »