[Konstrukt] Setting cookie data

1 view
Skip to first unread message

Thomas Allen

Apr 25, 2010, 1:29:01 AM4/25/10
to Konstrukt
In my sandbox app, I am unable to set cookie data. Here is how I am
doing it:


require_once 'lib/konstrukt/konstrukt.inc.php';

class App extends k_Component {
function renderHtml() {
$this->cookie()->set('test', 'result');
return $this->cookie('test');


In this case, the page will display "result", but if I remove the line
which sets the data, the page is blank, indicating that the cookie did
not persist the data. Is there an additional step that needs to be
taken to set up cookie handling?


You received this message because you are subscribed to the Google Groups "Konstrukt" group.
To post to this group, send email to kons...@googlegroups.com.
To unsubscribe from this group, send email to konstrukt+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/konstrukt?hl=en.

troels knak-nielsen

May 2, 2010, 3:38:07 PM5/2/10
to kons...@googlegroups.com
Hi Thomas.

You're probably testing with localhost as your domain? Some browsers
have issues with using a domain name, that has no dots in it. I've
applied a patch to HEAD that will skip the domain part for localhost,
which makes it work. If you don't want to pull a head revision of
Konstrukt, you can also use either or set up a hostname that
has at least one dot in it, for your development environment.

Reply all
Reply to author
0 new messages