Re: Sessions - session_start()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux