Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup problem - missing appropriate upgrade key #4679

Closed
zhuravlevasn opened this issue Mar 30, 2020 · 8 comments
Closed

Setup problem - missing appropriate upgrade key #4679

zhuravlevasn opened this issue Mar 30, 2020 · 8 comments
Labels

Comments

@zhuravlevasn
Copy link

Setup and configuration

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.

@akuckartz
Copy link

@JeroenDeDauw
Copy link
Member

JeroenDeDauw commented Mar 30, 2020

Did you put the wfLoadExtension() snippet in your LocalSettings?

@kghbln
Copy link
Member

kghbln commented Mar 30, 2020

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;

@kghbln
Copy link
Member

kghbln commented Mar 30, 2020

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.

@kghbln kghbln changed the title Setup problem Setup problem - missing appropriate upgrade key Mar 30, 2020
@kghbln
Copy link
Member

kghbln commented Apr 3, 2020

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.

@kghbln
Copy link
Member

kghbln commented Apr 11, 2020

Appears that the troubled waters were left.

@kghbln kghbln closed this as completed Apr 11, 2020
@mwjames
Copy link
Contributor

mwjames commented Apr 11, 2020

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/

@kghbln
Copy link
Member

kghbln commented Apr 13, 2020

I have added this problem to the troubleshooting collection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants