httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jez Hancock <>
Subject Re: [users@httpd] Cannot send session cookie
Date Thu, 12 Feb 2004 09:40:55 GMT
On Thu, Feb 12, 2004 at 09:58:39AM +0100, michele digioia wrote:
> Hi, I'm a new user. I have this problem: when a session_start() php
> request is sended to the apache server that I admin (by few days), it
> responses with following messages:
> Warning: Cannot send session cookie - headers already sent by (output
> started at .../Admin/ in .../Admin/login.php on
> line 4
> Warning: Cannot send session cache limiter - headers already sent
> (output started at .../Admin/ in
> .../Admin/login.php on line 4
> Is this a problem of php or apache? And how can I solve it? Thanks.

This is a PHP problem and so OT here.

As a hint - make sure your script hasn't already sent out any HTML to
the browser before it's trying to set a session variable.  

The error occurs because PHP can only send session data in the HTTP
headers sent out from the web server - if you've already sent out some
HTML / output to the browser this means the HTTP headers have already
been sent and so if you try sending session data at that point the error
you get occurs.

Jez Hancock
 - System Administrator / PHP Developer  - Another FreeBSD Diary        - ipfw peruser traffic logging

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message