• Announcement: Lua.org now officially recommends this forum as a meeting place for the Lua community
  • The forum is currently open to new registrations. The registration will close for a short period of time when reaching 500 active members, to upgrade the server resources.

CGILua install from luarocks (1 Viewer)

bat

Newcomer
Joined
Dec 12, 2020
Messages
5
Reaction score
0
Hello, I tried to install cgilua as follows:

[email protected]:~$ sudo luarocks install cgilua
[sudo] password for bat:
Installing https://luarocks.org/cgilua-6.0.2-0.rockspec
Cloning into 'cgilua'...
ssh: connect to host github.com port 22: Connection refused
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Error: Failed cloning git repository.


There are many 'solutions' to this on the web, but a few hours of trying them out yesterday were not successful. I have not seen this with other modules that I have installed from luarocks. I finally found an absolutely brilliant answer which solved my problem: here and this allowed me to install cgilua-5.2.1 but I still can't seem to get the latest version this way or via the usual luarocks install command. Anyway, I think I am sorted for now. I have been using lua since the summer and loving it - this has been my first sticking point ;-0
 

bat

Newcomer
Joined
Dec 12, 2020
Messages
5
Reaction score
0
Never got it to work in the end (kept getting "attempt to index a nil value (upvalue 'SAPI')") but I think it would have been too complicated for my needs (just reading data from an html form). I made a very simple work-around to read the data sent by post as stdin, roughly like:

#!/usr/bin/lua
s = io.read("*a")
print(s)

I can just use lua pattern matching to get the values I need from the posted data.
 

dinsdale247

Moderator
Staff member
Community Patron
Creator of WinLua
Joined
Nov 17, 2020
Messages
73
Reaction score
31
Location
Victoria BC
Website
winlua.net
I wonder if @Hisham might be able to help with cgilua, or suggest an alternative?

What webserver are you using?
 

bat

Newcomer
Joined
Dec 12, 2020
Messages
5
Reaction score
0
Hello, thanks for your reply. Is he on discord? The server is lighttpd. Maybe cgilua does not recognise it. I read there's WSAPI and a few others but I haven't tried them. I can do everything I need to do by direct read or write to the stdio since I am not doing anything complicated. Cheers, bat.
 

tomas

Newcomer
Joined
Dec 30, 2020
Messages
1
Reaction score
0
I updated a .src.rock file. Please check LuaRocks site again.
 

bat

Newcomer
Joined
Dec 12, 2020
Messages
5
Reaction score
0
Hello, tried again just now and no success with with version 6 but 5 seems OK as before, using Hisham's method.
 
Top