Extension talk:Scribunto

Jump to navigation Jump to search

About this board

Lua error: Internal error: The interpreter exited with status 126.

1
Summary by Sanctaria

Nevermind, I had it installed in the wrong place. I am a moron, confirmed.

Sanctaria (talkcontribs)

See above. I've referred to the troubleshooting but all my files are executable.

I moved from shared hosting to a VPS server in order to install Lua 5.1.x to rub Scribunto. I did that and I have Lua 5.1.4 installed on my root.

I installed new binaries in the Lua 5.1.4 too just to make double sure this would work. But I'm still getting errors! This is a lot more work for a few infoboxes than I was expecting!

Anyway this is the current error log: /home/theixlpp/public_html/w/extensions/Scribunto/engines/LuaStandalone/lua_ulimit.sh: line 6: exec: /root/lua-5.1.4/lua-5.1.5_Linux32_64_bin/bin2c5.1: cannot execute: Permission denied

I'm not a techie in any way, which is my own fault, but if anyone can point out what I'm doing wrong, I'd appreciate it.

The interpreter has terminated with signal "11".

6
Sanctaria (talkcontribs)

I've installed everything as per the instructions, but keep getting this error. However all info online re this error is 3+ years old, at least.

I am on a shared server, but have confirmation from my hosts that proc_open functions are available. They've said Lua should be already installed on the shared servers too.

It's the MW 1.30 version I have installed it on. I've copy-pasted the info for my Local Settings...

I'm a n00b and completely untrained and unknowledgeable when it comes to this stuff. Plz help.

Sanctaria (talkcontribs)

Ok, some playing around and now I have the error 1 message.

Checked with the host and the Lua on the shared server is 5.3.4.

So I'm buggered, really.

EDIT: This is from the error log:

/extensions/Scribunto/engines/LuaStandalone/MWServer.lua:526: attempt to call a nil value (global 'loadstring')

stack traceback:

.../extensions/Scribunto/engines/LuaStandalone/MWServer.lua:526: in function 'MWServer.unserialize'

.../extensions/Scribunto/engines/LuaStandalone/MWServer.lua:410: in function 'MWServer.receiveMessage'

.../extensions/Scribunto/engines/LuaStandalone/MWServer.lua:295: in function 'MWServer.dispatch'

.../extensions/Scribunto/engines/LuaStandalone/MWServer.lua:40: in function 'MWServer.execute'

...w/extensions/Scribunto/engines/LuaStandalone/mw_main.lua:7: in main chunk

[C]: in ?

Anomie (talkcontribs)
Checked with the host and the Lua on the shared server is 5.3.4.

Scribunto only supports 5.1 versions of Lua.

Sanctaria (talkcontribs)

Yeah, I know. Are there any plans to change this?

However I did contact my host to plead to change the version they have on it. They said no. They then said I have version 5.1.4. And when I showed them logs of them telling me earlier I have 5.3.4, they said they'd have to go check. I haven't heard from them since.

*sigh*

EDIT: Nope, nevermind, they've decided it's 5.3.4 after all >_> Definitely not going to upgrade with them after this to a VPS/dedicated.

Anomie (talkcontribs)

There are no plans to change that any time soon. See phab:T178146 and linked comments for some discussion.

Since your host has 5.3.4 installed globally and won't install a 5.1 version in parallel, it seems you're left with figuring out how to install Lua locally to your account there (assuming they don't have your local directories all mounted with "noexec" or the like). You might try figuring out why the local version distributed with Scribunto is segfaulting (that's what signal 11 typically indicates), or you might just try recompiling Lua 5.1 locally since that's probably going to turn out to be the fix in the end.

Sanctaria (talkcontribs)

Possibly. And unfortunately that's beyond my technical capabilities so I guess I'll have to finagle a friend into doing it for me.

Reply to "The interpreter has terminated with signal "11"."
Cavila (talkcontribs)

