Difference between revisions of "Reference:Scribunto"
The Scribunto (Latin: "they shall write/let them write (in the future)") extension allows for embedding scripting languages in MediaWiki. Currently the only supported scripting language is Lua.
Contents
-
1 Requirements
- 1.1 PCRE version compatibility
- 1.2 PHP pcntl
- 1.3 PHP mbstring extension
- 1.4 PCRE version compatibility[<a href="https://www.mediawiki.org/w/index.php?title=Extension:Scribunto&action=edit§ion=3" title="Edit section: PCRE version compatibility">edit]
- 1.5 Blank screen[<a href="https://www.mediawiki.org/w/index.php?title=Extension:Scribunto&action=edit§ion=37" title="Edit section: Blank screen">edit]
Requirements[edit | edit source]
PCRE version compatibility[edit | edit source]
PCRE 8.33 or later is recommended. You can see the version of PCRE used by PHP by viewing a phpinfo() web page, or from the command line with the command php -i | grep 'PCRE'
.
- Scribunto will not work with versions of PCRE lower than 8.10.
- PCRE 8.31 has bugs with JIT pattern studying that breaks various patterns when used with HHVM.
- PCRE 8.32 has a bug that will cause it to reject certain non-character codepoints, which will cause errors in the mw.html module.
CentOS 6 and RHEL 6 are stuck on PCRE 7 and need to be upgraded.
Updating to 8.33 on a server with an older version may be relatively complicated. See Updating to PCRE 8.33 or Higher for details.
PHP pcntl[edit | edit source]
Since Scribunto for MediaWiki 1.25, your PHP server also needs to have pcntl enabled (only works with Unix/Linux platforms) if you want to use "LuaStandAlone" (i.e. running in a separate child process). Under Windows, Scribunto will run Lua only as "LuaSandbox" (within the same PHP thread as the thread used by MediaWiki to run this Scribunto extension, but within the sandboxing PHP environment configured by Scribunto).
PHP mbstring extension[edit | edit source]
PHP needs to have the mbstring extension enabled.
To see if it installed on your server, you can check if it is enabled by running the command php -m
on the server. If the string mbstring is present in the output, the extension is enabled.
PCRE 8.33 or later is recommended. You can see the version of PCRE used by PHP by viewing a phpinfo() web page, or from the command line with the command php -i | grep 'PCRE'
.
- Scribunto will not work with versions of PCRE lower than 8.10.
- PCRE 8.31 has bugs with JIT pattern studying that breaks various patterns when used with HHVM.
- PCRE 8.32 has a bug that will cause it to reject certain non-character codepoints, which will cause errors in the mw.html module.
CentOS 6 and RHEL 6 are stuck on PCRE 7 and need to be upgraded.
Updating to 8.33 on a server with an older version may be relatively complicated. See Updating to PCRE 8.33 or Higher for details.
Blank screen[<a href="https://www.mediawiki.org/w/index.php?title=Extension:Scribunto&action=edit§ion=37" title="Edit section: Blank screen">edit]
Make sure your extension version is applicable to your MediaWiki version.
Source: mediawiki
The '''Scribunto''' ([https://en.wikipedia.org/wiki/Latin Latin]: "''[https://en.wiktionary.org/wiki/scribunto they shall write/let them write (in the future)]''") extension allows for embedding scripting languages in MediaWiki. Currently the only supported scripting language is [http://www.lua.org/ Lua]. == Requirements == === PCRE version compatibility === PCRE 8.33 or later is recommended. You can see the version of [[w:PCRE|PCRE]] used by PHP by viewing a phpinfo() web page, or from the command line with the command <code>php -i | grep 'PCRE'</code>. * Scribunto will not work with versions of PCRE lower than 8.10. * PCRE 8.31 has bugs with JIT pattern studying that [[phab:T73922|breaks various patterns when used with HHVM]]. * PCRE 8.32 has [http://bugs.exim.org/show_bug.cgi?id=1340 a bug] that will cause it to reject certain [[w:en:Mapping of Unicode characters#Non-characters|non-character codepoints]], which will cause errors in the mw.html module. CentOS 6 and RHEL 6 are stuck on PCRE 7 and need to be upgraded. Updating to 8.33 on a server with an older version may be relatively complicated. See [[Updating to PCRE 8.33 or Higher]] for details. === PHP pcntl === Since Scribunto for MediaWiki 1.25, your PHP server also needs to have [http://php.net/manual/en/pcntl.installation.php pcntl enabled] (only works with Unix/Linux platforms) if you want to use "LuaStandAlone" (i.e. running in a separate child process). Under Windows, Scribunto will run Lua only as "LuaSandbox" (within the same PHP thread as the thread used by MediaWiki to run this Scribunto extension, but within the sandboxing PHP environment configured by Scribunto). === PHP mbstring extension === PHP needs to have the [http://php.net/mbstring mbstring] extension enabled. To see if it installed on your server, you can check if it is enabled by running the command <code>php -m</code> on the server. If the string <tt>mbstring</tt> is present in the output, the extension is enabled. ===<span id="PCRE_version_compatibility" class="mw-headline">PCRE version compatibility</span><span class="mw-editsection"><span class="mw-editsection-bracket">[<a href="https://www.mediawiki.org/w/index.php?title=Extension:Scribunto&action=edit§ion=3" title="Edit section: PCRE version compatibility">edit]</span></span>=== PCRE 8.33 or later is recommended. You can see the version of [https://en.wikipedia.org/wiki/PCRE PCRE] used by PHP by viewing a phpinfo() web page, or from the command line with the command <code>php -i | grep 'PCRE'</code>. * Scribunto will not work with versions of PCRE lower than 8.10. * PCRE 8.31 has bugs with JIT pattern studying that [https://phabricator.wikimedia.org/T73922 breaks various patterns when used with HHVM]. * PCRE 8.32 has [http://bugs.exim.org/show_bug.cgi?id=1340 a bug] that will cause it to reject certain [https://en.wikipedia.org/wiki/en:Mapping_of_Unicode_characters#Non-characters non-character codepoints], which will cause errors in the mw.html module. CentOS 6 and RHEL 6 are stuck on PCRE 7 and need to be upgraded. Updating to 8.33 on a server with an older version may be relatively complicated. See [https://www.mediawiki.org/wiki/Updating_to_PCRE_8.33_or_Higher Updating to PCRE 8.33 or Higher] for details. ===<span id="Blank_screen" class="mw-headline">Blank screen</span><span class="mw-editsection"><span class="mw-editsection-bracket">[<a href="https://www.mediawiki.org/w/index.php?title=Extension:Scribunto&action=edit§ion=37" title="Edit section: Blank screen">edit]</span></span>=== Make sure your extension version is applicable to your MediaWiki version. ''' '''Source: '''[https://www.mediawiki.org/wiki/Extension:Scribunto mediawiki]
Line 1: | Line 1: | ||
The '''Scribunto''' ([https://en.wikipedia.org/wiki/Latin Latin]: "''[https://en.wiktionary.org/wiki/scribunto they shall write/let them write (in the future)]''") extension allows for embedding scripting languages in MediaWiki. Currently the only supported scripting language is [http://www.lua.org/ Lua]. | The '''Scribunto''' ([https://en.wikipedia.org/wiki/Latin Latin]: "''[https://en.wiktionary.org/wiki/scribunto they shall write/let them write (in the future)]''") extension allows for embedding scripting languages in MediaWiki. Currently the only supported scripting language is [http://www.lua.org/ Lua]. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
'''Source: '''[https://www.mediawiki.org/wiki/Extension:Scribunto mediawiki] | '''Source: '''[https://www.mediawiki.org/wiki/Extension:Scribunto mediawiki] |