monkey and lua
Forum: Programming and Scripting
Topic: monkey and lua
started by: humpty
Posted by humpty on May 23 2008,06:10How 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.
Posted by roberts on May 23 2008,06:35I 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 >
Posted by humpty on May 23 2008,20:02Thanks. 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).