Extension talk:Scribunto/2017
Add topic| This page used the Structured Discussions extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
Noob here. How do the chmod and chcon lines of installation code work in the LocalSettings.php?
[edit]Just copy and paste?? 73.228.103.208 (talk) 14:33, 17 January 2017 (UTC)
- I'm getting this error when I reload my wiki after adding the extension code:
- Parse error: syntax error, unexpected 'a' (T_STRING) in C:\xampp\htdocs\mediawiki\LocalSettings.php on line 172 73.228.103.208 (talk) 14:35, 17 January 2017 (UTC)
- Line 172 is the chmod line! H E L P ! 73.228.103.208 (talk) 14:38, 17 January 2017 (UTC)
- You are supposed to run those lines in a terminal, they shouldn't go in LocalSettings.php. —Mainframe98 talk 14:49, 17 January 2017 (UTC)
Error with Scribunto 1.28&1.27
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hi! I have MediaWiki 1.25.2 and trying to install latest version of Scribunto.
And, in my LocalSettings.php I have "$wgMainCacheType = CACHE_NONE;" As it said in manual i shouldn't set "$wgParserCacheType" specially, so I don't set it.
When I install Scribunto 1.28 I getting such error: "MWException from line 150 of /mysite/includes/objectcache/ObjectCache.php: CACHE_ACCEL requested but no suitable object cache is present. You may want to install APC.
Backtrace:
- 0 /var/www/vhosts/64/150891/webspace/httpdocs/farming-wiki.ru/extensions/Scribunto/engines/LuaCommon/LuaCommon.php(322): ObjectCache::newAccelerator(string)
- 1 /var/www/vhosts/64/150891/webspace/httpdocs/farming-wiki.ru/extensions/Scribunto/engines/LuaCommon/LuaCommon.php(152): Scribunto_LuaEngine->loadLibraryFromFile(string)
- 2 /var/www/vhosts/64/150891/webspace/httpdocs/farming-wiki.ru/extensions/Scribunto/engines/LuaCommon/LuaCommon.php(119): Scribunto_LuaEngine->registerInterface(string, array)
- 3 /var/www/vhosts/64/150891/webspace/httpdocs/farming-wiki.ru/extensions/Scribunto/engines/LuaStandalone/LuaStandaloneEngine.php(9): Scribunto_LuaEngine->load()
..."
Trying Scribunto 1.27 I get error 500 and such info in log file: "PHP Fatal error: Call to undefined function wfGlobalCacheKey() in /mysite/extensions/Scribunto/engines/LuaCommon/LuaCommon.php on line 319"
What I'm doing wrong? Help me, please.
By the way, if I using scribunto 1.23, almost everything works fine, but in TNavbar template I have <scribunto-parser-error>: "Ошибка Lua в mw.html.lua на строке 345: Tag name must be a string." 217.66.158.199 (talk) 12:21, 24 January 2017 (UTC)
- You need to match the version number of Scribunto with the version number of MediaWiki. If you're running MediaWiki 1.25.2 you should install Scribunto 1.25.2 as well. — Mr. Stradivarius ♪ talk ♪ 13:32, 24 January 2017 (UTC)
- Thanx! But where can i take it? In Extension Distributor there are only 1,23, than 1,27... 217.66.158.59 (talk) 16:10, 25 January 2017 (UTC)
- MediaWiki 1.25 is no longer supported. You need to upgrade (not just for this, but for other important things like security fixes). Jackmcbarn (talk) 04:12, 2 February 2017 (UTC)
- Thnx! Done! RuSJcD (talk) 10:54, 6 February 2017 (UTC)
HTML tags displayed for some Wikipedia Infoboxes
[edit]I'm trying to set up MediaWiki 1.28 loaded with one of January dumps from Wikipedia.
Some Infoboxes are displaying as I would expect, just like on Wikipedia, but some are cusing HTML tags to appear before the article content.
As an example for the Samacá article the Infoxbox looks more or less correct but there is '
' before the article text. As best I can determine by comparing with the same Wikipedia page's HTML these tags are either missing or rendered in the wrong place within the Infobox HTML.
I don't appear to have an Lua errors in $wgScribuntoEngineConf['luastandalone']['errorFile'] is there anywhere else I should look or anything else I can do debug this?
Thanks! 2001:4998:EFFD:508:F18E:7BCF:AB56:F7ED (talk) 01:06, 25 January 2017 (UTC)
- It looks like en:Template:Infobox settlement is just producing braindead output on en:Samacá. When I use en:Special:ExpandTemplates to find the wikitext that the template produces on that article, I get the following (indented for clarity):
<table class="infobox geography vcard" style="width:22em;width:23em"> <tr> <th colspan="2" style="text-align:center;font-size:125%;font-weight:bold;font-size:1.25em; white-space:nowrap"><span class="fn org">Samacá</span> <tr> <td colspan="2" style="text-align:center;background-color:#cddeff; font-weight:bold;"> <span class="category">[[Municipalities of Colombia|Municipality]] and town</span> </td> </tr> </th></tr> -- snip -- </table>
- So this is problem in the template, not a problem on your end. If I remember rightly, the English Wikipedia is still using HTML Tidy to sanitise bad HTML in wikitext like this, which may explain the discrepancy between the HTML generated on Wikipedia and the HTML generated from your MediaWiki installation.
- There is a plan to stop using HTML Tidy in the near future, which will mean templates like this one will break and give the volunteer template coders a good incentive to actually fix them. In the meantime you can leave a message (or an edit request) on the talk pages of any templates that need to be fixed. — Mr. Stradivarius ♪ talk ♪ 01:46, 25 January 2017 (UTC)
- Looks like my problem, thank you! 2001:4998:EFFD:508:F18E:7BCF:AB56:F7ED (talk) 02:09, 25 January 2017 (UTC)
Lua error: Internal error: The interpreter has terminated with signal "11"
[edit]Hello,
Recently installed MediaWiki 1.28, as well as Scribunto 1.28.
Added these two lines in LocalSettings.php
require_once "$IP/extensions/Scribunto/Scribunto.php";
$wgScribuntoDefaultEngine = 'luastandalone';
However, when adding a template, I get an error in the template page as:
Lua error: Internal error: The interpreter has terminated with signal "11"
And the template doesn't display correctly.
Not sure what is the issue! Appreciate your help!
P.S: My wiki is on a shared hosting! AshrafKotb (talk) 12:45, 16 February 2017 (UTC)
- Any advice? AshrafKotb (talk) 09:59, 23 February 2017 (UTC)
- Anyone know anything about this? Lucianinski (talk) 23:39, 19 March 2017 (UTC)
Cannot create process: proc_open: failed to open stream: Permission denied
[edit]$wgScribuntoEngineConf['luastandalone']['errorFile'] = "C:/tmp/errorFile";
I'm trying to use Scribunto for Template:Navbox
The error I'm getting:
Lua error: Cannot create process: proc_open(/usr/share/webapps/mediawiki/extensions/Scribunto/errorFile): failed to open stream: Permission denied
The LocalSettings.php lines:
require_once "$IP/extensions/Scribunto/Scribunto.php"; $wgScribuntoDefaultEngine = 'luastandalone'; $wgScribuntoEngineConf['luastandalone']['errorFile'] = "$IP/extensions/Scribunto/errorFile";
And the permissions:
$ ls -l extensions/Scribunto/ total 96 -rw-r--r-- 1 root root 19917 Nov 18 19:15 COPYING -rw-r--r-- 1 root root 609 Nov 18 19:15 Gruntfile.js -rw-r--r-- 1 root root 2793 Nov 18 19:15 Scribunto.magic.php -rw-r--r-- 1 root root 8111 Nov 18 19:15 Scribunto.namespaces.php -rw-r--r-- 1 root root 9437 Nov 18 19:15 Scribunto.php drwxr-xr-x 2 root root 4096 Nov 18 19:15 common -rw-r--r-- 1 root root 702 Nov 18 19:15 composer.json -rw-r--r-- 1 root root 3945 Nov 18 19:15 composer.lock drwxr-xr-x 5 root root 4096 Jan 9 2016 engines -rwxrwxrwx 1 root root 0 Feb 26 23:44 errorFile -rw-r--r-- 1 root root 278 Nov 18 19:15 gitinfo.json drwxr-xr-x 2 root root 4096 Nov 18 19:15 i18n drwxr-xr-x 2 root root 4096 Nov 18 19:15 modules -rw-r--r-- 1 root root 276 Nov 18 19:15 package.json -rw-r--r-- 1 root root 505 Nov 18 19:15 phpcs.xml drwxr-xr-x 3 root root 4096 Jan 9 2016 tests drwxr-xr-x 3 root root 4096 Nov 18 19:15 vendor -rw-r--r-- 1 root root 48 Nov 18 19:15 version
Do you know what's wrong? Stromoxpage (talk) 07:05, 27 February 2017 (UTC)
- Setting the parent directory permissions to 777 will work. Maybe moving the log to a directory owned by the web server's process owner also? Stromoxpage (talk) 20:11, 28 February 2017 (UTC)
[RESOLVED] Error processing Infobox
[edit]I have MediaWiki 1.23 and Scribunto 1.23 and have followed this guide to install the Infobox from Wikipedia: https://trog.qgl.org/20110815/setting-up-infobox-templates-in-mediawiki/
When I try to insert an example info box, I get <script-parser-error>:
Lua error in mw.html.lua at line 253: Invalid class given: The name must be either a string or a number.
Backtrace:
- (tail call): ?
- [C]: in function "error"
- mw.html.lua:253: in function "addClass"
- Module:Infobox:234: ?
- (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]: ?
What I have tried:
- Upgrading MediaWiki is not an option because I cannot upgrade PHP on this server. Been there, done that. Will break entire site for force upgrade (Debian Wheezy will not go higher than PHP 5.5 and MediaWiki >= 1.27 require PHP >= 5.9e
- I have tried using newer versions of Scribunto but they break in other ways due to not matching MediaWiki 1.23. 64.134.197.47 (talk) 23:49, 4 March 2017 (UTC)
- This is because you have an old version of mw.html - the version of Module:Infobox that you are using assumes the latest version of mw.html, and throws the error when it gets input that relies on the new features (which will be almost all of the time). If you absolutely can't upgrade, then downgrading the modules in question should work. You need this version of Module:Infobox, which requires this version of Module:HtmlBuilder. If you try to use other modules that depend on the newer mw.html, be aware that they will probably also break for similar reasons. Also, if you can't upgrade to the latest MediaWiki version, at least make sure you have MediaWiki 1.23.15, as it has important security fixes. — Mr. Stradivarius ♪ talk ♪ 00:34, 5 March 2017 (UTC)
- I have that version (the latest stable release of 1.23).
- How would I import/install these older versions of the modules (the only way I know is Import/Export, but that won't leet me get specific older versions, will it?)? 64.134.197.47 (talk) 01:11, 5 March 2017 (UTC)
- Never mind. I figured it out (just copy the text directly). The Infoboxes are now working! Thank you so much! 64.134.197.47 (talk) 01:15, 5 March 2017 (UTC)
Might be a good idea to remove Tracking Category:Scribunto_modules_with_errors
[edit]The category was designed to detect syntax errors in saved lua modules, but currently it is impossible to save pages with syntax errors unless there is a bug, so perhaps it has outlived its usefulness, see :
- https://phabricator.wikimedia.org/T41605
- https://gerrit.wikimedia.org/r/#/c/160367/ 197.218.91.193 (talk) 17:45, 3 April 2017 (UTC)
- In the Gerrit commit message you linked to it says, "Since some modules may still have errors from before this change, the tracking category for them has not been removed." I don't know if we can assume that enough wikis have been fixed yet for us to remove the tracking category. For one thing, wikis using an older version of Scribunto can keep adding broken modules as much as they like, but then if they upgrade, then they would suddenly lose the ability to track them. — Mr. Stradivarius ♪ talk ♪ 09:17, 4 April 2017 (UTC)
- > I don't know if we can assume that enough wikis have been fixed yet for us to remove the tracking category.
- That seems like more of an oversight by the developer who committed that code. That would essentially mean that the category stays there forever waiting for people to upgrade so it can populate. It is trivial to create a server side maintenance script that uses the category list and automatically comments out all the invalid modules. Alternatively, it is also possible to retrigger the check on every module that contains such code to repopulate the categories if they are out of date.
- If you mean that it is unknown for wikimedia wikis, all it needs is a bot to run over all wikis and check those categories. It is theoretically also possible to do by a client side bot. The API used by the scribunto console can also be used to detect such invalid modules, as it certainly can't load modules that contain such errors.
- > For one thing, wikis using an older version of Scribunto can keep adding broken modules as much as they like, but then if they upgrade, then they would suddenly lose the ability to track them.
- Going by that logic, all MS-DOS 6 programs would still be working with windows 10 (they don't). A server-side maintenance script (or bot) can take care of such cases. 197.218.80.245 (talk) 09:51, 4 April 2017 (UTC)
- You're right, it would be easy to write a script to clean up broken modules, and that's a very good way of dealing with the problem on individual wikis. I think the question is one of utility. Are people going to use this category to clean up broken modules, and will it be useful in the future? Would that be easier than running a script? And does that outweigh the disadvantages of leaving this code in Scribunto? (And what are those disadvantages?) I'm not trying to say that this is a bad idea - actually, I am all in favour of making code simple, and of removing things that are unnecessary - but I think it's hard to see what kind of impact this might have on users, and we have to consider that too. At any rate, we should probably move this discussion to Phabricator, as that is where most of the development decisions are made. — Mr. Stradivarius ♪ talk ♪ 09:09, 5 April 2017 (UTC)
Suggestion: Document modules automatically (e.g. using LDoc, luadoc, etc)
[edit]One of the pain points of lua is that aside from being hard for the average person, it is also a pain to document. There are no guidelines, and most users seem to focus on documenting how to use the modules rather than how they work.
Perhaps one of the existing libraries would be useful here:
- Lua doc - http://keplerproject.github.io/luadoc/
- Ldoc - https://stevedonovan.github.io/ldoc/
- http://lua-users.org/wiki/ExpLua
- https://github.com/CentauriSoldier/Dox
This would enable automatic documentation like the module section of this page (generated using a lua script and explua), for example:
It is possible to do this in any wiki, but such hacks will always be inferior to built in solutions which could for example parse the docs of all dependent modules and show them in a user friendly way. 197.218.80.152 (talk) 21:00, 4 April 2017 (UTC)
- This was considered and rejected during development. If the documentation is generated from the code of the module, then any updates to the documentation require that all pages using the module be reparsed. This is also one of the reasons templates typically have documentation transcluded from a subpage instead of having the documentation inline.
- BTW, since you seem to change IP addresses daily if not more often, it would be easier to communicate with you if you were to create an account. Anomie (talk) 21:16, 4 April 2017 (UTC)
Chmod issue
[edit]When doing the "chmod a+x /path/to/extensions/Scribunto/engines/LuaStandalone/binaries/yourOS/lua" part of the installation, I get "stdin:1: '=' expected near 'a'". I would like to know how to fix this issue, any help is greatly appreicated. Thanks in advance! SwiftyPeep (talk) 03:04, 13 April 2017 (UTC)
- It sounds like you are trying to execute the command inside of the Lua interpreter, but instead you need to run the command in your OS's shell. Press CTRL+D to exit the Lua interpreter, and try entering the command again. — Mr. Stradivarius ♪ talk ♪ 04:09, 13 April 2017 (UTC)
- Pressing CTRL+D didn't do anything (I'm using Windows). Thanks for the assistance! SwiftyPeep (talk) 07:42, 15 April 2017 (UTC)
- Ah, well, Windows doesn't have the chmod command (that's a unix thing).[[:en:Unix|En:unix
- En:unix]] Basically, this step of the installation is to make sure your OS lets you run the Lua program. If you can't run the Lua program in your OS at all, then of course you aren't going to be able to run it through Scribunto. I'm not a Windows expert, but I imagine all you have to do is right-click on the Lua file, edit the file properties, and make sure it has some sort of "execute" permission. Judging from this help page, it looks like "read & execute" is the correct permission name. — Mr. Stradivarius ♪ talk ♪ 07:29, 16 April 2017 (UTC)
Simple user gets stuck
[edit]I am trying to import a xml and get this error screen message:
Warning: require_once(/home/harry-arends.nl/public_html/mat54_Wiki/extensions/AdaptiveThumb/AdaptiveThumb.php): failed to open stream: No such file or directory in /home/harry-arends.nl/public_html/mat54_Wiki/LocalSettings.php on line 305
Fatal error: require_once(): Failed opening required '/home/harry-arends.nl/public_html/mat54_Wiki/extensions/AdaptiveThumb/AdaptiveThumb.php' (include_path='/home/harry-arends.nl/public_html/mat54_Wiki/vendor/pear/pear_exception:/home/harry-arends.nl/public_html/mat54_Wiki/vendor/pear/console_getopt:/home/harry-arends.nl/public_html/mat54_Wiki/vendor/pear/pear-core-minimal/src:/home/harry-arends.nl/public_html/mat54_Wiki/vendor/pear/mail_mime:/home/harry-arends.nl/public_html/mat54_Wiki/vendor/pear/mail_mime-decode:/home/harry-arends.nl/public_html/mat54_Wiki/vendor/pear/net_socket:/home/harry-arends.nl/public_html/mat54_Wiki/vendor/pear/net_smtp:/home/harry-arends.nl/public_html/mat54_Wiki/vendor/pear/mail:.:/usr/share/php') in /home/harry-arends.nl/public_html/mat54_Wiki/LocalSettings.php on line 305
Following your instructions i downloaded the zip and moved the unpacked files in the extension folder and added this:
##added 24042017
require_once "$IP/extensions/Scribunto/Scribunto.php";
$wgScribuntoDefaultEngine = 'luastandalone';
to my localsettings file. And then the wiki produces only erors and stops working. Had to remove localsetting entry to get it working again GRMBLE GRMBLE NOT FUNNY
What could be wrong as i am not a programmer but just a guy to get a wiki up and running
PS I am using MW1. Gharryh (talk) 15:10, 24 April 2017 (UTC)
- Those errors seem to be about the AdaptiveThumb extension. Why do you think they are related to Scribunto? Jackmcbarn (talk) 17:47, 13 July 2017 (UTC)
Scrabblunto
[edit]Giving the length of this page and how recurring the problems that exist here, are the extension devs (all from WMF I believe) working on a way to make it easier (not by way of a colossal tool like vagrant)? CalNation (talk) 21:02, 3 May 2017 (UTC)
- Judging from Scribunto's board on Phabricator, I don't believe there's any such effort at the moment. Patches welcome. :) — Mr. Stradivarius ♪ talk ♪ 01:12, 4 May 2017 (UTC)
- Most of the problems people have here are either from not correctly following the instructions we already have, or from trying to use a stupidly locked-down Web host. Neither of those are really things that we can fix. Jackmcbarn (talk) 17:46, 13 July 2017 (UTC)
luasandbox with php7
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I have just upgraded to php7. However, luasandbox doesn't want to build. phpize complains that ltmain.sh does not exist. ./configure then gives some errors to do with ltmain.sh and libtoolT. make fails as there is no libtool file or directory. I've reverted to lua for the moment. What do I need to do to get luasandbox on php7? Prh47bridge (talk) 17:02, 21 May 2017 (UTC)
- Ignore me. I've realised what I was doing wrong. Prh47bridge (talk) 19:07, 21 May 2017 (UTC)
Lua error: Internal error: The interpreter has terminated with signal "2".
[edit]I have been following a lot of various set up guides to try and get Scribunto and Infoboxes to work. I keep getting this error when I try to create an infobox on a page. It doesn't seem like many other people get a signal 2 error, more often it's a signal 11 error – not sure what I am doing differently.
I am running my mediawiki on a dreamhost server. I have changed the file permissions for all of the luastandalone binaries via Filezilla FTP server and changed all of their permission codes to 777 (not sure if that information is pertinent).
Anything I could be missing? Thanks! 146.115.5.188 (talk) 15:54, 7 June 2017 (UTC)
- I managed to get an error log output what happens on page load and I received this:
- /home/site/site.com/mw/extensions/Scribunto/engines/LuaStandalone/lua_ulimit.sh: xmalloc: ../bash/make_cmd.c:508: cannot allocate 24 bytes (49152 bytes allocated)
- /home/site/site.com/mw/extensions/Scribunto/engines/LuaStandalone/lua_ulimit.sh: xmalloc: ../bash/unwind_prot.c:320: cannot allocate 228 bytes (45056 bytes allocated) 146.115.5.188 (talk) 18:07, 8 June 2017 (UTC)
- As an attempt to go around memory issues I implemented these lines into the LocalSetting.php file:
- require_once "$IP/extensions/Scribunto/Scribunto.php";
- #$wgScribuntoDefaultEngine = 'luastandalone';
- $wgScribuntoEngineConf['luastandalone']['luaPath'] = '/usr/bin/lua';
- $wgScribuntoEngineConf['luastandalone']['errorFile'] = '/home/site/site.com/file.log';
- $wgShowExceptionDetails = true;
- $wgScribuntoEngineConf[‘luastandalone’][‘memoryLimit’] = 209715200; # bytes
- $wgMaxShellMemory = 204800; # in KB 66.37.41.173 (talk) 19:27, 8 June 2017 (UTC)
- Those lines also do not work. Along with adding a phprc file that includes this line:
- memory_limit = 200M
- Still getting the Signal 2 error. 66.37.41.173 (talk) 19:28, 8 June 2017 (UTC)
- I was having similar issues with a Dreamhost install. I figured out that I can use Dreamhost Lua binaries by setting $wgScribuntoEngineConf['luastandalone']['luaPath'] = '/usr/bin/lua5.1'; in LocalSettings.php. That solved some issues I was having, but I then couldn't get past this signal "2" issue.
- I tried several things, then I tried the first set of additions by 66.37.41.173. When I added those lines to LocalSettings.php in Notepad++, I noticed the single quote marks for the memoryLimit line were not correct. (Notepad++ is good that way.) I made sure to correct them for consistency, applied the changes, and my issue went away. No more signal "2".
- So be sure to correct the single quotes in that bytes line. Should look like this now:
- $wgScribuntoEngineConf['luastandalone']['memoryLimit'] = 209715200; # bytes
- Also, if you want the error log to show up, you need to correct the errorFile URL to match your directory structure. Lostraven (talk) 20:19, 20 June 2017 (UTC)
Importazione non riuscita: The lua binary (/membri/themagotuxwiki/extensions/Scribunto/engines/LuaStandalone/binaries/lua5_1_5_linux_64_generic/lua) is not executable with all permissions set as "executable"
[edit]Hello, today I created my brand new wiki and everything went fine until I created my first character page.
I looked on Google on how to import templates and I tried to import the Template:Infobox from wikipedia, but it gave me an error asking me for some scrubunto extension, so I looked on Google and found a guide here on how to install it, I downloaded the one for my version, wich is 1.29, I then extracted it with 7zip and uploaded on altervista with Filezilla.
I then set up the LocalSetting.php file to make it load up and when I tried to import the template again I got this error:
"Importazione non riuscita: The lua binary (/membri/themagotuxwiki/extensions/Scribunto/engines/LuaStandalone/binaries/lua5_1_5_linux_64_generic/lua) is not executable."
at that point I went on my Filezilla and I changed the permissions of the whole folder structure of "Extensions" to enable execute, at that point I thought "well, since now the permissions are ok, it must work, right ?" No, wrong, when I tried to import the template again, I got that same error again !!!
I checked the permissions of the extensions folder and everything, "read", "write" and "execute" are checked as well as "recursive" and "all files and subfolders".
I created my wiki on the host Altervista, on which I've been making sites for a lot of years now (but I never created a wiki there until today).
I basically want the template:infobox to work so I can make the characters pages with the character's name, role and all other stuff on the right as well as the picture with the description, you know, that rectangular thing with all the character's info that is on every wikipedia page of any character. Elia1995 (talk) 11:28, 17 July 2017 (UTC)
- [http://themagotuxwiki.altervista.org/index.php?title=TheMagoTux|This is the page], as you can see it says "Missing module "infobox" in the beginning.
- EDIT: now the page just gives away the error directly.
- Here's a screenshot of the permissions of that lua file in particular: https://image.prntscr.com/image/Esib92WcTISvhNt2aTOiyQ.png Elia1995 (talk) 11:34, 17 July 2017 (UTC)
- It sounds like you need to add something like the following to your wiki: https://en.wikipedia.org/wiki/Module:Infobox DHillBCA (talk) 17:41, 17 July 2017 (UTC)
- That's exactly what I'm trying to import: Template:Infobox and the module:infobox, but when I try to import them, I get that lua execution error nonetheless I have the "execute" permissions on that file.
- Here's a screenshot: https://image.prntscr.com/image/ZDHA_4ZgQzSF0WJ9WMxIjQ.png Elia1995 (talk) 18:49, 17 July 2017 (UTC)
- Check that exact file. Don't count on the folder to propagate the settings down. If you check that and it's executable too, make sure you're not on a noexec filesystem or under SELinux restrictions. Jackmcbarn (talk) 02:13, 18 July 2017 (UTC)
- The actual exact file is set as "executable".
- How do I check if the host uses a noexec filesystem ? Elia1995 (talk) 17:30, 18 July 2017 (UTC)
- Check mount options in /etc/fstab. Alexander Mashin talk 04:57, 13 September 2017 (UTC)
Intensively used Module:Syrian_Civil_War_detailed_map stops displaying villages from +- line 2700
[edit]Hi,
I had to split the intensively used Module:Syrian_Civil_War_detailed_map into a detailed map and an overview map.
Because the huge middle eastern conflict map could no longer include the whole detailed map because it had become to large.
After a lot of work Module:Syrian_Civil_War_detailed_map now successfully inlcudes Module:Syrian_Civil_War_overview_map with all the large towns and strategic places and the huge middle eastern conflict map succesfully includes the new Module:Syrian_Civil_War_overview_map instead of the Module:Syrian_Civil_War_detailed_map
Yet a new problem occured with the Module:Syrian_Civil_War_detailed_map that I don't understand can't solve.
All villages after +- line 2700 won't display. While before it displayed more than 7000 lines.
Can anyone look at it and try to solve it?
The module is intensively monitored by large amount of people and it should be remain out of fully working order for to long.
Kind regards, Niele~enwiki (talk) 16:26, 26 July 2017 (UTC)
- You'd probably get better help asking at en:Wikipedia talk:Lua. Anomie (talk) 19:05, 26 July 2017 (UTC)
- Thanx, I posted it there and emailed some users. Niele~enwiki (talk) 20:18, 26 July 2017 (UTC)
Lua on shared host
[edit]It is possible install lua on shared host? 80.182.12.56 (talk) 13:13, 11 August 2017 (UTC)
LuaSandbox Update
[edit]I am trying to update from LuaSandbox 2.0.14-alpha to 2.0.15-alpha. I updated the code using git and than ran
phpize && ./configure && make && sudo make install
but it still shows that I'm on 2.0.14-alpha. How can I fix this? I did restart apache. 2002:43F4:3186:1234:4D53:5039:7DA7:BDF7 (talk) 15:36, 10 September 2017 (UTC)
- How did you install LuaSandbox originally? Did you put the newly generated luasandbox.so file in the right place? Legoktm (talk) 05:37, 11 September 2017 (UTC)
- I followed the instructions on this page. 24.39.1.139 (talk) 13:40, 11 September 2017 (UTC)
- Check, if PHP loads the extension from the directory, where it was compiled to. Alexander Mashin talk 04:53, 13 September 2017 (UTC)
- It seems to be loaded correctly. Any other ideas? MacFan4000 (talk) 22:48, 17 September 2017 (UTC)
How to nominate a module for speedy deletion?
[edit]I doubt just inserting {{Delete}} in "the header of" codes shall be helpful...
Maybe I should create its /doc subpage with that?! Liuxinyu970226 (talk) 05:47, 16 September 2017 (UTC)
- You're right - leaving the template on the module itself won't add the module page to the relevant category, so doing that won't help. Instead you could put it on the /doc page or the talk page, and explain that it is the module itself that you want deleted. Or you could leave a request on the relevant admin noticeboard. As far as I'm aware, those are the best solutions available at the moment. — Mr. Stradivarius ♪ talk ♪ 03:52, 17 September 2017 (UTC)
Installing Modules
[edit]I installed this extension so I would be able to install modules, but I can't figure out how to install them.
I followed the instructions on this page and the extension is working, but if I wanted to install something like the String module, do I just copy the script, save it as something.extension and upload it to my extensions/Scribunto/modules/ directory?
Even the "hello world" Bananas module doesn't say where or how to save it. 2600:1003:B45D:D34B:D4EB:D72B:9F2:C36E (talk) 14:34, 13 October 2017 (UTC)
- You save them as pages on the wiki itself. To "install" the string module, copy it, edit the page "Module:String" on your wiki, paste the contents, and save the page. If the modules you install depend on any other modules, you will need to install those as well, or you may get errors. I'm not aware of any way to automatically find module dependencies like that - I usually just eyeball them for "require" statements. — Mr. Stradivarius ♪ talk ♪ 14:38, 13 October 2017 (UTC)
- Thank you very much! 2600:1003:B45D:D34B:D4EB:D72B:9F2:C36E (talk) 15:02, 13 October 2017 (UTC)
- Thank you very much for this topic! I couldn't find anywhere where this was explicitly stated.
- This makes it so much more clear. Didn't realize a "Module:" was just like a "Template:" that you just save the page and it works itself out. :P
- IcarusATB (talk) 05:27, 10 April 2019 (UTC)
Why the LUA 5.1 requirement?
[edit]- I was in the process of trying to install the luasandbox Apache module, but the LUA 5.1 requirement is truly a problem, unless I'm compiling LUA myself. Even on my rather ancient server OS (a few years old), the LUA that comes with it is LUA 5.2. The latest LUA version is 5.3.4. I doubt someone will ever find a LUA 5.1 package on a current distro.
- Thus my question: Is there a plan to support newer LUA versions in the future? Tessus (talk) 03:56, 5 November 2017 (UTC)
I doubt someone will ever find a LUA 5.1 package on a current distro.
- https://packages.debian.org/stretch/lua5.1 Anomie (talk) 23:07, 5 November 2017 (UTC)
- That's task T178146 in Phabricator, but I don't know if there is a timetable for implementing it. The motivation isn't really there for WMF wikis, as all the modules on the wikis have been written for Lua 5.1. — Mr. Stradivarius ♪ talk ♪ 05:12, 5 November 2017 (UTC)
- Thanks for the info. That pretty much explains it. See, I didn't know that LUA code is not backwards compatible. Tessus (talk) 05:22, 5 November 2017 (UTC)
- I think the modules on the wikis should be able to run on Lua 5.2 and 5.3, as Scribunto restricts or disables the features (like getfenv and setfenv) that would break on moving from Lua 5.1. It's just the Scribunto extension code itself that needs updating (although that is by no means a small job, especially when you factor in the security review). — Mr. Stradivarius ♪ talk ♪ 05:53, 5 November 2017 (UTC)
- Ok, that explains it even more. I have never looked into the extension code (e.g. I don't know if it was written in C or in Lua, but I always assumed backwards compatibility to a certain point.) I mean I can still compile C code from the 70s. Even APIs are mostly compatible and are phased out via deprecation (e.g. Objective C classes and methods). Therefore I would have never thought that this would be such a challenge. Well, I guess I learned something new.
- Thanks again for the explanation. Tessus (talk) 06:05, 5 November 2017 (UTC)
Lua error: Cannot create process: proc_open(/dev/null): failed to open stream:
[edit]Hello Everyone,
I hard trying to setup correctly Scribunto but I get the following error:
Lua error: Cannot create process: proc_open(/dev/null): failed to open stream: Operation not permittedScript error: No such module "Check for unknown parameters". Script error: No such module "documentation".
And php debug:
Warning: proc_open(): open_basedir restriction in effect. File(/dev/null) is not within the allowed path(s): (/var/sentora/hostdata/zadmin/public_html/mydomain_com:/var/sentora/temp/) in /var/sentora/hostdata/zadmin/public_html/mydomain_com/extensions/Scribunto/engines/LuaStandalone/LuaStandaloneEngine.php on line 267
Any idea how to fix that ?
Thanks in advance. Adrianevs (talk) 16:51, 5 November 2017 (UTC)
- The problem itself is in the warning message: "open_basedir restriction in effect". You'll need to disable that. You'll need to talk to your hosting provider, it might be an option in the configuration panel. Legoktm (talk) 17:54, 6 November 2017 (UTC)
- @Legoktm I run the mediawiki on a dedicated server. Any advice ? Adrianevs (talk) 18:58, 7 November 2017 (UTC)
- You should edit your PHP configuration (php.ini) and disable the open_basedir restriction. Legoktm (talk) 22:19, 7 November 2017 (UTC)
- Its work 8.31.163.17 (talk) 22:00, 26 May 2022 (UTC)
- There is nothing set in my php.ini of CLI. But still got same error. What should I do?
- Using 2G ram server. Deletedaccount4567435 (talk) 20:40, 22 December 2017 (UTC)
error when loading luasandbox.so
[edit]The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I've compiled the PHP module as follows:
phpize LUA_CFLAGS="-I/usr/local/lua-5.1.5/include" LUA_LIBS="-L/usr/local/lua-5.1.5/lib" ./configure make install
The module is created successfully, but when I start php-fpm, I get the following error message:
luasandbox.so: undefined symbol: luaopen_debug in Unknown on line 0
I'd appreciate any help with this. Tessus (talk) 00:35, 13 November 2017 (UTC)
- You seem to have forgotten the '-l' to actually link against the Lua library. Try
LUA_LIBS="-L/usr/local/lua-5.1.5/lib -llua5.1", assuming the actual library is /usr/local/lua-5.1.5/lib/liblua5.1.so. Anomie (talk) 14:24, 13 November 2017 (UTC) - Thanks for the reply.
- The Lua 5.1.5 source code does not generate a shared object, but only a static library. There are no options in the Lua Makefile to generate a dynamic lib.
- Usually it should not be necessary to add the lib to the X_LIBS var, since configure is supposed to do that. These env vars should only show the locations of the include and library files (and necessary 3rd party libs - not the lib itself!!!).
- Anyway, adding the lib to LUA_LIBS made it worse. The module did not even compile anymore.
- Tessus (talk) 20:57, 13 November 2017 (UTC)
cc -shared .libs/alloc.o .libs/data_conversion.o .libs/library.o .libs/luasandbox.o .libs/timer.o .libs/luasandbox_lstrlib.o -L/usr/local/lua-5.1.5/lib -lrt -llua -Wl,-rpath -Wl,/usr/local/lua-5.1.5/lib -Wl,-soname -Wl,luasandbox.so -o .libs/luasandbox.so /bin/ld: /usr/local/lua-5.1.5/lib/liblua.a(lapi.o): relocation R_X86_64_32 against `luaO_nilobject_' can not be used when making a shared object; recompile with -fPIC /usr/local/lua-5.1.5/lib/liblua.a: could not read symbols: Bad value collect2: error: ld returned 1 exit status make: *** [luasandbox.la] Error 1
- Wow, ok, the build system of Lua 5.1.5 sucks. It still does not give you a dynamic lib, but adding
-fPICto theCFLAGSinsrc/Makefiledid the trick. - The following works to compile the sandbox:
phpize LUA_CFLAGS="-I/usr/local/lua-5.1.5/include" LUA_LIBS="-L/usr/local/lua-5.1.5/lib -llua" ./configure make install
- Summary: The Lua library has to be compiled with
-fPICand the Lua library has to be explicitly stated inLUA_LIBSfor the sandbox. Tessus (talk) 02:16, 14 November 2017 (UTC)