[Chameleon] Can't use setcookie

Bart van den Eijnden BEN at Syncera-ITSolutions.NL
Thu Jul 28 14:52:16 EDT 2005


Hi Abe,

I am not super familiar with this, is a cookie normally set after the headers are sent, or before?

You could try using the ob_start stuff which I posted:

http://lists.maptools.org/pipermail/chameleon/2005-July/002632.html

it does put the output in a buffer which you can modify with a callback function (see the php ob_start docs).

Don't know if this will help for your specific case though.

Best regards,
Bart

Bart van den Eijnden
Syncera IT Solutions
Postbus 270
2600 AG  DELFT

tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl
>>> Abe Gillespie <abe.gillespie at gmail.com> 07/28/05 20:43 PM >>>
I'm trying to use setcookie() within a custom widget but I cannot due
to output already being sent to the client:

Cannot modify header information - headers already sent by (output
started at /var/www/chameleon-2.0.1/htdocs/widgets/RulerResult/RulerResult.widget.php:102)

Unfortunately this isn't just a case of modifying
RulerResult.widget.php ... there isn't actually any code at line 102
(the last line of code is 100).  So the error message is misleading.

Is there a Chameleon API item that I can use to buffer output ... can
I use a direct PHP call?  Any thoughts?

Thanks.
-Abe

_______________________________________________
Chameleon mailing list
Chameleon at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/chameleon




More information about the Chameleon mailing list