I have done a fresh installation on my local development machine of MediaWiki 1.24.2.
I have installed Scribunto and checked it is installed correctly on the list of extensions.
I'm getting an error when I try and create an InfoBox. The error is:
Lua error: Internal error: The interpreter exited with status 2
These are the steps I have taken the following steps to try and fix this.
I have been to the Mediawiki Scribunto page
I have added these lines to my LocalSettings.php file:
$wgScribuntoEngineConf['luastandalone']['memoryLimit'] = 209715200; # bytes
$wgMaxShellMemory = 204800; # in KB
This has not fixed things. I'm a but confused as to how to switch on error logging. The help page just says:
Assigning a file path to $wgScribuntoEngineConf['luastandalone']['errorFile'] and examining that output can be valuable in diagnosing memory allocation errors.
How do I assign a file path? - Solved Thanks for the help with this.
I enclose a [link][2] to my php.ini file and my LocalSettings.php file (Zipped together)
UPDATE - I have now managed to add a log file and the error in the log file is:
/var/www/extensions/Scribunto/engines/LuaStandalone/binaries/lua5_1_5_linux_32_generic/lua: Syntax error: "(" unexpected
UPDATE TWO
These are the full steps I take to replicate the error:
Start by checking for any package updates available and installing them
sudo apt-get update
sudo apt-get upgrade
Now install Apache, PHP and MySQL
sudo apt-get install apache2 -y
sudo apt-get install php5 libapache2-mod-php5 -y
sudo apt-get install mysql-server php5-mysql -y
sudo apt-get install php-apc php5-intl imagemagick
sudo apt-get install phpmyadmin
We can check the internal IP address of our Raspberry Pi with the following command (Make a note of it)
hostname -I
We can now create a database for our new MediaWIki installation. Start by logging in as root using the password you created earlier
mysql -u root -p
Here we are adding database=mediawikidb user=mediawikiuser and password=mediawikipassword:
CREATE DATABASE mediawikidb;
CREATE USER mediawikiuser@localhost IDENTIFIED BY 'mediawikipassword';
GRANT index, create, select, insert, update, delete, alter, lock tables on mediawikidb.* TO mediawikiuser@localhost;
Now we can make some changes to php.ini so we can increase the maximum file size and memory limit
cd /etc/php5/apache2/ nano php.ini
Replace 'upload_max_filesize = 2M' with 'upload_max_filesize = 64M'
Replace 'post_max_size = 8M' with 'post_max_size = 64M'
Save the file
Now we are going to empty the /var/www folder and change its ownership to pi
cd /var/www
sudo chown pi: .
sudo rm *
Now we can download MediaWiki, uncompress it and copy it into /var/www
mkdir /var/www/mediawiki
wget http://releases.wikimedia.org/mediawiki/1.24/mediawiki-1.24.2.tar.gz
tar -xvzf mediawiki-*.tar.gz
sudo mv mediawiki-*/* /var/www/
Now we can restart the relevant services
sudo service apache2 restart
sudo service mysql restart
Now open a browser and go to localhost and start the installation
To Complete Installation copy LocalSettings.php to /var/www/mediawiki
Now install Scribunto
Download from http://www.mediawiki.org/wiki/Special:ExtensionDistributor/Scribunto
tar -xzf Scribunto-REL1_24-b060fbd.tar.gz -C /var/www/mediawiki/extensions
sudo nano /etc/mediawiki/LocalSettings.php
add these lines at the end of the file and save
require_once "$IP/extensions/Scribunto/Scribunto.php";
$wgScribuntoDefaultEngine = 'luastandalone';
$wgScribuntoEngineConf['luastandalone']['memoryLimit'] = 209715200; # bytes
$wgMaxShellMemory = 204800; # in KB
$wgScribuntoEngineConf['luastandalone']['errorFile'] = '/var/tmp/luaerror.log';
chmod -R 777 /var/www/mediawiki/extentions/Scribunto/engines/LuaStandalone/
Now visit 'http://en.wikipedia.org/wiki/Special:Export' and enter Template:Infobox in the big box. Tick all three boxes and click Export
Open the file in Notepad or similar and do a find and replace text/plain with CONTENT_FORMAT_TEXT
Login to MediaWiki and go to Special:Import
Once everything has imported correctly go to the homepage and enter this at the top of the page:
{{Infobox
|title = test Infobox
|header1 = Main Heading
|header2 = First set of data
|label2 = Label
|data2 = Data
|header3 = Remove this line (optional)
|label3 = More Label
|data3 = More data
}}
Many thanks