RE: [PHP] session troubles

From: Date: Thu, 05 Jul 2001 15:24:12 +0000
Subject: RE: [PHP] session troubles
Groups: php.general 
Request: Send a blank email to php-general+get-56319@lists.php.net to get a copy of this message
your session_start() has to be the first thing in the page. no blank lines etc. like <?php session_start(); include("db.inc"); include("classes/user-class.inc"); session_register("user"); ?> right at the top of your page. a blank line will send header info ... Steve > -----Original Message----- > From: Brad Wright [mailto:bradwright@optushome.com.au] > Sent: 05 July 2001 16:21 > To: php-general@lists.php.net > Subject: [PHP] session troubles > > > Hi all, > Im new to this mailing list so im not sure what to expect > from 'y'all' but > i'm hoping this will be the beginning of a long and beautiful > friendship. > > My question: > > i have a series of PHP4 pages that if I start a session > (session_start()) on > the first page (adminLogin.php), all is fine and dandy...all the > session_resources get passed to the next page (login2.php) > and i can get > acccess to those session resources. Te problem is, at the top > of the page a > warning message is displayed: > > Warning: Cannot send session cache limiter - headers already > sent (output > started at /home/e-smith/files/ibays/test/html/login2.php:1) in > /home/e-smith/files/ibays/test/html/login2.php on line 1 > > > What does this mean?? If i comment out the "session_start()" > line, i dodnt > get this message BUT i also dont get the session variuables i need. > > Hope Im making some sense, Hope someone can help. > > Thanks, > Brad > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net >

« previous php.general (#56319) next »