lua-users home
lua-l archive

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


On Monday 12 March 2007, gary ng wrote:
> I am a bit confused here. So do you mean I can forget
> about the cgi launcher completely in such a setup ?
> But I assume I would still need the require'cgilua' as
> that module provides the helper functions to speak
> with the launcher(this time not the lua adaptered one
> but the apache2 module).

you're thinking about it from the wrong side.

- CGILua is NOT a library for writing CGI scripts.
- CGILua is a CGI that uses (your) Lua scripts to do its work.

IOW: the web server calls the CGILua launcher (CGI, mod_lua, FastCGI, anyone), 
the launcher will parse the query and call your script to do the interesting 
work.

therefore, your script will have the cgilua API already available.  also, 
there's no need for the "#!/bin/lua" line, since it won't be 'executed' by 
the system.


-- 
Javier

Attachment: pgpPWvO4_Aw2M.pgp
Description: PGP signature