Re: session example

From: Date: Mon, 31 Jul 2000 07:05:31 +0000
Subject: Re: session example
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-9127@lists.php.net to get a copy of this message
> Hi All, > I have some problems with sessions in php4, sorry if this is a > repeated question. > > I have a simple page which I want to start tracking members from, so I > inserted session_start(), once I dont that I get this error when > running the script: > > > Warning: Cannot send session cookie - headers already sent by (output > started at /usr/local/apache/htdocs/arabiccards/admin/index.php:10) in > > /usr/local/apache/htdocs/arabiccards/admin/index.php on line 11 > > Warning: Cannot send session cache limiter - headers already sent by > (output started at > /usr/local/apache/htdocs/arabiccards/admin/index.php:10) in > > /usr/local/apache/htdocs/arabiccards/admin/index.php on line 11 > > > anybody may tell me whats that for ?? > > Thanks > > > > > -- > 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 > Hi, as SetCookie() sends header, SetCookie() must be executed before any other output has been sent to the browser. That means that SetCookie() needs to be called before any other command like *echo*, *print*, etc. ( ...what is probably the case in line 10 and 11 ...) Bye, Marc

« previous php.general (#9127) next »