[13:14:35] Hello, I have a question about upgrading a MediaWiki installation. Am I in the right channel? [13:28:31] I looked through yesterday's chat log and I think I have a similar problem a user yesterday was asking about. On my server control panel, I have PHP 8.0 selected but when I go to "Server Information", it says PHP 5.6.40 is running. [13:33:38] MAHADEV-J: yes, it's the right channel [13:33:46] alright, thank you [13:33:58] what is "Server Information"? [13:34:21] if you create a .php file containing " what does it print? [13:35:53] Hm, I can't seem to access it because of URL redirect settings. If I enter the URL for that file in my browser's address bar, it just takes me straight to the home page. [13:36:00] Sorry, URL rewrite* settings, I meant [13:37:10] does your wiki load? [13:39:31] Special:Version should tell you the php version that executes it [13:39:42] No. Hang on, allow me to explain. I was running MediaWiki 1.34.2, everything was running fine until I tried to import a template from Wikipedia. It wouldn't import apparently because it uses a new version of Scribunto. I tried to upgrade Scribunto, but it requires a new version of MediaWiki too. So I tried to upgrade first to MediaWiki 1.35 and [13:39:43] then to 1.39, but all I get now is a blank pages. [13:40:04] I should add that on my server, I originally installed MediaWiki using Softaculous, but I tried to upgrade it manually because Softaculous won't let me do it. [13:41:13] those blank pages are (more or less) expected if you are trying to use a modern mediawiki with an old version of PHP [13:41:24] (I thought it would give a nicer error message, though) [13:41:36] Yes, that's what I figured. So I think the problem must be that it's running the old version of PHP instead of the new one [13:41:48] it could be [13:41:48] ah, I think I have the error messages turned off in LocalSettings.php [13:42:08] Hang on, I'm in touch with my hosting provider to see if they can help me change the PHP version. It should have PHP 8.0 [13:42:11] the phpinfo(); would provide full information on the php version [13:43:08] Hang on, I'll add phpinfo(); to the home page [13:44:40] Okay I did that and apparently it IS running PHP 8.0. So that can't be the problem. [13:49:17] hmm [13:49:28] and mediawiki is version 1.39 ? [13:49:47] did you run update.php (or rerun the installer) after the upgrade? [13:51:11] No. I don't know how to run a command line on this server. It has some kind of option for ssh, but I don't know how to get it working. [13:51:33] I installed MediaWiki version 1.35 first and then 1.39, both times without running update.php. [13:52:14] visit the installer page [13:52:27] you mean this https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki ? [13:52:34] after you upgrade mediawiki it will need to update the databas [13:52:57] ahh, I think that must be it [13:54:26] https://www.mediawiki.org/wiki/Manual:Upgrading is only briefly mentioning it [13:54:53] but instead of update.php it is possible to use the installer page to get it apply the db updates what update.php normally does [13:55:42] it will ask for a password in order to run in an already-installed wiki [13:56:07] Yes, but it is telling me to go to /mw-config/ in the directory where my MediaWiki is installed. But when I do that, I get an error page. [13:56:23] what does it say? [13:56:28] MediaWiki internal error. [13:56:28] Original exception: [136389137fe5ef413c06427c] 2023-01-07 13:54:02: Fatal exception of type "Wikimedia\Rdbms\DBQueryError" [13:56:29] Exception caught inside exception handler. [13:56:29] Set $wgShowExceptionDetails = true; at the bottom of LocalSettings.php to show detailed debugging information. [13:57:20] the installer is failing? [13:57:43] comment the extensions you may have enabled in your LocalSettings.php [13:57:55] let's try to make core mediawiki work first [13:57:59] Okay, I'll try that, good idea [14:00:53] I commented all the lines in LocalSettings.php that started with wfLoadExtension(, but I'm still getting the same error. [14:01:44] By the way, when I set PHP version to 7.1, I get an error message saying "MediaWiki 1.39 requires PHP 7.4.3 or higher; you are using PHP 7.1.33.". So that implies MediaWiki 1.39 IS installed. [14:02:01] it means the files are on disk [14:02:06] but files on disk != installed [14:02:24] Ah yes, because I first have to run the installer script, right? But it won't let me... [14:03:21] Have you set $wgShowExceptionDetails = true; as it suggests? [14:05:23] When I do that, I get: [14:05:37] Please see https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Upgrading and https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:How_to_debug for more information. [14:05:38] Error 1054: Unknown column 'rev_actor' in 'field list' [14:05:38] followed by some more debugging info. [14:05:59] That's probably from a lack of a schema change [14:06:40] Looks like it, yeah. Is that what the update.php script is supposed to do? [14:06:49] You need to go direct to the installer/config [14:07:58] I'm sorry, how do I do that? [14:10:20] yes, MAHADEV-J that schema change (and other similar ones) is what update.php would do [14:10:46] I understand. It would be much better if I could run update.php from the command line... [14:10:54] I don't understand why the web updater isn't working. [14:11:28] it would be, but that's up to your hosting [14:12:05] I am in touch with someone from the hosting provider, maybe they can help. Has anyone ever reported this problem before? [14:18:44] the description is a bit obscure [14:19:02] what's the url of your wiki? [14:20:19] https://jabrownswebsite.com/wiki/ [14:30:57] https://jabrownswebsite.com/w/mw-config/ looks good to me [14:34:38] The missing php extensions looks telling though :) [14:39:46] https://jabrownswebsite.com/w/mw-config/index.php complains about missing extensions, indeed [14:40:11] btw, we should list the php version there [14:44:29] Sorry, a technical support guy from the hosting provider is working on it, it looks like he changed some things. [14:44:41] I hope that it will run when the required PHP extensions are installed... [14:47:40] When this is over, I'm going to look into setting up SSH, so that I can run update.php from the command line next time [15:06:50] hm, weird. I guess the support guy installed the missing extensions, because now I can run the upgrade script, but after I do, I'm still getting a different error... [15:07:15] Original exception: [756ec83f55cd71c37fc22902] /wiki/Main_Page Error: Call to undefined method User::isWatched() [15:07:28] I suppose that's a method that was in version 1.34 but has been removed from 1.39? [15:12:39] it shouldn't be running 1.34 methods [15:12:49] didn't you change the files with 1.39 ones? [15:14:26] I overwrote the existing files with the 1.39 ones, but after that I restored LocalSettings.php, some other config files, /extensions, /images, /languages, and /skins [15:14:49] most likely, this comes from skins [15:15:03] maybe something in /skins is breaking it? I notice the call stack mentions SkinTemplate.php... [15:15:14] sorry, missed your message while I was typing mine [15:15:20] you should use the 1.39 version of /languages, /skins and /extensions [15:15:35] and then install the 1.39 version of the skins and extensions you want [15:16:44] Okay, I think I misunderstood the manual. It told me to back up extensions, but it didn't tell me to restore them afterwards, unlike the images. I misinterpreted that, thought I had to put extensions back also [15:23:13] extensions shouldn't be restored from old versions, you should download new versions (either latest version or matching 1.39 release branch, depending on the extension) [15:27:33] Okay, I tried replacing the extensions, skins and languages directories with the 1.39 ones, but I'm getting a blank page again. [15:30:27] Should I just remove the entire installation, do a clean install of version 1.39, and import the database + images again? [15:30:51] But then I would have to run the update script again, right? Otherwise the database schema will be in 1.34 format and wrong. Do I understand correctly? [15:34:33] !blankpage [15:34:33] A blank page or HTTP 500 error usually indicates a fatal PHP error. For information on debugging (including viewing errors), see . [15:44:52] don't restore anything but the /images [15:46:21] I removed everything and reinstalled v1.39, I'm now in the middle of running the upgrade script [15:46:32] for some reason, it wants me to give database credentials, it didn't do that before [15:47:36] you had a LocalSettings.php before [15:47:41] so it used that database [15:47:53] you can provide the same db credentials as it used to have [15:47:59] and it will upgrade that wiki [15:48:13] Oh, of course, LocalSettings.php was still there last time, but now it isn't [15:48:14] okay, one moment [15:49:54] when it asks me "Database account for web access", should I check the box that says "Use the same account as for installation"? [15:49:58] I'm at a loss as to what this means [15:50:08] I already had user accounts set up with permissions etc. in my previous installation [15:54:08] You have to copy the LocalSettings.php from the old installation, not run the installer again [15:55:04] Ah, I see. Sorry. [15:55:35] Well, if you lost the LocalSettings.php, that would be an alternative option, but LocalSettings.php usually have other configurations that you'll lose [15:57:25] I've now restored the old LocalSettings.php, but the wiki is still not working. When I try to use the /wp-config/ installer again, it just continues where it left off. [15:57:44] clear the cookies [15:58:08] (there's probaly an option to go back, too) [16:00:29] Sorry, I got disconnected. [16:00:57] Cleared cookies, now the web installer is restarting. [16:01:36] I'm getting an error related to some JSON file in /skins. [16:03:05] do you hae any skin there? [16:03:38] No, that must be what's causing the error, it's causing a skin that isn't there. [16:03:42] *calling [16:04:05] I thought the skins would come with the 1.39 installation tarball. [16:07:44] it depends on the file you downloaded [16:07:47] Never mind, looks like I downloaded one that had the core files only [16:07:57] there is one which has common extensions and skin [16:08:02] and other with only core files [16:10:19] Yes, I just installed the skins, now I'm getting the same error with the extensions. So now I'm gonna install those as well. Sorry, I'm stupid and didn't realize I had downloaded just the core files. [16:10:48] it might be easier to download the one bundling skins and extensions [16:11:39] I feel your frustration [16:11:51] MediaWiki updates are expected to be easy :( [16:12:23] Looks like this is gonna take a minute... [16:13:06] Well, to be honest, I was foolish because I didn't even realize there were new versions of MediaWiki, much less that Wikipedia used the newest version and that's why importing a template from Wikipedia broke my templates. [16:13:17] I'll definitely remember to update my installations more frequently now... [16:19:52] you can subscribe to mediawiki-announce [16:21:14] Sorry, is that a mailing list? [16:21:27] yes [16:21:45] I think it even encourages you to do so after you finish the installer [16:22:15] https://lists.wikimedia.org/hyperkitty/list/mediawiki-announce@lists.wikimedia.org/ [16:23:36] Ah, thanks! [16:24:02] Well, I ran the installer again, and now the wiki is back up, but whenever I try to visit any article, I still get errors (in the place where the article should be.) [16:24:11]  MWException: The lua binary (/home/jabrvdqv/public_html/w/extensions/Scribunto/includes/engines/LuaStandalone/binaries/lua5_1_5_linux_64_generic/lua) is not executable. [16:24:41] Is this a permission issue? [16:25:47] this is a problem with the scrubinto extension [16:26:03] you apparently need to give execute rights to the /home/jabrvdqv/public_html/w/extensions/Scribunto/includes/engines/LuaStandalone/binaries/lua5_1_5_linux_64_generic/lua binary [16:26:26] on a shell that would be chmod +x /home/jabrvdqv/public_html/w/extensions/Scribunto/includes/engines/LuaStandalone/binaries/lua5_1_5_linux_64_generic/lua [16:26:49] I don't know how ypu are uploading the files [16:29:15] Manually, in a file manager. I've now set the permissions to 755 [16:29:36] that should have fixed the error [16:29:53] Yes it has. Now my wiki with all the articles seems to work again, but... the templates are still broken. [16:30:15] Should I import them again? And which ones? Just the one I tried to import last time that broke it, or all of them? [16:30:39] did those templates work before? [16:32:43] Yes. They're very common templates like Hlist, and so on. I tried to import Quote box from Wikipedia, and that broke them. [16:33:20] It seems like TemplateStyles is no longer installed, or something. [16:34:45] sorry, TemplateData, I mean. But it is installed, and also called in LocalSettings.php. [16:35:03] so I don't know why the tag isn't working [16:36:06] Wait, sorry. TemplateData is installed, but TemplateStyles isn't. They're two different extensions. [16:49:43] Agh, I don't get it. I didn't have TemplateStyles installed at first either, but somehow all those templates worked. Now I installed it, and I keep getting an error message saying "Template:(template name)/styles.css has no content". Even when I go to that page and copy all the text from the equivalent Wikipedia template stylesheet into it. [16:53:29] and when I try to import templates now, I get a 403 Forbidden error... [17:38:04] Well, it works somehow. It's a miracle! I dunno what I did, but the weird red error text disappeared. [17:38:13] Thank you for your help! [17:39:03] For some reason, the logo in the top left doesn't scale correctly though, but that is a minor issue and not really all that important. I had a 100x100 px logo, now it's 135x135 px like it says it should be in the manual, but it keeps showing up wrong. [23:18:01] Can someone please merge https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ProtectSite/+/831620/ a review? Currently that extension is completely broken on 1.39. Thanks! [23:38:58] CosmicAlpha: commented [23:52:40] Platonides: thanks! (and fixed on it)