lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

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 then try this :

while fastcgi.accept() > 0 do
   file = fastcgi.getenv('PATH_INFO')
   script = magnet[file] or loadfile(file)
   pcall(script, ...)
   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 

you can also launch it as a CGI instead of fastcgi.

--- Drakas Tralas <>

> Hello,
> 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
> error.
> Can someone show me a good example of this?
> I was trying to integrate into magnet.c of
> ; Specifically I
> want ot be able
> to assign FCGI_stdin and FCGI_stdout to Lua so I
> could make a FastCGI
> application.
> 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.