Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: monkey and lua< Next Oldest | Next Newest >
humpty Offline





Group: Members
Posts: 655
Joined: Sep. 2005
Posted: May 23 2008,06:10 QUOTE

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.
Back to top
Profile PM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: May 23 2008,06:35 QUOTE

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


Edited by roberts on May 23 2008,06:35
Back to top
Profile PM WEB 
humpty Offline





Group: Members
Posts: 655
Joined: Sep. 2005
Posted: May 23 2008,20:02 QUOTE

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).
Back to top
Profile PM 
2 replies since May 23 2008,06:10 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: monkey and lua

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code