Topic on Extension talk:Scribunto

Lua on Windows 10, Xampp 8.2, MW1.40

6
ERosser (talkcontribs)

Help please:

I try to get Lua running in the local version of my Wiki. (Details see below)

I try to create a Module with the "HelloWorld-Example" as copied from different sources. But on saving I get "Lua error: Internal error: The interpreter exited with status 1". Even trying to save an empty Module gives me that error.

In 'C:/xampp/htdocs/LuaError.log I read:

Der Befehl """C:\xampp\htdocs\WRWikiTest\extensions\Scribunto\includes\Engines\LuaStandalone" ist entweder falsch geschrieben oder konnte nicht gefunden werden.

The directory to the Lua files is inprinciple OK - The name of the file to execute is missing. What mean the 2 extra quotes in front of that path which cause the error message?

How do I tell Scribunto/Lua the correct name for the command it shold use here?

-----------------------

Windows 10 Home 22H2

XAMPP for Windows 8.2.12

Mediawiki 1.40.1

Scribunto from Mediawiki Bundle (New Download with GIT works only with the not yet existent MW 1.42!!)

PCRE Library Version 10.40 2022-04-14

PCRE Unicode Version 14.0.0

Multibyte Support enabled

Multibyte string engine libmbfl

libmbfl version 1.3.2

PHP's proc_open function is not restricted.

proc_terminate and shell_exec are not disabled in PHP.

in localsetting.php:

wfLoadExtension( 'Scribunto' );

$wgScribuntoDefaultEngine = 'luastandalone';

$wgScribuntoEngineConf['luastandalone']['errorFile'] = 'C:/xampp/htdocs/LuaError.log';

Thank for any help!

Ernst

Tim Starling (talkcontribs)

I don't know what "MediaWiki Bundle" you're referring to. Maybe try using Scribunto from Special:ExtensionDistributor or the MediaWiki release tarball. The configuration for the path to the Lua binary is $wgScribuntoEngineConf['luastandalone']['luaPath'], and I suspect it's somehow an empty string for you.

ERosser (talkcontribs)

Thank you Tim

By "MediaWiki Bundle" I mean the Tarball for 1.40.1

I entered the path-Variable as you propose : $wgScribuntoEngineConf['luastandalone']['luaPath'] = 'C:\xa..." but still "Interner Lua-Fehler: Der Interpreter beendet sich mit dem Status 1."

The message in the ErrorLog File : Der Befehl """C:\xamp... shows an empty string before the correct path. What should be there? The name of the interpreter I guess - how could I enter it?


Trying to save a first Module I read in the Debug-Information below the unsaved Module:

...

  • [rdbms] LCStoreDB::get [0s] localhost: SELECT lc_value FROM `l10n_cache` WHERE lc_lang = 'de' AND lc_key = 'messages:scribunto-doc-page-name' LIMIT 1
  • [ContentHandler] Registered handler for Scribunto: MediaWiki\Extension\Scribunto\ScribuntoContentHandler

and some 50 Lines later:

  • [Scribunto] MediaWiki\Extension\Scribunto\Engines\LuaStandalone\LuaStandaloneInterpreter::__construct: creating interpreter: ""C:\xampp\htdocs\WRWikiTest\extensions\Scribunto\includes\Engines\LuaStandalone" "C:\xampp\htdocs\WRWikiTest\extensions\Scribunto\includes\Engines\LuaStandalone/mw_main.lua" "C:\xampp\htdocs\WRWikiTest\extensions\Scribunto\includes" "0" "8""
  • [rdbms] Wikimedia\Rdbms\LoadBalancer::reuseOrOpenConnectionForNewRef: reusing connection for 0/wrwikitest
  • [rdbms] LCStoreDB::get [0s] localhost: SELECT lc_value FROM `l10n_cache` WHERE lc_lang = 'de' AND lc_key = 'messages:scribunto-luastandalone-exited' LIMIT 1
  • [EditConstraintRunner] Checked EditFilterMergedContentHookConstraint, got result: constraint-failed
  • [rdbms] Wikimedia\Rdbms\LoadBalancer::reuseOrOpenConnectionForNewRef: reusing connection for 0/wrwikitest

and some 100 lines more.

Can you detect my Problem?

Thank you for your Help.

Greetings from Switzerland Ernst

Tim Starling (talkcontribs)

The incorrect binary path in the log message rules out anything after LuaStandaloneInterpreter.php line 146. I installed MediaWiki 1.40.2 (on Linux) and confirmed that nothing obviously weird is going on. I patched it so that it uses Windows shell escaping, and set the path in LocalSettings.php, with no problems.

It could still be a configuration issue. If you could paste in the rest of the luaPath line from your LocalSettings.php, including the part that you omitted last time, that would help rule out a couple of things.

You could try adding at line 44 of extensions/Scribunto/includes/Scribunto.php

wfDebug( var_export( $wgScribuntoEngineConf, true ) );

Then find the resulting log message and copy it here.

ERosser (talkcontribs)

New PC - Windows 11 - New XAMPP - Mediawiki 1.41: Barebone all Extensions enabled

Try to Create Module:Test with "Hello Word" from Lua reference manual results in: "Lua error: Internal error: The interpreter exited with status 1."

On reddit skizzerz means 10 mo ago: "The interpreter shipped with the extension only works on Linux" Is that true? - Hard to believe!

Tim Starling (talkcontribs)

I think installing MediaWiki on Windows could be a fun hobby for a power user, but if you're doing something serious, or if you don't have the ability to collaborate on fixing the problems you encounter, you should just stick to Linux. The last time I installed MediaWiki on Windows was in 2021, but I didn't test Scribunto at the time. The current Windows binaries date back to 2015 and were compiled by our security team and tested up to Windows 10. It's not safe to use unpatched Lua 5.1.5 binaries since there was no release for CVE-2014-5461.

Reply to "Lua on Windows 10, Xampp 8.2, MW1.40"