Re: ob_start & session_start

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

 



On Thu, Dec 08, 2005 at 01:23:40AM -0500, Joe Harman wrote:
> 
> So, the question is really... in what order is the best way to do
> this... I would think that you always want to start a session first...
> but then again, you guys are the experts... i am sure someone knows a
> reason when you should not do that.

The first thing I would ask is why are you using/need ob_start().

session_start() should be the first thing that happens in most
cases. Since, well, any code that exist is potentially going to
rely on a session state.

If you are trying to use ob_start() to rid of the common error
'headers already sent in some_file.php on line such and such', i
would first consider why that is causing the error and how can you
call session_start() before that happens.

Since '97 i think i've used ob_start twice, in all my php apps, and
that was cause I wanted to filter the output either with tidy or
modify the data in a very obscure way.

Curt.
-- 
cat .signature: No such file or directory

-- 
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