lighttpd lua query string access
Forum: Programming and Scripting
Topic: lighttpd lua query string access
started by: humpty
Posted by humpty on April 01 2008,16:20anyone familiar with lighttpd using lua scripts ?
i'm trying to call a lua script by supplying a query string in a link ;
but don't know how to get to the query string argument(s)
arg only holds the program path
arg is nil
how do i get the date ?
Posted by lucky13 on April 01 2008,16:43Not sure I understand if this is based on user input or parsing some date variable. Try this yet?
< http://www.lua.org/pil/22.1.html >
Posted by mikshaw on April 01 2008,16:51It's an environment variable
Here's an example I have in one of my in-progress cgi scripts
This particular function breaks up a string that uses the format
The lua script would end up setting var_a="something" and var_b="somethingelse"
Posted by humpty on April 02 2008,01:42tks mikshaw, that's just what i was looking for.
Posted by roberts on April 03 2008,19:51mikshaw wrote:
Just curious, did the existing cgi.lua not work for you?
We have had cgi.lua together with sample lua scripts for monkey webserver since before murgaLua.
Posted by mikshaw on April 04 2008,01:22
I'll be sure to look into cgi.lua now.
While murgaLua is a great tool for making quick and small interfaces, i wonder if it might be a little heavy for use on a web server. I just installed Lua a few days ago in an attempt to compile some modules for murgaLua, but I'm wondering if it might also be useful as a mydsl extension. So far I haven't succeeded in compiling any binary Lua modules, though, so I've moved toward looking at modules written in Lua. As a result, and a side note, I finally understand the use of ... as a function parameter, and expect it will be quite useful in future scripts. As a result of that result, I'm guessing the underscore has some very useful usefulness that I have yet to understand.
Posted by roberts on April 04 2008,01:37I agree. I found Lua useful before there was any fltk bindings. The first Lua in DSL was plain Lua.
I also have and use Lua for DOS and use the ANSI functions to print formatted screens.
I think I placed Lua DOS in the dsl utils diskette.
This is the reason some, including me, wish John Murga would consider doing his excellent bindings as a module to plain Lua.
Then we would not have the extra baggage when using non gui scripts.
It may come a time when I will have to have both regular Lua and murgaLua for speed reasons.
I wish not to have to do that. This is in no way a knock on murgaLua. Each release is amazing with new capabilities resulting in even nicer looking GUIs.