Programming and Scripting :: monkey and lua



How to get lua scripts to run with monkey http daemon?

There are some sample scripts in opt//ramdisk/opt/monkey-0.9.1/cgi-bin
and i have tried :

localhost/test.lua - not found
localhost/cgi-bin/test.lua - blank

I have also tried to add to the monkey.conf file :
AddScript application/x-httpd-lua /bin/lua lua

but no luck.

/tks in advance.

I see an error when I upgraded to monkey-0.9.2.
If you look in test.lua it is calling cgi.lua in monkey-0.9.1 directory.
You can change that to just monkey

Then do the following:

http://localhost/test.html

Fill out simple form and see results. This calls test.lua to process.
Or call test.lua directly with for example:

http://localhost/cgi-bin/test.lua?firstname=will&lastname=smith



Thanks. It was actually working. I was accessing test.lua directly so
it was failing on nil vars.

0.9.1 would be correct (DSL 4.2.4).


original here.