lua-users home
lua-l archive

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


Patrick:
 
Yes I want to use cgilua from the command line :)
 
Do you have any idea to do this?"
 
Sorry for my bad english
 
Jorge Machin
----- Original Message -----
Sent: Tuesday, November 22, 2005 4:49 PM
Subject: RE: run a lua page (cgilua) in command line

Ok, it looks like I misread the question and got it backwards.  You?re not trying to use the command line Lua interpreter in cgi,  you want to use cgilua from the command line.   My bad. =)

 

 

Patrick

 


From: lua-bounces@bazar2.conectiva.com.br [mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of McMorris, Patrick
Sent: Tuesday, November 22, 2005 1:57 PM
To: Lua list
Subject: RE: run a lua page (cgilua) in command line

 

It depends what you?re trying to do.

 

I haven?t actually tried it but would expect it to be like any other scripting language.

If you just want to execute a Lua script using cgi then all the normal rules apply.

 

1) You need to tell you http server that its ok to execute your cgi.  Look in the docs for your http server on how to do this

2) Rename your .lua file to a .cgi file

3) Add a line at the beginning of the file to indicate what interpreter to use:

    - something like:  #!/usr/bin/lua  <- likely wrong, but you fixup this path

3) Set the rights on the file such that the http server can execute it.

 

I?m not aware of needing to do anything out of the ordinary for Lua (I could be wrong).

 

 

Patrick

 


From: lua-bounces@bazar2.conectiva.com.br [mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of Jorge Renato Machin Ibarra
Sent: Tuesday, November 22, 2005 1:19 PM
To: lua@bazar2.conectiva.com.br
Subject: run a lua page (cgilua) in command line

 

Hi

 

I want to run a lua page (cgilua) in command line in a linux system. Do you know how to do this?

 

 

Thanks in advance