> -----Original Message-----
> From: Sabina Alejandr Schneider [mailto:[EMAIL PROTECTED]]
> Sent: 05 January 2003 20:17
> Hello everybody!!!!
> I was trying to use Sessions, but I had some problems. 
> I have an old version of the Apache, that comes with the 
> Red Hat 7.2.
> when executing this in my page:
> session_start();
> if(!isset($_SESSION['s_test'])){
>     $_SESSION['s_prueba']=1;
> }
> There appear this in the page:
> Warning: Cannot send session cookie - headers already sent 
> by (output started at /var/www/html/prueba/index.php:8) in 
> /var/www/html/prueba/index.php on line 10

Well, the error message really says it all, it's just worded a bit opaquely!  
Basically, setting a cookie uses an HTTP header, and all HTTP headers have to be sent 
before your actual page content -- and the error message is saying that you can't send 
an HTTP header at line 10 of your script, because you started outputting your page 
content at line 8.

> Warning: Cannot send session cache limiter - headers 
> already sent (output started at 
> /var/www/html/prueba/index.php:8) in 
> /var/www/html/prueba/index.php on line 10

Same thing, but for a cache limiter header.

You need to re-order your script so that the header requests come before the start of 
real output.



Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 

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

Reply via email to