[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Assigning file handlers to Lua from C? Trying FastCGI.
- From: gary ng <garyng2000@...>
- Date: Mon, 23 Jul 2007 07:07:23 -0700 (PDT)
you don't really need that.
just use kepler(ok, I know you said you don't want it
but read on). Build it as usual with the fastcgi
launcher. You should find a fastcgi.so then try this :
while fastcgi.accept() > 0 do
file = fastcgi.getenv('PATH_INFO')
script = magnet[file] or loadfile(file)
if not magnet[file] then magnet[file] = script end
and put it to your CGI/FASTCGI directory or whatever
host setup you have.
The code is not tested but hope to give you an idea.
I use similar code on my dreamhost without any kepler
thing, just the fastcgi.so
you can also launch it as a CGI instead of fastcgi.
--- Drakas Tralas <email@example.com>
> I am trying to assign a file handler to Lua using
> the C interface.
> For some reason, I get a Segmentation fault error at
> :write() method,
> and the debugger shows 'fwrite' as the source of the
> Can someone show me a good example of this?
> I was trying to integrate into magnet.c of
> http://jan.kneschke.de/projects/lua ; Specifically I
> want ot be able
> to assign FCGI_stdin and FCGI_stdout to Lua so I
> could make a FastCGI
> And please don't mention the Kepler framework, I
> want something
> lighter than that.
> I searched through this mailing list and found
> exactly what was
> needed, but can't locate it now.
> Thanks for any help :)
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more.