[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: cgilua/kepler in a shared hosting environment ?
- From: gary ng <garyng2000@...>
- Date: Mon, 12 Mar 2007 17:39:12 -0700 (PDT)
--- Javier Guerra <javier@guerrag.com> wrote:
> you're thinking about it from the wrong side.
>
> - CGILua is NOT a library for writing CGI scripts.
> - CGILua is a CGI that uses (your) Lua scripts to do
> its work.
>
> IOW: the web server calls the CGILua launcher (CGI,
> mod_lua, FastCGI, anyone),
> the launcher will parse the query and call your
> script to do the interesting
> work.
That I understand is the intended use if I can
controll the server(apache2 in my case on dreamhost).
However, I cannot do it.
On the dreamhost setup, I have to either name the
launcher as launcher.fcgi(anything with the fcgi
extension) or put it in a say cgi-bin directory.
Either case, by the time it is called, the
SCRIPT_NAME/SCRIPT_FILENAME would be set to
launcher.fcgi and not the real script which would be
doing the interesting job.
In other words, the launcher(provided in kepler) don't
know what script to run as it see itself as the script
name.
>
> therefore, your script will have the cgilua API
> already available. also,
> there's no need for the "#!/bin/lua" line, since it
> won't be 'executed' by
> the system.
>
Yes, that again assume the launcher is being called
which would arrange the environment. It is how to pass
this info(what interesting script to run) to the
launcher that is the question. As it is kind of being
"pushed" one level down, IOW, the launcher can only be
the script, not the launcher on dreamhost.
I did some experiment with the fastcgi-magnet which I
have to "re-construct" the SCRIPT_FILENAME/SCRIPT_NAME
based on the one in the environment(passed by the
dreamhost launcher) and the REQUEST_URI to derive the
real script name.
____________________________________________________________________________________
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front