Windows 10
MediaWiki 1.34.1
PHP 7.4.3 (apache2handler)
MariaDB 10.4.11-MariaDB
ParserFunctions 1.6.0
ParserHooks 1.6.1
SMW version: 3.1.5
Hello!
I have set MediaWiki on my computer and semantic extension. I have used Composer for setup SMW.
Into the LocalSettting.php I have writted enableSemantics( ); (local wiki).
I also have run MediaWiki's maintenance script update.php and it have completed without problem.
When I try run in shell SMW's maintenance script setupStore.php I see following message: '''You need to have SMW enabled in order to run the maintenance script!'''
When I run my Wiki I seeing:
Error 禄 Semantic MediaWiki
Semantic MediaWiki was installed and enabled but is missing an appropriate upgrade key.
Release
SMW_VERSION (smw:2019-09-23)
What is the problem? What I should do?
Thanks.
See https://www.semantic-mediawiki.org/wiki/Help:Compatibility
Did you put the wfLoadExtension() snippet in your LocalSettings?
I suspect that the default location where Semantic MediaWiki writes the ".smw.json" file which takes the upgrade key after having completed the database setup is not writable on you machine. Actually you should have seen some error message after the script run.
Anyhow try to set the location to a writable directory with configuration parameter $smwgConfigFileDir. I myself usually do the following setting: $smwgConfigFileDir = $IP;
See https://www.semantic-mediawiki.org/wiki/Help:Compatibility
Indeed, neither published versions of MediaWiki nor Semantic MediaWiki are fully ready for PHP 7.4 yet. However this should not be the cause of the issue here.
Not sure how things went from here. Another note that my help:
MW as well as SMW rely on a PHP that uses the correct version on the cli environment. In the past there were issues with hosters providing different versions for web and cli environment causing a similar issue.
Appears that the troubled waters were left.
I try run in shell SMW's maintenance script setupStore.php I see following message: '''You need to have SMW enabled in order to run the maintenance script!'''
Yes, setupStore.php checks whether the CLI is active or not and disables the setup check during the execution.
Receiving "Semantic MediaWiki was installed and enabled but is missing ..." as message during the run of setupStore.php hints to an issue of the CLI [0, 1] not being correctly setup for PHP (we are relying on PHP_SAPI to be either cli or phpdbg).
[0] https://stackoverflow.com/questions/10886539/why-does-php-sapi-not-equal-cli-when-called-from-a-cron-job
[1] https://electrictoolbox.com/determine-php-run-via-http-or-cli/
I have added this problem to the troubleshooting collection.
Most helpful comment
Yes,
setupStore.phpchecks whether the CLI is active or not and disables the setup check during the execution.Receiving "Semantic MediaWiki was installed and enabled but is missing ..." as message during the run of
setupStore.phphints to an issue of the CLI [0, 1] not being correctly setup for PHP (we are relying onPHP_SAPIto be eithercliorphpdbg).[0] https://stackoverflow.com/questions/10886539/why-does-php-sapi-not-equal-cli-when-called-from-a-cron-job
[1] https://electrictoolbox.com/determine-php-run-via-http-or-cli/