For the sake of helpful documentation, I was wondering which version is recommended for MW 1.28. The 1.30 version from the Extension Distributor is clearly too new because of the way extensions are registered, while the 1.27 version may throw a fatal error related to object caching (unless you apply the patch to LuaCommon.php below - provided below in case anyone else has run into this.). Which I guess leaves us with 1.29?

     
  if ( !$cache ) {
           /// @todo: Clean up when support for MW < 1.27 is dropped
           if ( is_callable( 'ObjectCache::getLocalServerInstance' ) ) {
               $cache = ObjectCache::getLocalServerInstance( 'hash' );
           } else {
               $cache = ObjectCache::newAccelerator( 'hash' );
           }
       }
Anomie (talkcontribs)

While ExtensionDistributor doesn't provide extensions for unsupported versions of MediaWiki, a 1.28 branch of the extension does exist.

On the other hand, you really should upgrade your MediaWiki installation to a supported version of MediaWiki. The unsupported 1.28 version (of MediaWiki and of Scribunto) may not have received patches for security issues fixed after 1.28 support ended.

Cavila (talkcontribs)

Thanks! Upgrading can be time-consuming business and introduce compatibility issues so I'd rather pick an appropriate time but I'll get there eventually (I tend to go for LTS versions butI had specific reasons for upgrading to 1.28 at the time).

Reply to "Recommended version for MW 1.28?"

Script error: The function "Navbox" does not exist.

3
Malcolm.mcclintock (talkcontribs)

I'm running: MediaWiki 1.30.0, Lua 5.1.5, Scribunto REL1_30 (4e3a20b), PHP: 7.0.28

I've reimported all dependent modules (Arguments, List, Navbox, Navbar), yet it still throws an error. No further details are included in the error box. I have debug running , nothing seems out of the ordinary. I'm out of my water here, Scribunto seems to be functioning in every other way. If you'd like you can check the current error here

Mr. Stradivarius (talkcontribs)

