[Chameleon] session cache limiter

Wheaton, William D. wdw at rti.org
Wed Feb 2 08:39:20 EST 2005


Paul--

Thanks for the response.  It was, indeed, a couple of spaces at the top
of the index.phtml file that were created when I copied and pasted code
from a different file.  I removed the spaces before <?PHP and problem
solved.  Thanks again.

-----------------------------------------
Bill Wheaton
RTI International
P.O. 12194, 3040 Cornwallis Rd.
RTP, NC 27709
wdw at rti.org, 919-541-6158 (V), 919-541-8830 (F)
 


-----Original Message-----
From: Paul Spencer [mailto:pspencer at dmsolutions.ca] 
Sent: Tuesday, February 01, 2005 8:54 PM
To: Wheaton, William D.
Cc: chameleon at lists.maptools.org
Subject: Re: [Chameleon] session cache limiter


Bill,

deep in the Chameleon code, there is a call to a php function 
session_start().  The warning you are seeing is emitted if anything is 
output to the browser before this call.  This includes anything, 
including blank space, that is output outside of php script tags (<?php 
?>) or inside (as an echo, print_r etc).  It is, therefore, reasonably 
important to process the include( "path/to/chameleon.php" ); (which is 
what ultimately triggers the above function to be called) before 
anything else is output to the page.  If you are using the sample 
applications, they should already be set up to do this.  Essentially, 
this means that you need to have a php start tag at the top of your main

page (i.e. sample_basic.phtml) like:

<?php
include( "/path/to/chameleon.php" );

the <?php must be the first line of the file and not be preceeded by any

spaces.  You can have other php code before the include as long as it 
doesn't output anything to the browser (this would include any potential

warnings or notices)

Cheers,

Paul

Wheaton, William D. wrote:
> Hello--
> 
> I'm a newbie to chameleon and am just starting to use it...So far I 
> have used the widget tutorials to start developing a template file 
> having the standard stuff in it (zoom/pan, scalebar, reference, etc.).

> I have a problem that I haven't been able to solve and any 
> guidance/help is appreciated.
> 
> I get a warning about the headers already being sent every time a page

> is refereshed.  Here's the message:
>  Warning: session_start(): Cannot send session cache limiter - headers

> already sent (output started at
> /var/www/htdocs/midas/htdocs/index.phtml:1) in 
> /var/www/htdocs/chameleon/htdocs/common/session/session.php on line 
> 504
> 
> I'm using the sample (sample_basic.html) index.phtml file that comes 
> with chameleon.  The template file is based directly on the tutorial--

> no funny stuff in there.
> 
> Thanks in advance.
> 
> 
> -----------------------------------------
> Bill Wheaton
> RTI International
> P.O. 12194, 3040 Cornwallis Rd.
> RTP, NC 27709
> wdw at rti.org, 919-541-6158 (V), 919-541-8830 (F)
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org 
> http://lists.maptools.org/mailman/listinfo/chameleon
> 

-- 
+-----------------------------------------------------------------+
|Paul Spencer                           pspencer at dmsolutions.ca   |
+-----------------------------------------------------------------+
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+



More information about the Chameleon mailing list