Re: [Fwd: don't want to belabor a point about session_start, but...

From: Date: Thu, 29 Jan 2004 23:34:09 +0000
Subject: Re: [Fwd: don't want to belabor a point about session_start, but...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-176274@lists.php.net to get a copy of this message
session_start can be used after includes and such but it has to be sent before anything outside of the <?php ?> tags has a chance to be sent. All it takes is an extra newline at the end of one of the includes before the one that starts the session to mess things up. ----- Original Message ----- From: "Rachael LaPorte Taylor" <rachael.laporte.taylor@census.gov> To: < > Sent: Thursday, January 29, 2004 6:29 PM Subject: [PHP] [Fwd: don't want to belabor a point about session_start, but... > > OK, I understand that in order to avoid those nasty warning messages > about "Cannot send session cookie - headers already sent...." you must > include the directive, session_start, above all headers, includes, etc. > > I'm trying to debug and port a contractor's code to PHP 4.3.4 from a > couple of years ago. Is there an explanation as to why the code, written > under PHP 3 and also working under PHP 4.0.4, would not generate these > warning messages, without having session_start at the top of the file? > The session_start directive is pulled in later with an include file. > > -- > Rachael LaPorte Taylor > U.S. Census Bureau > Washington DC 20233 > rachael.laporte.taylor@census.gov > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#176274) next »