Re: ob_start & session_start

From: Date: Thu, 08 Dec 2005 07:43:14 +0000
Subject: Re: ob_start & session_start
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-227121@lists.php.net to get a copy of this message
Sorry it looked like the rest of your email was part of the previous one. To answer your question it is better to call session_start() before ob_start() On 12/8/05, Zack Bloom <zackbloom@gmail.com> wrote: > > I have never tried it but if it did work i doubt it would use cookies, it > would probably pass it in the addresses or throw an error. > > On 12/8/05, Joe Harman <cjharman@gmail.com> wrote: > > > > I guess this was just out of general curiousity... If you started > > 'session_start()' after 'ob_start()' would the sessions work > > correctly? k.. maybe I am still confused... lol... I normally do > > session_start() before the ob_start()... > > > > ---- > > Zack Said : 'yes, it will display the content in the buffer before > > creating the session. If your session uses cookies (this is usually > > automatically decided by php) it cannot send out the header after the > > buffer.' > > ---- > > > > 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. > > > > ;o) > > Joe > > > > > > > > > > On 12/8/05, Chris Shiflett <shiflett@php.net > wrote: > > > Joe Harman wrote: > > > > Okay...makes sense after you spelled it out to me. > > > > > > That didn't make sense to me (and I missed the original reply). Mind > > > elaborating? :-) > > > > > > Chris > > > > > > -- > > > Chris Shiflett > > > Brain Bulb, The PHP Consultancy > > > http://brainbulb.com/ > > > > > > > > > -- > > Joe Harman > > --------- > > * My programs never have bugs, they just develop random features. > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > >

« previous php.general (#227121) next »