Help:Installation

From semantic-mediawiki.org
Jump to: navigation, search
Installation
This page describes how to how install Semantic MediaWiki.
Image / Video collection
Further Information
Installation type:
"N/A" is not in the list of possible values (new, upgrade, update) for this property.
Installation method: N/A
Table of Contents

The recommended way for installing Semantic MediaWiki is by using Composer but if you cannot use Composer for installation and upgrading, you have the option to install the file release as described on this help page.

  • There is also a help page on how to install on a Windows-based server.
  • Please always check the exact requirements and follow the instructions carefully. Make sure you understand the legal disclaimer in the file COPYING before proceeding.
  • To upgrade a wiki running an older version of SMW, be sure to read the relevant section before starting the upgrade.
  • Note Note: The instructions on this page to install and update Semantic MediaWiki do not apply to the Semantic Bundle which also uses Semantic MediaWiki. See the help page on the Semantic Bundle for how to do this.
  • Note Note: If you are using MediaWiki 1.23 and higher and/or PHP 5.4 and higher you are strongly encouraged to install or to update to Semantic MediaWiki 2.0 or higher. Semantic MediaWiki 1.9 and lower is discouraged for productive use with these versions.

General notes

  • Semantic MediaWiki has dependencies that will be made available during the installation.
  • Individual extensions to Semantic MediaWiki, e.g. Semantic Result Formats may have different requirements.
  • Individual extensions to Semantic MediaWiki may not be compatible with this release (yet). Please see those extensions' documentation pages, or contact the respective developers, for further information.
  • SMW uses the PHP mb_*() multibyte functions such as mb_strpos in the php_mbstring.dll extension. This is standard but not enabled by default on some distributions of PHP. See the PHP manual for details.
  • For installation and upgrade, SMW needs the rights to create new tables (CREATE) and to alter tables (ALTER TABLE). You can remove both rights after SMW is set up. The script "setupStore.php" can use the DB credentials from "LocalSettings.php" for this purpose, avoiding the need of extra rights for the wiki DB user.
  • When using the SQL backend (the default data store for SMW), SMW creates and alters temporary tables for certain semantic queries. To do this, the wiki's database user account must have privileges for CREATE TEMPORARY TABLES and DROP. If you don't wish to allow such privileges, you can disable these specific query features by adding the following to "LocalSettings.php":
$smwgQSubcategoryDepth = 0;
$smwgQPropertyDepth    = 0;
$smwgQFeatures         = SMW_ANY_QUERY & ~SMW_DISJUNCTION_QUERY;
$smwgQConceptFeatures  = SMW_ANY_QUERY & ~SMW_DISJUNCTION_QUERY & ~SMW_CONCEPT_QUERY;


  • When using a SPARQL backend, SMW uses the CURL functions of PHP. These functions may have to be enabled/installed to be available.
  • Some information about SMW and cache settings can be found here
  • Information about SMW and the Help:JobQueue

Requirements

Compatibility information and minimum requirements for Semantic MediaWiki are listed in the document on compatibility. Please make sure that you meet them prior to installing Semantic MediaWiki.

Installation

Please select the most appropriate installation instruction for your environment.

Help pageShort descriptionInstallation typeInstallation method
Installation/Using Tarball (without shell access)This page describes how to install SMW where no shell access is available by using a Tarball source.newTarball download
Installation/Using Composer with MediaWiki 1.22-This pages describes the installation using non-native Composer support for MediaWiki 1.19.x to 1.21.x.newComposer
Installation/Using Composer with MediaWiki 1.22+This pages describes the installation using the native Composer support for MediaWiki 1.22+newComposer
Installation/Upgrade from ≤ SMW 1.7.xThis pages describes the upgrade proposal for ≤ SMW 1.7.x.upgradeN/A
Installation/Upgrade from SMW 1.8.xThis pages describes the upgrade procedure for SMW 1.8.x.upgradeN/A
Installation/Upgrade from SMW 1.9.x or 2.0 for MW 1.22-Upgrading from SMW 1.9.x or 2.0 (MW 1.19+ / non-native Composer support).upgradeComposer
Installation/Upgrade from SMW 1.9.x or 2.0 for MW 1.22+This page describes the upgrade procedure from SMW 1.9.x or 2.0 (MW 1.22+ / native Composer support).upgradeComposer

Troubleshooting

After the upgrade of an existing SMW installation the following messages can occur which solely depend on the configuration of the "LocalSettings.php" file:

Warning: Class '…' not found in …
This kind of message appears if the Validator extension is still explicitly invoked. To resolve this the following line has to be removed:
require_once "$IP/extensions/Validator/Validator.php";
Notice: Use of undefined constant …
This kind of message appears because SMW namespace constants (SMW_NS_PROPERTY, SMW_NS_TYPE and SMW_NS_CONCEPT) are delayed due to the parameter $smwgNamespaceIndex being a prerequisite and its initialization has to happen first it can be processed. To resolve this you have to add
enableSemantics( 'example.org' );
prior to any parameter (e.g. $wgContentNamespaces, $wgNamespacesToBeSearchedDefault and $wgNamespaceProtection) making reference to these namespace constants. In case you choose to manually set $smwgNamespaceIndex to something other than the default value of 102, you must do this above the enableSemantics() call.
Fatal: Call to undefined function enableSemantics() …
This kind of message appears for MW ≤ 1.21.x if the Extension Installer extension is included after the call to enableSemantics() (see above). Make sure that the call to include Extension Installer comes first.


After updating an existing SMW 1.9.0 installation the following messages may occur:

Database error: A database query error has occurred. This may indicate a bug in the software.
This error appears after an upgrade from SWM 1.9.0 to 1.9.1 when moving a page and if you have not updated the semantic store. To resolve this run the setup script from the base directory[1] of your MediaWiki installation:
php maintenance/update.php

References

  1. This is the directory which contains the "LocalSettings.php" file.


This documentation page applies to all SMW versions from 2.0 to the most current version.
Other versions: 1.9.0 – 1.9.21.8.0 – 1.8.01.7.1 – 1.7.1[…]       Other languages: fr

Help:Installation en 2.0