lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> > I am trying to figure out how to use sessions with CGILUA.
>         Are you sure the session library is correctly configured?

No, how do I configure the session library? I don't believe the
configuration of any libraries was mentioned in the guides I read, or
any other documentation, but I could have missed something.

> > 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
> is called before the script is executed and function cgilua.session.close
> is called after the script ends.  Those functions will manage the table
> (new versions will call it, 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.

Whenever I try to do anything with cgilua.session it tells me it is
nil. Is this because it isn't configured properly?  as a shot in the
dark I tried to require("cgilua.session"). although it allowed that
line it didn't have any effect. I still get the error when trying to
access *anything* in the cgilua.session table.

It might be worth noting that everything else in CGILUA works fine and
runs without errors in both Apache and Xavante.