Extension talk:Lua

Ubuntu install not quite working
Using the 28 Dec 2008 snapshot.

The Lua50 package on my Feisty system complained about the Lua ... syntax and wouldn't run the code at all.

Hand compiled and installed Lua 5.14. Had to manually apt-get libreadline-dev to provide readline.h.

Now it runs OK, but argument passing from the Lua tag is not working under MediaWiki 1.11.1

The example program:

Produces: Error on line 2: bad argument #2 to 'format' (string expected, got nil) print(hello("literal string")) works fine.

It doesn't help to substitute a literal string into the lua tag, either.  does not work for me. -- MaxEnt 02:34, 29 December 2008 (UTC)

No luck on Cygwin, either
I have another wiki running on a Windows machine, version 1.12.x. I've installed both the plain Windows Lua 1.5.4 and the Cygwin binary. Both of these work fine from the command line.

Run from within MediaWiki, the Windows binary freezes up my Apache server, until I kill the stuck Lua process manually.

Got a bit further with the Cygwin version, once I ensured that the required Cygwin DLL was in my path. However, every page comes back "internal error" in big red letters.

I added some debug statements to the PHP code and determined that the wrapper is managing to construct, and the correct command is written to the Lua process, but only one line of output comes back, and this line is blank.

Working remotely, I wanted to see if the Windows Lua would get as far. Instead I managed to hose my Apache pretty good. A manual Apache stop/start cycle from the Cygwin SSH shell did not unlock the server. Running the System Internals process tools from the command line, pslist hangs with no output, and sometimes I can't even terminate the stuck pslist with ^C.

I'm sure there's a stuck Lua process causing these problems. I guess I'll have to kill it via a local VNC session tomorrow. --MaxEnt 05:57, 30 December 2008 (UTC)