When using the LuaStandalone engine (this is the default), errors along the lines of "Lua错误:内部错误:解释器已退出,状态为1。" may be generated if the standalone Lua interpreter cannot be executed or runs into various runtime errors.To obtain more information, assign a file path to $wgScribuntoEngineConf['luastandalone']['errorFile'].The interpreter's error output will be logged to the specified file, which should prove more helpful in tracking down the issue.The information in the debug log includes debugging information, which is why there is so much of it.You should be able to ignore any line beginning with "TX" or "RX".
If you're setting up Scribunto and are using IIS/Windows, this appears to be solved by commenting out a particular line.
Lua错误:内部错误:解释器已退出,状态为2。
When using the LuaStandalone engine (this is the default), status 2 suggests memory allocation errors, probably caused by settings that allocate inadequate memory space for PHP or Lua, or both.Assigning a file path to $wgScribuntoEngineConf['luastandalone']['errorFile'] and examining that output can be valuable in diagnosing memory allocation errors.
Increase PHP allocation in your PHP configuration; add the line memory_limit = 200M.This allocation of 200MB is often sufficient (as of MediaWiki 1.24) but can be increased as required.Set Scribunto's memory allocation in LocalSettings.php as a line:
Finally, depending on the server configuration, some installations may be helped by adding another LocalSettings.php line
$wgMaxShellMemory=204800;# in KB
Note that all 3 memory limits are given in different units.
Lua error: Internal error: 2. on ARM architecture
If you're using an ARM architecture processor like on a RaspberryPi you'll face the error Lua error: Internal error: The interpreter exited with status 2. due to wrong delivered binary format of the Lua interpreter.
lua: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0
The installed default Lua interpreter shows:
lua: ELF 32-bit LSB pie executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.9,
look at the "Intel 80386" part what definitely is not correct.
Check in /usr/bin what version of Lua is installed on your system.If you have lua5.1 installed, you can either copy the interpreter to your lua5_1_5_linux_32_generic directory or set in your LocalSettings.php:
At present don't set wgScribuntoEngineConf to /usr/bin/lua5.3, it'll lead to the "Internal error 1".
Lua错误:内部错误:解释器已退出,状态为24。
When using the LuaStandalone engine (this is the default), status 24 suggests CPU time limit errors, although those should be generating a "The time allocated for running scripts has expired" message instead.It would be useful to file a task in Phabricator and participate in determining why the XCPU signal isn't being caught.
Lua错误:内部错误:解释器已退出,状态为126。
When using the LuaStandalone engine (this is the default), errors along the lines of "Lua错误:内部错误:解释器已退出,状态为126。" may be generated if the standalone Lua interpreter cannot be executed.This generally arises from either of two causes:
The lua executable file's permissions do not include Execute.
The server does not allow execution of files from the place where the executable is installed, e.g. the filesystem is mounted with the 'noexec' flag.
This often occurs with shared hosted servers.Remedies include adjusting $wgScribuntoEngineConf['luastandalone']['luaPath'] to point to a Lua 5.1 binary installed in an executable location, or adjusting or convincing the shared host to adjust the setting preventing execution.
Error condition such as: Fatal exception of type MWException
Check the MediaWiki, PHP, or webserver logs for more details on the exception, or temporarily set $wgShowExceptionDetails to true.
version 'GLIBC_2.11' not found
If the above gives you errors such as "version 'GLIBC_2.11' not found", it means the version of the standard C library on your system is too old for the binaries provided with Scribunto.You should upgrade your C library, or use a version of Lua 5.1 compiled for the C library you do have installed.To upgrade your C library, your best option is usually to follow your distribution's instructions for upgrading packages (or for upgrading to a new release of the distribution, if applicable).
If you copy the lua binaries from Scribunto master (or from gerrit:77905), that should suffice, if you can't or don't want to upgrade your C library.The distributed binaries were recently recompiled against an older version of glibc, so the minimum is now 2.3 rather than 2.11.
Scribunto文件中的Lua错误
这里的错误包括:
attempt to index field 'text' (a nil value)(尝试访问'text'字段,其值为nil)
↑i.e. 如果服务器“php.ini”文件中的disable_functions数组中列出了proc_open,Scribunto将不起作用。 如果是,你可能收到像proc_open(): open_basedir restriction in effect. File(/dev/null) is not within the allowed path(s):这样的错误消息. 如果你正在使用Plesk且拥有了足够的权限,你也许能够在PHP设置中为你的域名或者子域名设置open_basedir。 尝试将{WEBSPACEROOT}{/}{:}{TMP}{/}更换成{WEBSPACEROOT}{/}{:}{TMP}{/}{:}/dev/null{:}/bin/bash。