NYCPHP Meetup

NYPHP.org

[nycphp-talk] Sessions

Adam Fields fields at surgam.net
Tue Jan 28 16:28:38 EST 2003


On Tue, Jan 28, 2003 at 04:25:44PM -0500, e_dave wrote:
> Let's try that one more time, in plain text.
> 
> Can someone point me in the right direction?  I am writing what I think 
> is a fairly simple session authentication script, but I keep getting 
> the following error:
> 
> Warning :  Cannot send session cache limiter - headers already sent 
> (output started at /Library/WebServer/Documents/DSMetro/header.php:16) 
> in /Library/WebServer/Documents/DSMetro/frontpage.php on line 111
> 
> It sounds to me like the problem is due to the http headers at the top 
> of the page, but I don't know how best to handle this.  I don't want to 
> leave out the headers, right?
> 
> Your friendly neighborhood newbie.

Basically, session info is sent in the header of the page, which must
be sent prior to any content. Normally, this is done by the server,
transparently to you. If you're mucking with any of the header info
using PHP commands, those commands must appear before anything that
sends output to the page, including whitespace.

-- 
				- Adam

-----
Adam Fields, Managing Partner, fields at surgam.net
Surgam, Inc. is a technology consulting firm with strong background in
delivering scalable and robust enterprise web and IT applications.
http://www.adamfields.com



More information about the talk mailing list