In Template:Navbox, You need to change {{#invoke:navbox|Navbox}} to {{#invoke:navbox|navbox}}. For some reason, the function name starts with a capital in the template you exported, but in the module the function name is all lower case.

Malcolm.mcclintock (talkcontribs)

... it's always the little things, isn't it?

Wonderful, that fixed it! Thanks so much @Mr. Stradivarius, that did it in a pinch. I never would have found that.

Reply to "Script error: The function "Navbox" does not exist."
Wmat (talkcontribs)

I'm running MW 1.22.6 and Scribunto REL1_22 and I'm receiving the following error from the Template:Navbox I imported from Wikipedia:

Lua error in Module:List at line 110: attempt to index field 'html' (a nil value).
Backtrace:
Module:List:110: in function "renderList"
Module:List:181: ?
(tail call): ?
mw.lua:553: ?
[C]: in function "getAllExpandedArguments"
mw.lua:283: ?
[C]: in function "iterator"
Module:Arguments:133: in function "mergeArgs"
Module:Arguments:223: ?
[C]: in function "pairs"
Module:Message_box:182: in function "removeBlankArgs"
Module:Message_box:624: ?
(tail call): ?
mw.lua:553: ?
[C]: in function "getExpandedArgument"
mw.lua:264: ?
Module:Arguments:177: ?
Module:Documentation:648: in function "_content"
Module:Documentation:141: ?
(tail call): ?
mw.lua:553: ?

Thanks.

Mr. Stradivarius on tour (talkcontribs)

Your version of Scribunto doesn't have the mw.html library. Upgrading to the latest version should fix this (the 1.23 version has it, if I remember correctly).

Wmat (talkcontribs)

OK, checking out REL1_23, running update.php gets me a Fatal Exception:

[1b316c59] 2014-06-01 21:46:47: Fatal exception of type MWException

With $wgShowExceptionDetails = true; I see:

[b6b81c5f] /index.php/Template:Navbox Exception from line 212 of ...includes/Hooks.php: Detected bug in an extension! Hook ScribuntoHooks::formatLimitData has invalid call signature; Parameter 2 to ScribuntoHooks::formatLimitData() expected to be a reference, value given
Backtrace:
#0 ...includes/GlobalFunctions.php(3877): Hooks::run(string, array)
#1 ...includes/parser/Parser.php(545): wfRunHooks(string, array)
#2 ...includes/content/WikitextContent.php(300): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#3 ...includes/WikiPage.php(3552): WikitextContent->getParserOutput(Title, integer, ParserOptions)
#4 ...includes/PoolCounter.php(222): PoolWorkArticleView->doWork()
#5 ...includes/Article.php(708): PoolCounterWork->execute()
#6 ...includes/actions/ViewAction.php(44): Article->view()
#7 ...includes/Wiki.php(448): ViewAction->show()
#8 ...includes/Wiki.php(312): MediaWiki->performAction(Article, Title)
#9 ...includes/Wiki.php(602): MediaWiki->performRequest()
#10 ...includes/Wiki.php(467): MediaWiki->main()
#11 ...index.php(49): MediaWiki->run()
#12 {main}
Anomie (talkcontribs)

Note that the version of Scribunto for 1.23 is not compatible with MediaWiki 1.22.

Wmat (talkcontribs)

That's fine, and expected. However, how then can I use Template:Navbox with my version of MW, or am I basically stuck waiting for 1.23?

Mr. Stradivarius on tour (talkcontribs)
Wmat (talkcontribs)

Thanks, that gets a little farther along. I think I may need an older version of Navbar as well as I'm seeing this script error now:

Lua error in Module:Navbox at line 60: attempt to call upvalue 'navbar' (a nil value).
Backtrace:
(tail call): ?
Module:Navbox:60: in function "renderNavBar"
Module:Navbox:116: in function "renderTitleRow"
Module:Navbox:327: in function "renderMainTable"
Module:Navbox:349: ?
(tail call): ?
mw.lua:571: ?
(tail call): ?
[C]: in function "xpcall"
MWServer.lua:87: in function "handleCall"
MWServer.lua:301: in function "dispatch"
MWServer.lua:58: ?
(tail call): ?
mw.lua:265: ?
Module:Arguments:177: ?
Module:Documentation:648: in function "_content"
Module:Documentation:141: ?
(tail call): ?
mw.lua:571: ?
(tail call): ?
[C]: in function "xpcall"
MWServer.lua:87: in function "handleCall"
MWServer.lua:301: in function "dispatch"
MWServer.lua:40: in function "execute"
mw_main.lua:7: in main chunk
[C]: ?
Mr. Stradivarius (talkcontribs)

Ah, sorry, it looks like you need earlier versions of the modules than that. Try this version of Module:Navbox and this version of Module:Navbar.

Wmat (talkcontribs)

Slightly diffrerent result:

Lua error in Module:List at line 201: attempt to call local 'p' (a table value).
Backtrace:
Module:List:201: in main chunk
(tail call): ?
[C]: in function "getAllExpandedArguments"
mw.lua:283: ?
[C]: in function "iterator"
Module:Arguments:133: in function "mergeArgs"
Module:Arguments:223: ?
[C]: in function "pairs"
Module:Message_box:182: in function "removeBlankArgs"
Module:Message_box:624: ?
(tail call): ?
mw.lua:553: ?
[C]: in function "getExpandedArgument"
mw.lua:264: ?
Module:Arguments:177: ?
Module:Documentation:648: in function "_content"
Module:Documentation:141: ?
(tail call): ?
mw.lua:553: ?
Mr. Stradivarius (talkcontribs)

Hmm, that's a fairly mysterious error message - Module:List on the English Wikipedia only has 199 lines. And calling the "p" variable is a strange thing for a module to do. I'd need to see your setup to see how to fix that. Mind you, Module:List would fail anyway, as it uses the mw.html library, as do an increasing number of other modules. If you really want to run all of these modules from Wikipedia, your best bet is to install one of the 1.23 branches of MediaWiki from git and upgrade your Scribunto to the latest version.

Anomie (talkcontribs)
Wmat (talkcontribs)

OK, I've upgrade to MW1.23 and Scribunto git branch 1_23. I exported WP's version of Template:Navbox and Module:List to ensure I had good version. I get 2 script errors:

Script error: The function "navbox" does not exist.

and

Lua error in Module:List at line 201: attempt to call local 'p' (a table value).
Backtrace:
(tail call): ?
Module:List:201: in main chunk
(tail call): ?
(tail call): ?
[C]: in function "xpcall"
MWServer.lua:87: in function "handleCall"
MWServer.lua:301: in function "dispatch"
MWServer.lua:58: ?
(tail call): ?
mw.lua:284: in function "old_pairs"
...extensions/Scribunto/engines/LuaCommon/lualib/mw.lua:21: in function "iterator"
Module:Arguments:133: in function "mergeArgs"
Module:Arguments:223: in function "old_pairs"
...extensions/Scribunto/engines/LuaCommon/lualib/mw.lua:21: in function "pairs"
Module:Message_box:182: in function "removeBlankArgs"
Module:Message_box:624: ?
(tail call): ?
mw.lua:567: ?
(tail call): ?
[C]: in function "xpcall"
MWServer.lua:87: in function "handleCall"
MWServer.lua:301: in function "dispatch"
MWServer.lua:58: ?
(tail call): ?
mw.lua:265: ?
Module:Arguments:177: ?
Module:Documentation:648: in function "_content"
Module:Documentation:141: ?
(tail call): ?
mw.lua:567: ?
(tail call): ?
[C]: in function "xpcall"
MWServer.lua:87: in function "handleCall"
MWServer.lua:301: in function "dispatch"
MWServer.lua:40: in function "execute"
mw_main.lua:7: in main chunk
[C]: ?
Mr. Stradivarius on tour (talkcontribs)
Wmat (talkcontribs)

I believe I've imported all of those and have the latest versions. Interestingly, I can't edit and save modules when Scribunto is enabled. If I disable it in LocalSettings, I can save no problem. Nothing in the messages log and nothing in my lua error log.

I wonder if this could have something to do with the output_buffer = 8192 setting in php.ini?

Mr. Stradivarius (talkcontribs)

What does it say when you try and save a module? Are you getting the red box at the top of the page that says "script error"? If a script contains errors that are detectable before run-time, then Scribunto won't let you save the page. But if Scribunto isn't running, then MediaWiki thinks that the broken module code is just any old text and allows you to save the page. Also, could you try importing en:Module:List one more time? Getting an error on line 201 of that module is very strange, as the module on the English Wikipedia is only 199 lines long. Not sure about the php.ini settings, sorry.

Wmat (talkcontribs)

When I try to save a module, MW returns a blank page. I'm am not getting a red Script Error upon saving a module, but do see the red Script Error in the imported Module page. And the error is the same as before

Lua error in Module:List at line 201: attempt to call local 'p' (a table value).

. And I reimported Module:List, Template:Navbox, Template:Navbar, and Module:Arguments again to be sure they were current.

Wmat (talkcontribs)

I've fixed the Module:List error. This was caused by two lines of Category code being added to the end of Module:List. Not sure how that happened.

So I'm down to my last red script error:

Script error: The function "navbox" does not exist.

Module:Navbox and Template:Navbox are both current.

Wmat (talkcontribs)

It turns out I needed an older revision of the Navbox module. It would seem with MW1.23 and the 1.23 branch of Scribunto you can't simply import Modules and Templates from Wikipedia, which would make sense given that WP is running the latest and greatest of both.

Reply to "Lua error in Module:List [SOLVED]"
66.77.160.179 (talkcontribs)

I get the following error even on MW version 1.30 even though the correct MW version is installed and the correct version's extension files were used:

Fatal error: Uncaught exception 'Exception' with message 'Scribunto is not compatible with the current MediaWiki core (version 1.29.1), it requires: >=1.30.0.' in /var/www/html/mediawiki/includes/registration/ExtensionRegistry.php:261 Stack trace: #0 /var/www/html/mediawiki/includes/registration/ExtensionRegistry.php(148): ExtensionRegistry->readFromQueue(Array) #1 /var/www/html/mediawiki/includes/Setup.php(40): ExtensionRegistry->loadFromQueue() #2 /var/www/html/mediawiki/includes/WebStart.php(139): require_once('/var/www/html/m...') #3 /var/www/html/mediawiki/index.php(40): require('/var/www/html/m...') #4 {main} thrown in /var/www/html/mediawiki/includes/registration/ExtensionRegistry.phpon line 261

Anomie (talkcontribs)

Either you found a version of MediaWiki 1.30 that has the version incorrectly set to "1.29.1", or you didn't actually install MediaWiki 1.30 correctly.

Zeros79 (talkcontribs)

Dear Senpai notice me.. *Sighs*

I've installed :

MediaWiki 1.30

Semantic MediaWiki : 2.5.6

Scribunto (4e3a20b) 00:07, 3 April 2018

Semantic Scribunto:1.1.1

AND this is the error that i get when i Make a Module:Banana

[Ws5YGMbDbaZ7MyegdkbkrgAAAvY] /index.php?title=Module:Banana&action=submit Scribunto_LuaInterpreterNotFoundError from line 180 of /mnt/web003/d0/58/57118858/htdocs/wiki/extensions/Scribunto/engines/LuaStandalone/LuaStandaloneEngine.php: No Lua interpreter was given in the configuration, and no bundled binary exists for this platform.

Backtrace : .........

Is there anyone who can help me fix this bug because i also don't see Lua being loaded at all in my special:version as well.

Thanks

Reply to "Not working with mediawiki 1.30?"

Trying to get infobox to run and I keep getting error 2, this is my dump file

3
98.100.16.174 (talkcontribs)

/var/lib/mediawiki/extensions/Scribunto/engines/LuaStandalone/lua_ulimit.sh: 1: exec: /var/lib/mediawiki/extensions/Scribunto/engines/LuaStandalone/binaries/lua5_1_5_linux_32_generic/lua: Exec format error

/var/lib/mediawiki/extensions/Scribunto/engines/LuaStandalone/lua_ulimit.sh: 1: exec: /var/lib/mediawiki/extensions/Scribunto/engines/LuaStandalone/binaries/lua5_1_5_linux_32_generic/lua: Exec format error

I've tried running this :

chcon -t httpd_sys_script_exec_t /path/to/extensions/Scribunto/engines/LuaStandalone/binaries/lua5_1_5_linux_64_generic/lua

(and set the proper path)

It always fails though. Any ideas? I'm running this on a Raspberry Pi 3 with stretch, apache, and php7. I can provide more info if needed.

Anomie (talkcontribs)

You'll probably need to compile lua 5.1 for your Raspberry Pi 3, or install a package from the distro, and follow the instructions at Extension:Scribunto#Additional binaries.

The distributed binaries are x86 and x86-64, while some quick Googling seems to indicate the Pi 3 is an arm processor of some sort.

98.100.16.174 (talkcontribs)

Figured it out, ran this

apt-get install lua5.1

added this to LocalSettings.php

$wgScribuntoEngineConf['luastandalone']['luaPath'] = '/usr/bin/lua5.1';

Thanks Anomie

Reply to "Trying to get infobox to run and I keep getting error 2, this is my dump file"

We need your feedback to improve Lua functions

1
MediaWiki message delivery (talkcontribs)
Reply to "We need your feedback to improve Lua functions"
SANtosito (talkcontribs)

I'm trying to make syntax highlighting working in modules but apparently sth is missing. I have installed WikiEditor, SyntaxHighlight, CodeEditor and have done everything as said in manual. All installed extension are working , just seems it dosen't work with Scribunto, so I guess the problem must be sth else

wfLoadExtension( 'WikiEditor' );

wfLoadExtension( 'SyntaxHighlight_GeSHi' );

wfLoadExtension( 'CodeEditor' );

wfLoadExtension( 'Scribunto' );

$wgScribuntoDefaultEngine = 'luastandalone';

$wgScribuntoEngineConf['luastandalone']['key'] = 'value';

$wgScribuntoUseGeSHi = true;

$wgScribuntoUseCodeEditor = true;

http://escforumwiki.com/index.php?title=Module:Documentation

Reply to "Syntax highlighting not working"

How do I pass current page contents to a lua template?

3
Gryllida (talkcontribs)

{{{{FULLPAGENAME}}}} as the first argument is interpreted as a literal string.

197.218.83.27 (talkcontribs)
Anomie (talkcontribs)

{{{{FULLPAGENAME}}}} is interpreted as { {{{FULLPAGENAME}}} }, not {{ {{FULLPAGENAME}} }}. Since there's probably no variable named "FULLPAGENAME" being passed it, it seems like nothing happens. You could add those spaces if you really want to do it.

But that seems like a rather odd thing to do, unless you're doing it inside a <noinclude> or the like.

Reply to "How do I pass current page contents to a lua template?"