> > 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
> >
> >
>
> You cannot send any output until the session is set
>
> This includes html before the <?php tag or any print's or echo's

More specifically, whatever you have in search.php on line 8 is considered
output and is ending the headers. Move session_start() before any output.

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to