Topic on Extension talk:Scribunto

Error: Call to undefined function

2
Summary last edited by FeRDNYC 16:14, 7 April 2024 1 month ago

Lua shell_exec() function needed to be enabled in hosting configuration

Lost Student (talkcontribs)

I installed this extension and am getting this error: Error: Call to undefined function MediaWiki\Extension\Scribunto\Engines\LuaStandalone\shell_exec().

The extension version I have is: – (9eeb97d) 02:13, November 28, 2023

The only configuration line in LocalSettings.php is $wgScribuntoDefaultEngine = 'luastandalone';.

Here is the system setup:

Installed software

Product Version
MediaWiki 1.39.5
PHP 8.1.26 (fpm-fcgi)
MariaDB 10.4.20-MariaDB-1:10.4.20+maria~buster-log
ICU 65.1
Lua 5.1.5

Is this a common error? Any help is appreciated!

Edit: in case it helps, here is the backtrace:

Backtrace:
from <redacted>/public_html/w/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneEngine.php(89)
#0 <redacted>/public_html/w/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneEngine.php(49): MediaWiki\Extension\Scribunto\Engines\LuaStandalone\LuaStandaloneEngine->getClockTick()
#1 <redacted>/public_html/w/extensions/Scribunto/includes/Hooks.php(305): MediaWiki\Extension\Scribunto\Engines\LuaStandalone\LuaStandaloneEngine->reportLimitData()
#2 <redacted>/public_html/w/includes/HookContainer/HookContainer.php(338): MediaWiki\Extension\Scribunto\Hooks::reportLimitData()
#3 <redacted>/public_html/w/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook()
#4 <redacted>/public_html/w/includes/HookContainer/HookRunner.php(2947): MediaWiki\HookContainer\HookContainer->run()
#5 <redacted>/public_html/w/includes/parser/Parser.php(827): MediaWiki\HookContainer\HookRunner->onParserLimitReportPrepare()
#6 <redacted>/public_html/w/includes/parser/Parser.php(766): Parser->makeLimitReport()
#7 <redacted>/public_html/w/includes/content/WikitextContentHandler.php(301): Parser->parse()
#8 <redacted>/public_html/w/includes/content/ContentHandler.php(1721): WikitextContentHandler->fillParserOutput()
#9 <redacted>/public_html/w/includes/content/Renderer/ContentRenderer.php(47): ContentHandler->getParserOutput()
#10 <redacted>/public_html/w/includes/EditPage.php(4535): MediaWiki\Content\Renderer\ContentRenderer->getParserOutput()
#11 <redacted>/public_html/w/includes/EditPage.php(4438): EditPage->doPreviewParse()
#12 <redacted>/public_html/w/includes/EditPage.php(3144): EditPage->getPreviewText()
#13 <redacted>/public_html/w/includes/EditPage.php(779): EditPage->showEditForm()
#14 <redacted>/public_html/w/includes/actions/EditAction.php(73): EditPage->edit()
#15 <redacted>/public_html/w/includes/actions/SubmitAction.php(38): EditAction->show()
#16 <redacted>/public_html/w/includes/MediaWiki.php(542): SubmitAction->show()
#17 <redacted>/public_html/w/includes/MediaWiki.php(322): MediaWiki->performAction()
#18 <redacted>/public_html/w/includes/MediaWiki.php(904): MediaWiki->performRequest()
#19 <redacted>/public_html/w/includes/MediaWiki.php(562): MediaWiki->main()
#20 <redacted>/public_html/w/index.php(50): MediaWiki->run()
#21 <redacted>/public_html/w/index.php(46): wfIndexMain()
#22 {main}
Lost Student (talkcontribs)

Okay, after further Googling, I figured out that shell_exec() is a PHP function. I went to my host settings and saw it was disabled. I enabled it and the error went away.