[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: how to use sessions in CGILUA?
- From: Tomas <tomas@...>
- Date: Mon, 30 Jan 2006 11:36:03 -0200 (BRST)
Hi Chris,
I am trying to figure out how to use sessions with CGILUA.
Are you sure the session library is correctly configured?
I guess this is probably just because something has changed between
versions, but I can't figure out how to use sessions just by looking
at the docs. I don't know if/when any of those functions need to be
called.
If you're not sure about what version you have installed,
please download the most recent one (5.0) and make sure it is correctly
installed.
The session library requires that function cgilua.session.open
is called before the script is executed and function cgilua.session.close
is called after the script ends. Those functions will manage the table
cgilua.data (new versions will call it cgilua.session.data), by obtaining
serialized data from a session file (function open) and storing it back to
the file when the script ends (function close).
A script that wants to use this feature just have to read and
write data to this table and -- very important -- always use cgilua.mkurlpath
to build any link in the resulting HTML document.
I hope this explains everything, but feel free to ask me
again if you need.
Tomas