• GoDaddy Community
  • Websites + Marketing | Website Builders
  • Websites + Marketing | Website Builders

    cancel
    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 

    MediaWiki, Infoboxs and LUA

    Hey everyone.

     

    I have been trying for some time to set up a wiki page that shares the same functionality as Wikipedia.  I keep hitting a wall when it comes to getting Infoboxes to work.  Seems that no webhost supports LUA which is necessary to run Scribunto and ultimately place infoboxes on the wiki pages.  

     

    I've learned that installing LUA is possible using a cloud server but I have no idea where to start with that - do I install the mediawiki app first and go under it to install LUA, or do I need to manually install everything starting with a linux base?

     

    I really don't understand enough about this stuff.

     

    Thanks.

    26 REPLIES 26

    Hi @LegacyGamers,

    Welcome to our forums. I'm not an expert in regards to your issue but hopefully, one of our other community members can chime in and help you out. 

    KayJay - GoDaddy | Community Moderator
    24/7 support available at x.co/247support

    Hi,

     

    I'm in the same boat. I first tried a manual install, thinking I had to pay a monthly fee for the GoDaddy app version. But I ran into a Lua problem after having installed Scribunto. Now I'm trying it this way, hoping for a more managed approach.

     

    Any insight would be helpful.

    Helper I

    Have any of you guys figured it out?  After a long, hard road, I finally figured out how to do it!  If you still need help, please let me know!  I keep trying to post the fix but the form messes up when I do...

     

    Helper I

    I'm going to try and post this again.  Apparently the binaries packaged with Scribunto do not work correctly, nor do the downloadable ones.  I think the problem, really, is that we have to make them executable and PuTTY, the recommended SSH program can't do it in Shell.  

     

    I didn't accept the general consensus that it can only be done on the Cloud server.  Like the path to Perl, I'm sure it had to be there.  I was able to ask "whereis lua" in Shell and found three results.  A directory which didn't have anything useful in it, a file I couldn't extract and one that "isn't a directory".  The last one seemed promising, and turns out it's our plan's path to Lua!

     

    Install the Scribunto and ParcerFunctions extension and Export and Upload a page with all the templates.  You should then have all the Modules you need.  I had to also upload the Code Editor, TitleBlacklist and Cite extensions, but the trick was changing the LocalSettings.php file's Scribunto's StandAlone Lua path.  I changed it to the second entry I had found, '/opt/lua/bin/lua' and now my infoboxes and navboxes work great!  I'm going to have to change them a little though, because it uses up my server resources to the point that I now have no choice but to upgrade.  But everything works now!

     

     

    Can you share the full path of /opt/lua/bin/lua   

     

    Here is my current path, what do I replace with the above path?  Your help would be greatly appreciated!

     

    /home/resaleconcepts/public_html/artglass/glassipedia/extensions/Scribunto/engines/LuaStandalone/binaries/lua5_1_5_linux_64_generic/lua

    Hi Kevin!  That path is actually the full path to LUA.  Here's that section from my LocalSettings.php page:

     

    require_once "$IP/extensions/Scribunto/Scribunto.php";
    $wgScribuntoDefaultEngine = 'luastandalone';
    $wgScribuntoEngineConf['luastandalone']['luaPath'] = '/opt/lua/bin/lua';

    Hope that helps!  Please let me know if you have any problems!

    Thanks so much for your help!  I actually tried that earlier, when I change to that path, I get a page isn't working screen that says

     

    www.resalemakeover.com is currently unable to handle this request.

    HTTP ERROR 500
     
    any other path i get either a break at signal 11 or 126.  once i got a 2 but a memory adjustment didnt' help. Any ideas on this?
     
    wfLoadExtension( 'ParserFunctions' );
    wfLoadExtension( 'Cite' );
    wfLoadExtension( 'CiteThisPage' );
    wfLoadExtension( 'TitleBlacklist' );
    wfLoadExtension( 'WikiEditor' );
    wfLoadExtension( 'SyntaxHighlight_GeSHi' );

    $wgPFEnableStringFunctions = true;
    $wgDefaultUserOptions['usebetatoolbar'] = 1;
    $wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;
    $wgDefaultUserOptions['wikieditor-preview'] = 1;
    $wgDefaultUserOptions['wikieditor-publish'] = 1;
    require_once "$IP/extensions/Scribunto/Scribunto.php";
    $wgScribuntoDefaultEngine = 'luastandalone';
    $wgScribuntoEngineConf['luastandalone']['luaPath'] = '/opt/lua/bin/lua';
    $wgScribuntoUseGeSHi = true;
    $wgUseInstantCommons = true;

    Hi Kevin!  Great job so far.  Yes, I experienced all of those errors (and many more!) and they are not fun!  Especially when you can't find anything online.  My journey was trial and error.  But you're definitely on the right track and I'll help you any way I can.  Your coding looks good but on the Scribunto require_once line I noticed I forgot to compensate for your directory structure.  Change that line to the following and let me know what happens!

     

    require_once "$IP/artglass/glassipedia/extensions/Scribunto/Scribunto.php";

    I'm checking out your wiki now.  Good job.  You're definitely on the right track.  The

    Cite error: Invalid <references> tag; parameter "group" is allowed only.
    Use <references />, or <references group="..." />" 

    error is an easy fix.  Rather than linking you to a long explanation to my findings, I just went ahead, created an account, and fixed the code.  The problem was in the coding on the Reflist template.  Your references sections now work!  (You might have to do a "dry refresh" on each page, ie, clicking edit and then clicking save without editing anything - it'll force a refresh on the page.  You can update the entire site by running the update script in Shell/SSH.)

    Thank you SO MUCH! This is super helpful.

     

    So, I'm still getting the

     

     Lua error: Internal error: The interpreter has terminated with signal "11".Lua error: Internal error: The interpreter has terminated with signal "11".

     

    as the code stands from before we started talking. When I put in the 

     

    $wgScribuntoEngineConf['luastandalone']['luaPath'] = '/opt/lua/bin/lua';

     

    I get the 500 error when I try to load the page http://resalemakeover.com/artglass/glassipedia

     

    So I've found options for that breaks at signal 126, 11, 2 and now the 500 error.  any ideas?

     

    I went ahead and put back in the lua path /opt/lua/bin/lua; so you can see what it is doing.

     

    require_once "$IP/skins/Vector/Vector.php";

    wfLoadExtension( 'ParserFunctions' );
    wfLoadExtension( 'Cite' );
    wfLoadExtension( 'CiteThisPage' );
    wfLoadExtension( 'TitleBlacklist' );
    wfLoadExtension( 'WikiEditor' );
    wfLoadExtension( 'SyntaxHighlight_GeSHi' );

     


    $wgDefaultUserOptions['usebetatoolbar'] = 1;
    $wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;
    $wgDefaultUserOptions['wikieditor-preview'] = 1;
    $wgDefaultUserOptions['wikieditor-publish'] = 1;


    require_once "$IP/artglass/glassipedia/extensions/Scribunto/Scribunto.php";
    $wgScribuntoDefaultEngine = 'luastandalone';

    $wgScribuntoEngineConf['luastandalone']['luaPath'] = '/opt/lua/bin/lua';


    $wgScribuntoUseGeSHi = true;


    $wgUseInstantCommons = true;

     

    Also, when I added the full path $IP/artglass/glassipedia/extensions/Scribunto/Scribunto.php on the require once line, it also gives me a 500 error. When change it to $IP/extensions/Scribunto/Scribunto.php path the wiki works, it just still gets the break at signal 11. I don't know if there is some relationship between these 2 issues. 

     

    Kevin

    I think I'm getting closer with:

     


    require_once "$IP/extensions/Scribunto/Scribunto.php";
    $wgScribuntoDefaultEngine = 'luastandalone';

    $wgScribuntoEngineConf['luastandalone']['luaPath'] = '/opt/lua/bin/lua';

    $wgScribuntoEngineConf['luastandalone']['memoryLimit'] = 209715200; # bytes
    $wgMaxShellMemory = 204800; # in KB

    $wgScribuntoUseGeSHi = true;


    $wgUseInstantCommons = true;

     

    added the memory limits and now the front page and special pages are working perfectly, but when I go to a page I get a 500 error. 

    I backed all the way out to basic localsettings without scribunto so I can work on content. let me know what I can try next. You have been a great help!

     

    There's a problem with the Syntax Highlighter.  Keep the $wgScribuntoEngineConf['luastandalone']['luaPath'] = '/opt/lua/bin/lua'; script.  It'll give you an error 500.  This can be fixed by changing $wgScribuntoUseGeSHi = true; to false.

     

    I didn't think about it at the time.  That's why mine's set to false.  I also have the following setting denoted.

     

    $wgMaxShellFileSize = "524288"; // Kilobytes
    $wgMaxShellMemory = "1048576"; // Kilobytes
    $wgMaxShellTime = 75; // seconds

     

    Let me know if this helps!  Again, great job!

    Also, I noticed right now that certain pages are saying things like {{#invoke:Infobox}], {{#invoke:Check for unknown parameters}}, etc.  These items will not work until you also copy over the "Module" to be invoked.  Infobox in the former, Check for unknown parameters in the latter.  These are LUA modules.  They can be found here:  https://en.wikipedia.org/wiki/Module:Infobox and here:  https://en.wikipedia.org/wiki/Module:Check_for_unknown_parameters .  If you see any more {{#invoke:}} tags, it means nothing's being invoked and so you must download the module listed immediately after invoke:  Hope everything works great for you!

    Holy Moly!! I think that may have gotten it! Amazing... I was almost to the point of giving up.

    What is your wiki, I'd like to look at it if you don't mind just to see a good example.

     

    I am so happy you got it! In fact, before I read your message I had just got finished checking out your wiki again. Imagine my surprise when I saw your infoboxes and navboxes working! Super cool! To get them to look like Wikipedia's you now have to style them with CSS. Copy everything from https://en.wikipedia.org/wiki/MediaWiki:Common.css to your page, http://www.resalemakeover.com/artglass/glassipedia/MediaWiki:Common.css.

    My wiki? You can find it at http://www.TRUMPipedia.com. In fact I just hit 184,500 registered users earlier today! I have a smaller one I'm working on for another site, but as of right now, TRUMPipedia is keeping me pretty busy. You can also find me on Wikia as "Adamantoise" and on Wikipedia as "BTTFVGO".

    If you have anymore questions, and I'm sure you will, PLEASE let me know! Again, great job!

    One more thing and I'll quit bugging you. 

     

    I think I've pulled in everything, but my infoboxes aren't displaying correctly.

    see http://resalemakeover.com/artglass/glassipedia/Fenton_Art_Glass_Company

     

    I think I'm close if I can get those displaying properly.

     


     


     

    The answer to this is found in my reply above. But you got it. They started working (and looking!) great as soon as you imported Common.css. There are other minor things, like if you use coordinates you must copy the contents of https://en.wikipedia.org/wiki/MediaWiki:Monobook.css as it contains minor fixes. You'll also need to up the upload limit and add extensions to your supported extensions list if you want to be able to upload .svg, .tiff, .mp3, .webm, etc. files. The hard part's over! Now it's about fun stuff like adding site notifications, multiple language options, chat, etc., etc.! There's a lot to do but I'll be here if you have any questions. Congratulations and good luck!!

    More observations:

    On the Tiffany & Co. page, notice the content and infobox blend together. This is an HTML rendering issue. Adding the following to LocalSettings.php will solve that problem:

    $wgRawHtml = true;
    $wgUseTidy = true;
    $wgUseAjax = true;

    Looking over my LocalSettings.php page, here are some notes on the basics that might help.

    To enable uploads: (make the 'images' directory writable - CHMOD 777) and then add the following to LocalSettings.php:

    $wgEnableUploads = true;
    $wgUseImageMagick = true;
    $wgImageMagickConvertCommand = "/usr/bin/convert";

    ImageMagick allows the server to create thumbnails.

     

    To change the type of files you allow to be uploaded, change $wgFileExtensions by adding the extensions to wish to allow:

    $wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'doc',
    'xls', 'mpp', 'pdf', 'ppt', 'tiff', 'bmp', 'docx', 'xlsx',
    'pptx', 'ps', 'odt', 'ods', 'odp', 'odg', 'svg', 'webm'
    );
    $wgFileExtensions[] = 'svg';
    $wgAllowTitlesInSVG = true;
    $wgSVGConverter = 'ImageMagick';

    To enable embedded videos, install the "EmbedVideo" extension and add the following:

    wfLoadExtension( 'EmbedVideo' );
    $wgEmbedVideoAddFileExtensions = true;
    $wgEmbedVideoEnableVideoHandler = true;
    $wgEmbedVideoEnableAudioHandler = true;

    To eliminate template loops and 'too many expensive parser call' errors, add the following:

    $wgExpensiveParserFunctionLimit = '500';
    $wgAllowSlowParserFunctions = true;
    $wgMaxTemplateDepth = '80';

    To create longer articles, add:

    $wgMaxArticleSize = '2147483647';

    ...and images:

    $wgUploadSizeWarning = 2147483647;
    $wgMaxUploadSize = 2147483647;
    $wgMaxImageArea = 10e7; // 100MP
    $wgMaxAnimatedGifArea = 10e7; // 100MP

    To allow .tiff uploads, add the PagedTiffHandler extension and the following to LocalSettings.php:

    $wgTiffUseTiffinfo = true;
    $wgTiffMaxMetaSize = 1048576;

    To enable notifications and VisualEditor, you'll have to install the 'Echo' and 'VisualEditor' extensions, respecively, but those extensions require more detailed installation instructions. I'll answer any question you have about those assuming you ever decide to use them.

     

    There are so many other things you can do. For a list of everything I have installed on my own wiki, check out http://www.trumpipedia.com/Special:Version. You can view your own list (or any MediaWiki wiki's list) by going to the page Special:Version.

    For example, http://resalemakeover.com/artglass/glassipedia/Special:Version and https://en.wikipedia.org/wiki/Special:Version

     

    Another thing about getting file uploads to work. You will have to create the page (if you don't have one already) called "php.ini" in the /artglass/glassipedia directory. In it, add the following:

    file_uploads = On
    php_value upload_max_filesize 50M
    php_value post_max_size 50M
    memory_limit 512M;
    php_flag register_globals off
    session.use_trans_sid off

    ...to enable 50 Mb uploads, memory limit usages, and global variables - ie when you link your wiki to all other wikis in the network via CentralAuth (which I, personally, don't use hence the reason it's turned off).

     

    Then create the page ".htaccess" in the same directory. You'll need to enable hidden files in order to see it. Add

    SetEnv MAGICK_THREAD_LIMIT 1

    to help with the ImageMagick thumbnailing process and

    <Files php.ini>
    order allow,deny
    deny from all
    </Files>

    to keep people from being able to view your "php.ini" file.

     

    There are SO MANY things I could tell you. Honestly, I could write a novel about my findings. But those are the basics and are things that should be done. Everything else is just icing on the cake. I'm so happy I was able to help and if you have ANY more questions or concerns, please let me know!!

    One more thing, Templates must be in the Templates namespace in order for them to work.  You can view all of the pages on your wiki by going to

    http://resalemakeover.com/artglass/glassipedia/Special:AllPages 

     

    The following templates are in your (Main) namespace.  There they do nothing but confuse visitors who click "Random Page" in the left sidebar and find one of these instead of some cool article on glassware and glassmaking.  Most of them are already in your Template namespace because they were placed there when you imported a page they were included on.  You should move them if they don't exist and delete them if they do.  To move a page, click "More" in the link bar to the left of the search bar.  Select "Move" and from the dropdown box change (Main) to Template.

    Ambox
    Catalog lookup link
    Category handler
    Citation needed
    Cite book
    Cite web
    Colbegin
    Colend
    Column-count
    Commons
    Commons category
    Convert
    Delink
    Div col
    Div col end
    Error-small
    Fix
    Fix/category
    ISBN
    Main
    Main other
    Navbox
    Reflist
    See-also
    See also
    Tl
    Trim
    Yesno
    Yesno-no