Re: session id
| From: | Michael Heuser | Date: | Tue, 25 Mar 2003 14:38:26 +0000 |
| Subject: | Re: session id | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-140964@lists.php.net to get a copy of this message | ||
The function session_start is sending a cookie. This means that you can't
echo anything before. Its the same rules as with setcookie.
"Iggy" <ifran@winegard.com> wrote in message
news:20030325143751.17852.qmail@pb1.pair.com...
> can somebody tell me why I am getting this:
> Warning: session_start() [function.session-start]: Cannot send session
> cookie - headers already sent by (output started at
> c:\inetpub\wwwroot\search.php:8) in c:\inetpub\wwwroot\search.php on line
21
>
> Warning: session_start() [function.session-start]: Cannot send session
cache
> limiter - headers already sent (output started at
> c:\inetpub\wwwroot\search.php:8) in c:\inetpub\wwwroot\search.php on line
21
>
>
> when I use this code:
>
> session_start();
> if (!isset($_SESSION['count'])) {
> $_SESSION['count'] = 0;
> }
>
>
> PHP is version 4.3.1
>
> thanx
>
>