Topic on Project:Support desk

Issues upgrading from MW 1.25.1 to 1.27.1

10
Summary by Star Warden

Solved in another topic

Star Warden (talkcontribs)

Hey, everyone. I tried upgrading from 1.25.1 to 1.27.1. The first version was downloaded manually from mediawiki, thus I cloned the second one through git, so I can use 'checkout' for upgrading to future versions. I used </nowiki>git clone -b REL1_27 https://gerrit.wikimedia.org/r/mediawiki/core temp</nowiki> to clone the new version into a folder called 'temp', then I installed composer using the instructions here. Then I copied the images, extensions and skins folders from the old mw folder to the new one using cp -r ../dml-wiki/(name of folder, i.e. images, extensions or skins)/* (same name of folder)/. Lastly, I copied localsettings.pnp, favico and the logos. Then I ran php update.php and got this error [6c3190bdbe6ec58d15994cb1] 2016-09-28 11:46:09: Fatal exception of type MWException. I ran the webupdater, too, just in case, but same thing. Then I remembered to set $wgShowExceptionDetails to true and I got these lines:

[8c06da68ab42fa4f454f93f8] /Special:RecentChanges MWException from line 108 of /srv/dml-wiki/includes/cache/localisation/LCStoreCDB.php: Unable to open CDB file for write "/srv/dml-wiki/cache/l10n_cache-en.cdb"

Backtrace:

  1. 0 /srv/dml-wiki/includes/cache/localisation/LocalisationCache.php(1014): LCStoreCDB->startWrite(string)
  1. 1 /srv/dml-wiki/includes/cache/localisation/LocalisationCache.php(462): LocalisationCache->recache(string)
  1. 2 /srv/dml-wiki/includes/cache/localisation/LocalisationCache.php(336): LocalisationCache->initLanguage(string)
  1. 3 /srv/dml-wiki/includes/cache/localisation/LocalisationCache.php(273): LocalisationCache->loadItem(string, string)
  1. 4 /srv/dml-wiki/languages/Language.php(464): LocalisationCache->getItem(string, string)
  1. 5 /srv/dml-wiki/includes/search/SearchEngineConfig.php(42): Language->getNamespaces()
  1. 6 /srv/dml-wiki/includes/user/User.php(1530): SearchEngineConfig->searchableNamespaces()
  1. 7 /srv/dml-wiki/includes/user/User.php(5049): User::getDefaultOptions()
  1. 8 /srv/dml-wiki/includes/user/User.php(528): User->loadOptions()
  1. 9 /srv/dml-wiki/includes/user/User.php(444): User->saveToCache()
  1. 10 /srv/dml-wiki/includes/user/User.php(405): User->loadFromId(integer)
  1. 11 /srv/dml-wiki/includes/session/UserInfo.php(88): User->load()
  1. 12 /srv/dml-wiki/includes/session/CookieSessionProvider.php(119): MediaWiki\Session\UserInfo::newFromId(string)
  1. 13 /srv/dml-wiki/includes/session/SessionManager.php(479): MediaWiki\Session\CookieSessionProvider->provideSessionInfo(WebRequest)
  1. 14 /srv/dml-wiki/includes/session/SessionManager.php(182): MediaWiki\Session\SessionManager->getSessionInfoForRequest(WebRequest)
  1. 15 /srv/dml-wiki/includes/WebRequest.php(700): MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)
  1. 16 /srv/dml-wiki/includes/session/SessionManager.php(121): WebRequest->getSession()
  1. 17 /srv/dml-wiki/includes/Setup.php(747): MediaWiki\Session\SessionManager::getGlobalSession()
  1. 18 /srv/dml-wiki/includes/WebStart.php(137): require_once(string)
  1. 19 /srv/dml-wiki/index.php(40): require(string)
  1. 20 {main}

I have absolutely no idea how to fix them. Please advise me as to what I should do.

87.123.19.142 (talkcontribs)

This might be a permission problem. Define a cache folder in Manual:$wgCacheDirectory and make sure that the webserver user is allowed to read and write files inside the cache folder!

Star Warden (talkcontribs)

I will try that. I forgot to mention that there is a phpmyadmin folder shortcut in the old mw version. The actual folder is in /usr/share/phpmyadmin. Should I make a shortcut of it in the new version, as well or does it have nothing to do with it?

87.123.19.142 (talkcontribs)

This shortcut does not come from MediaWiki. It has nothing to do with it and it is not needed.

(And I would not even be sure, that it would be safe to have such a redirect there. I would leave it away.)

Star Warden (talkcontribs)

So, I used chown -R www-data:www-data to make the entire folder writable and now the wiki loaded! But, there is a very odd issue. The wiki can be navigated as long as you're not logged in. If you're logged in or if you try to log in, you'll get this error: http://prnt.sc/cni24y. And there's no way you can log out if you were already logged in before the issue occured, thus forcing you to browse on incognito. Also, once you attempted to log in, even on incognito, you would have to restart the browser, otherwise the issue persisted. Oddly enough, when I tried to log in, it wouldn't let me, saying the password doesn't match and it would take me to a screen where I had to change my password or that I could 'skip'. I chose skip, then the issue occured. I asked another user to do the same thing, but they didn't get the 'password doesn't match screen', but, instead, the page loaded, but they were hit by the issue. I am not sure if it's because my account has bureaucrat powers and they have a regular account. Regardless of that, the wiki cannot be navigated if you're logged in or you attempt to log in and 'succeed'. Also, setting $wgShowExceptionDetails to true didn't help either (I didn't get anything displayed). I even ran update.php and rebuildFileCache.php and still no luck.

87.123.19.142 (talkcontribs)

You are getting a server error 500. Look into the server error log to get more information about what is going wrong!

Star Warden (talkcontribs)

I forgot to say that, when I ran rebuildFileCache in the shell, I got this: http://prnt.sc/cnicpx

Not sure if it's something that helps or even matters.

Star Warden (talkcontribs)

All right, I have no idea if I am doing something wrong, but I accessed (downloaded) the error log from /var/log/nginx/error.log and the last logged entry was four hours ago. But I got the error two hours ago. Then I ran tail /var/log/nginx/error.log and tail /var/log/nginx/error.log.1, thinking it would pull something more recent, and both show the same entry in the shell. Or, maybe, I am not accessing the right server log? In which case I don't know where to find it and google isn't very helpful, either.

Star Warden (talkcontribs)

Anyone, anything?

Jörgi123 (talkcontribs)

Nice to hear that you could get this matter settled!