Discuss Installation with shell access using Composer (MediaWiki 1.25+)

From semantic-mediawiki.org

Contents

Thread titleRepliesLast modified
Setup instructions incomplet?022:17, 10 March 2019
enableSemantics() and port220:41, 21 July 2016
Clarify about "initialization script"222:51, 3 June 2016
installation variation; composer variation118:48, 23 September 2015
enableSemantics()210:15, 25 June 2015

Setup instructions incomplet?

I went about the instructions just as they are described here, but I got to an error, asking me to run the setupStore.php, which I did.

Things look fine now, but I wonder if there is something wrong with my installation, or if instructions are incomplete.

Thanks.

22:17, 10 March 2019

enableSemantics() and port

My wiki has address 'http://www.example.org:8080'. What should I specify in the parameter?

21:33, 19 July 2016

If I am not mistaken enableSemantics() also serves as an unambiguous identifier for the wiki providing data, so enableSemantics( 'www.example.org:8080' ) should work.

09:03, 20 July 2016

Thanks!

20:41, 21 July 2016
 
 

Clarify about "initialization script"

Hi, It is not clear to me what the "initialization script", in the mediawiki basefolder is. I'm trying to get my head around that now, but thought it might be helpful to clarify that either way?

21:59, 3 June 2016

Never mind ... finally realized it is just referring to the commands just below the text ... guess I'm tired after a long day :")

22:02, 3 June 2016

Well, it was a slightly unclear, also there was a duplicated part of the sentence which I just removed. Since MW 1.25 I just handcrafted "composer.local.json" files to avoid having to fiddle with "composer.json" on every update.

22:51, 3 June 2016
 
 

installation variation; composer variation

I was not able to install using:

php composer.phar require mediawiki/semantic-media-wiki "~2.1" --update-no-dev

However, I was successful @ installing with the following command:

composer require mediawiki/semantic-media-wiki "~2.1" --update-no-dev

NB: this install was on a Dreamhost VPS

Hope this helps someone,

18:33, 23 September 2015

Thanks for pointing this out. Documented is the method if Composer is installed only locally. The variation you stated is if Composer is installed globally, which is preferable anyway. It surely will help others.

18:48, 23 September 2015
 

enableSemantics()

Hi,

Starting with smw I installed the latest proposed.

Sadly I'm still unable to finish properly the installation. To point °4

Add a call to enableSemantics() to the end of the "LocalSettings.php" file. enableSemantics() takes in the domain name of the wiki

both:

 include_once("$IP/extensions/SemanticMediaWiki/SemanticMediaWiki.php");
 enableSemantics('localhost');

or just (as "The calls require_once … must neither be added for Semantic MediaWiki nor for Validator since Composer loads the extensions automatically.")

 enableSemantics('localhost');

are ineffective. The wiki isn't working with this in LocalSettings.php but work cleared from those lines.

I haven't any $smwgNamespaceIndex

I went to previous installation procedures and did not see any other instruction for this point. I checked other reference such as github or WOW - Wiki Aided Organization DraWing

the command:

 php maintenance/update.php

returns

 PHP Fatal error:  Call to undefined function enableSemantics() in /etc/mediawiki/LocalSettings.php on line 147

I found a divergent advice here on sourceforge

 enableSemantics('http://localhost';);

got the error with th ";"; then tried with:

 enableSemantics('http://localhost');

and got again

 PHP Fatal error:  Call to undefined function enableSemantics() in /etc/mediawiki/LocalSettings.php on line 147


Single occurrence of "enable Semantics" in configuration help is at:

 $smwgNamespace

ls from /mediawiki returns

 AdminSettings.php  catch_it.png   composer.lock  config      images        includes   install-utils.inc  LocalSettings.php  opensearch_desc.php  redirect.php    skins                thumb.php      vendor   api.php            composer.json  composer.phar  extensions  img_auth.php  index.php  languages          maintenance        profileinfo.php      redirect.phtml StartProfiler.php  trackback.php  wiki.phtml  

and /extensions

 README  SemanticMediaWiki  Validator 

So I suppose it is indeed installed but not enabled.

Would you please consider putting a LocalSetting.php article wihtin this wiki or on GitHub to help installation? As done for SefaultSetting of mediawiki on GitHub

Best regards --RP87 (talk) 17:15, 23 June 2015 (CEST)

17:15, 23 June 2015

> Would you please consider putting a LocalSetting.php article wihtin this wiki or on GitHub to help installation? As done for SefaultSetting of mediawiki on GitHub

?

> include_once("$IP/extensions/SemanticMediaWiki/SemanticMediaWiki.php");

This line is not required in LocalSettings for SMW.

Please have a look at the video [0] which shows a vanilla MW/SMW installation from the start to the end.

[0] https://vimeo.com/82255034

17:38, 23 June 2015

Thanks MWjames,

The problem came from a different mediawiki version (oups didn't checked that). I installed through:

 sudo apt-get install mediawiki

But the version on the repository was 1.15 and not 1.25.

The video did help as I realised this gap in version within the first few images "Download mediawiki 1.24.2". So thank you for pointing toward it. I didn't notice there was some in the "Help:Installation" page.

I take the liberty to add a "version checking " line in the steps describe. May it help those hasty and inattentive as I can sometime be.

BR

10:15, 25 June 2015