I'm quite a bit further into getting cgilua going on an embedded system.
I had to compile fastcgi (needed it to compile wsapi), then copied the cgilua 
.lua files to the right place.
However, the .lua script won't run automatically despite me adding
AddHandler cgi-script .lp .lua
to Apache's httpd.conf (the embedded system's Apache doesn't have mod_fcgid so 
I'm stuck w/ CGI).
When I run hello.lua (from the samples on the Kepler site), I just a cryptic 
"Internal Server Error" w/ nothing in the logs.

I copied that code:
#!/usr/bin/lua
require "cgilua"
cgilua.htmlheader()
cgilua.put([[
<html>
<head>
 <title>Hello World</title>
</head>
<body>
 Hello
</body>
</html>]])

into a file in the cgi-bin directory and set it to be executable and ran it 
from the command line and it blows up cleanly, but looks like it's loading the 
cgilua library at least.

# ./testcgilua
/usr/bin/lua: /usr/local/share/lua/5.1/cgilua.lua:91: attempt to index upvalue 
'SAPI' (a nil value)
stack traceback:
        /usr/local/share/lua/5.1/cgilua.lua:91: in function 'htmlheader'
        ./testcgilua:5: in main chunk
        [C]: ?

Is there any way to test a cgilua file from the command line?
And are there any other steps to hooking it into Apache?
There should be a place to reference /usr/bin/wsapi.cgi but I have no idea 
where...

 thanks,

 ken


      


_______________________________________________
Kepler-Project mailing list
Kepler-Project@lists.luaforge.net
http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project
http://www.keplerproject.org/

Reply via email to