Category: Web

MediaWiki composer extensions

MediaWiki composer extensions

With certain extensions using MediaWiki you may need to use composer. Two examples are Semantic Compound Queries and Maps. This example is using Windows Server 2012 R2 running WAMPserver. Obviously you will need to have composer installed in the PHP version you are using.

To install this using composer open the compose.json in the root of the Wiki:

You will see a lot of code like this:

Find the line:

“mediawiki/semantic-media-wiki”: “~2.5”

In the example for Semantic Compound Queries the extension page tells you to add the code:

{
    "require": {
        "mediawiki/semantic-compound-queries": "~1.1"
    }
}

But in reality, we are only interested adding

“mediawiki/semantic-compound-queries”: “~1.1”

Add this line above the Semantic MediaWiki line:

“mediawiki/semantic-compound-queries”: “~1.1”,

Note, we now have a comma on the end of the line, this is key:

Save and close the composer.json file.

If you have already been running commands in the command prompt, and crucially if you have set the path anywhere, close the command prompt and reopen it.

Change the directory to the root of your Wiki and run:

composer update

Then run:

composer require mediawiki/semantic-compound-queries:~1.1

Obviously replace the semantic compound queries as detailed on the extensions page on MediaWiki.

Install Semantic MediaWiki on a Windows Machine

Install Semantic MediaWiki on a Windows Machine

You can find instructions on Semantic MediaWiki site on how to install on Windows, but it is advised that Semantic MediaWiki is not supported for Windows environments. It also misses a few areas that need to be included to ensure it installs. This is how I did it:

Ensure you have composer installed and it is in the PHP version you are using.

Remove or comment out any Semantic MediaWiki lines in the LocalSettings.php

Add the line:

enableSemantics(‘localhost/wiki’); /**adjust to yours*/

Open the command prompt, change the directory to the root of your wiki and run:

composer update:

Next run:

composer require mediawiki/semantic-media-wiki “~2.5”

Verify it has installed by going to the Version page:

Job done, on the off chance things don’t go to plan, change the directory to the maintenance folder. With Windows you will need to set the path to the PHP version by running:

set path=path/to/PHP/install

Then run:

php update.php –skip-external-dependencies

Job done.

To make Semantic MediaWiki more useful you may want to install other extensions to work with it, the five I use are:

  • Page Forms
  • Semantic Compound Queries
  • Semantic Drilldown
  • Semantic Internal Objects
  • Maps

Page Forms, Semantic Drilldown and Semantic Internal objects are fairly straight forward to install, just follow the guidance on the extension page. But Semantic Compound Queries and Maps are a little more complex. They both require the use of composer.

See the MediaWiki composer extensions for more details.

Install MediaWiki

Install MediaWiki

So, I was asked to install MediaWiki on a Windows Server 2012 R2. This example shows you to install when using the server with a GUI.

You can transfer the files using your control panel if you don’t have a GUI, and in theory it should also work the same with a Linux

Read More Read More

Orange or Red on WAMP installation

Orange or Red on WAMP installation

So, for work I was provided with a Windows Server. To run the scripts I wanted I had to install WAMP. I did this on my own personal server initially for testing purposes.

But I had a small issue, it came with the error where the WAMP sign refused to change from Red or Orange to Green as it should, I was stuck with:

So what did I do to fix this? I hear you cry (sorry, couldn’t resist).

Read More Read More

Installing WordPress

Installing WordPress

I used to be a Joomla! type of person. That was until 2014 when things kept breaking and simply not working. I started using WordPress instead when a company I worked for decided to switch from Joomla! to WordPress. This was really the first experience I had with WordPress, since I have primarily used WordPress with the occasions of using other systems such as MediaWiki, depends what work at the time I have on and what system is required.

To install WordPress, there are two ways of doing this, the easy way, and the hard way (but not that hard). I will go into more detail on the hard way soon, but first I will touch on the easy way.

Easy Install of WordPress

Read More Read More

Install LAMP on Fedora

Install LAMP on Fedora

dnf install mariadb-serverdnf install mariadb-serverSo, I have a old MacBook lying around, the hard drive had died, literally, couldn’t even boot it.

So I got myself a 500GB hard drive and stuck it in it. I initially tried to install Linux Mint on it, but later thought I would stick Fedora on it.

I wanted to be able to build sites, offline so needed a localhost.

To do this I followed the following directions…

Read More Read More

Notice for AdBlock users

Please support this website by adding us to your whitelist in your ad blocker.

Ad-revenue is vital for the upkeep of this site, expenses incurred include time to manage the site, hosting and domain name. You can also support this site by donating and/or registering for goPro.

With goPro you will not see any ads.

Your assistance is appreciated.

Gary