[05:48:45] I know I've had this issue before, but I can't remember how I solved it. I'm getting a 500 PHP fatal error any time MediaWiki tries to send an email, with the apache log telling me that it failed opening required Net/Socket.php. Anyone familiar with this? [09:27:01] jfolv: you likely have configured it to use Net_Socket [09:27:10] `pear install pear/net_socket` [09:27:29] or instead you could use composer [09:28:21] run `composer require pear/net_socket && composer update --no-dev` in your MW install directory [09:28:34] (I think that should be the syntax) [09:29:10] wait [09:29:14] it comes with MW by default [09:29:28] should be in "mediawiki-1.38.2/vendor/pear/net_socket/Net/Socket.php" [09:29:57] strip the first path part obviously [10:22:17] Hello, iam trying to restore an old mediawiki from backup (from 2018) and i get this error when trying to reach it https://paste.hackernet.se/ciqocimene.tex [10:24:25] i see this error in the apache2 logs [10:25:20] Zunken: Try to download MediaWiki again from https://releases.wikimedia.org/mediawiki/ (ideally the latest stable release, unless you want to use the version you had in the backup to test it and upgrade later). The error means there are missing files [10:26:17] so if i download the latest and update the LocalSettings.php i should get everything back? [10:26:39] Be sure to unpack new files on a clean and empty directory, and copy over only LocalSettings.php and extensions not already present on that folder. Overwriting old files may lead old files that can cause problems like this [10:29:04] You'll need to do an upgrade. If your MediaWiki was old (from 2018), chances are it may require intermediate steps. IIRC, since MediaWiki 1.35 you can't upgrade from releases before the previous LTS [10:32:50] i can access it and so on but i dont get anything from the database [10:52:47] Zunken: what do you mean by not getting anything from the database? [10:53:01] Zunken: did you run the update script? [10:53:48] Also, you probably want to install a MediaWiki from 2020, upgrade to that, then download the latest, and upgrade to that. [10:53:54] yes i did run the php maintenance/update.php [10:54:03] iam trying with 1.32 [10:54:21] ok [10:56:21] Zunken: here are some ways you can get more information for debugging: https://www.mediawiki.org/wiki/Manual:How_to_debug [10:56:46] Error: 1146 Table 'my_wiki.l10n_cache' doesn't exist (localhost) [10:57:13] yee i get this because when i try to run the update.php file i get an error and it doesnt create all the tables [10:58:03] This file was automatically generated by the MediaWiki 1.31.6 [10:58:04] # installer. [10:58:11] maybe i need to go older version [10:58:24] What kind of backup are you restoring from? [10:58:28] No, that version should be fine. Or even 1.35 [10:58:30] An XML dump or an SQL dump? [10:58:35] sql [10:58:42] That should already contain that table [10:59:02] It has existed since version 1.16 [10:59:12] Maybe your backup is incomplete? [10:59:47] Or you were using table prefixes... [11:00:13] I know that some export tools from Oracle skip empty tables by default... [11:00:16] yee i have alot of name_archive [11:00:25] for example [11:00:32] o_O [11:00:39] the prefix is literally "name_"? [11:00:57] nono its qult_archive, qult_interwiki and so on [11:01:05] ah, ok [11:01:17] you need to configure that prefix in your LocalSettings, then run the updater again [11:01:32] will see if it works now [11:01:38] Error: 1054 Unknown column 'iw_api' in 'field list' (localhost) [11:01:57] https://www.mediawiki.org/wiki/Manual:$wgDBprefix [11:02:12] Yes, now you are finding the table, but you are missing a schema update [11:02:21] the updater should detect that and fix it. [11:02:31] oh hold on, you may have to reset it... [11:03:25] try truncating the updatelog table (remember to apply the prefix) [11:03:35] iam no database expert [11:03:35] then run the updater [11:04:09] > truncate table xzy_updatelog; [11:04:29] then run the updater again [11:05:26] btw: if you originally had any extensions installed, after you install them again, you have to run the updater again, so the extensions can perform the schema updates they need [11:05:35] MWException from line 459 of /var/www/html/w/includes/installer/MysqlUpdater.php: Missing rc_timestamp field of recentchanges table. Should not happen. [11:07:06] rc_timestamp has always been there. [11:07:16] something is very wrong with your database... [11:07:52] it sounds to me like your dump is incomplete or corrupt, or something went wrong when importing it [11:08:03] will have a look at that [11:08:14] it did work when i did restore it 4 years ago [11:08:50] ...did you make a new dump? or is this the dump that was already old four years ago? [11:09:06] yes this is a 4year old dump [11:09:53] and you are trying it with MW 1.32? [11:10:03] That's also nearly four years old... [11:10:57] If the dump was made by MW 1.31 or newer, and MW version up to 1.38 should be able to import it. [11:11:34] Zunken: you are using MySQL, right? [11:11:37] yes [11:11:47] or mariadb or whatever ubuntu is linking it to [11:12:08] yea, ok. just making sure it's not a postgres issue. [11:12:14] https://paste.hackernet.se/oyesibofum.1c [11:12:24] there is it when i have imported the sql dump [11:14:28] here's an overview of which table has existed since when: https://www.mediawiki.org/wiki/Manual:Database_layout [11:15:30] I see no bot_passwords table. That would mean that the layout is older than 1.27 [11:15:38] yee [11:15:48] it can be old as fuck [11:16:06] you don't happen to have an XML dump sitting around? [11:16:25] would that be in the mediawiki folder? [11:16:31] They are resilient to schema changes, much better for backing up the content. [11:16:42] It would be wherever you wrote it to. No idea [11:17:45] I mean, MW 1.32 *should* be able to import from anything back to 1.5, I think. But I don't think that was ever actually tested and verified, so stuff may just have broken. [11:18:03] That's one of the reasons we only support updates from LTS back now. [11:18:06] i did restore this back in 2018 [11:18:18] so maybe i need to go with older version [11:18:23] maybe 1.15 and try [11:18:25] Maybe, yes [11:18:55] 1.15 is probably older than your database. [11:18:58] that wouldn't work. [11:19:08] Try 1.26 maybe. [11:19:45] And you should start from scratch, re-import the tables, re-run the installer (set the right table prefix!) [11:20:16] yes i will clear the folder and also reimport the sql dump [11:23:42] Zunken: btw, after you import the data, check if the rc_timestamp field exists in the xyz_recentchanges table. If it doesn't, there is data missing... [11:24:17] PHP Fatal error: Uncaught Exception: MonoBook is not compatible with the current MediaWiki core (version 1.26.0), it requires: >= 1.29.0. [11:24:19] Vector is not compatible with the current MediaWiki core (version 1.26.0), it requires: >= 1.29.0. in /var/www/html/w/includes/registration/ExtensionRegistry.php:208 [11:24:25] seems like i need 1.29 atleast [11:26:51] rc_timestamp does exist [11:27:49] when i did run the update now it seems that it doesnt understand the _ [11:27:51] Vector didn't exist back then. You should be able to get a version of Monobook that works on old MediaWiki. [11:28:17] so it did run the update.php and it did create qultinterwiki [11:28:27] but i already have it as qult_interwiki [11:28:57] ah - when you specify the prefix, you have to include the "_" at the end. it is not implied. [11:29:17] will try that [11:29:58] now it did alot of things [11:30:10] i can reach the mediawiki but no entrys in it [11:31:13] Go to Special:Allpages and see what it says [11:31:48] its alot of things there now :) [11:32:54] Can you click on the page titles and go to the page? [11:33:50] it does wokr [11:33:52] work* [11:34:00] excellent! [11:34:25] you should probably upgrade to a newer version now. You can try 1.38 right away, or try 1.34 or so first... [11:35:11] will do 1.34 [11:37:11] on 1.34 now [11:37:28] then its ok to update to 1.38? [11:41:04] duesen: thanks for all :) [11:45:42] Zunken: yes, 1.34 -> 1.38 should work [11:45:51] it did :) [11:45:55] good luck and have fun :) [12:08:23] duesen: is it possible to change password on user in sql and also make that user admin? [12:22:25] Zunken: you can use the createAndPromote script in the maintenance directory [12:22:49] yee i did that and created a superuser [12:23:03] cool [12:23:32] yiou can use the script to promote existing users as well. the handling is a bit odd. i think you have to use the --force flag or something [12:25:01] thanks [12:26:07] one little problem that i have found when i did restore is that some special things that i had memebers and categorys to the left, but those are not populated, but there is data for it but can it be because its in english and the names are in swedish now? [17:27:51] Hey @Jdlrobson I think this merged patch is resulting in fails for mwgate-docker: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/817348 [17:28:10] 15:10:22 /src/resources/src/mediawiki.page.ready/checkboxHack.js [17:28:10] 15:10:22 380:0 warning Expected @param names to be "checkbox, target". Got "window, checkbox, button, target" jsdoc/check-param-names [17:32:32] wait no ignore me! [17:32:47] my test is failing for something else but that might need fixing anyway [22:17:09] I haven't changed anything since working site, and I am getting this error all of a sudden --> mod_fcgid: stderr: PHP Fatal error: require(): Failed opening required '/root/mediawiki-1.37.2/extensions/SecureLinkFixer/includes/../domains.php' [22:17:50] --w------- 1 root root 3122597 Mar 31 01:01 domains.php [22:17:58] What are the file permissions supposed to be for that file? [22:18:51] being able to read it [22:22:12] yeah. Is there anything in MediaWiki that would potentially change the permissions of the file? [22:26:48] no [22:27:02] unless MW itself is running as root, in which case you have bigger problems to worry about [22:31:15] do you have a cron/systemd job updating the domains list? have you done anything else on the server lately and may have run the command with a wider scope than intended? [22:59:50] I asked this last night but didn't get any kind of satisfactory answer. My MediaWiki installation is throwing 500 errors any time it tries to send an email. The error I get is a fatal PHP error saying failed to open required Net/Socket which should be part of the install by design. [23:00:11] I confirmed that the vendor files exist, so why is it failing to load it? [23:00:31] I didn't recently upgrade or anything, just switched the disk to a new machine when performing an upgrade. [23:00:46] *Hardware upgrade, not MediaWiki upgrade. I realize that sounded confusing. [23:01:06] jfolv: What't the exact text of the error message? [23:01:11] *what's [23:01:36] And are you using SMTP ($wgSMTP) or builtin email support? [23:03:13] One moment, I'll find the error. And yes, using $wgSMTP [23:03:36] Emails are relayed to the main server via postfix [23:04:29] Just to check, have you modified the php include path (Have any calls to set_include_path in LocalSettings.php), as that's probably the most common cause of issues related to $wgSMTP [23:06:08] No, I haven't touched it at all [23:06:12] No reason to. [23:07:12] Ah, wait, that does indeed exist in our config [23:08:23] Try commenting it out and see if that helps [23:08:35] https://pastebin.com/6ZL68Yjc is the specific error btw [23:11:08] Well, commenting that out at least stops the 500s [23:11:48] We use PEAR's smtp support, which is insistent on using the include_path variable instead of just putting in the actual path in the require [23:12:11] so if it gets overriden, smtp often stops working, but nothing else is affected [23:12:25] Interesting. We've had that set_include_path for a long time, so I wonder what changed. [23:13:00] Maybe the setup of the new system? Idk. At least it stopped breaking. I can figure out regular SMTP errors, but full on 500s worried me. [23:13:13] I think really old versions of mediawiki used to put that in LocalSettings.php, but i think the version MW generates was supposed to just add things, and not reset it all (I think) [23:13:56] By the way, I looked up the Net/Socket package in PEAR and it appears to have no updates in the past 5 years. Does MediaWiki have its own fork? [23:14:29] We include it via composer in modern mediawiki [23:14:41] really old MW used to use your system's PEAR [23:15:05] Ohhhhh that would make a lot of sense. [23:15:14] https://packagist.org/packages/pear/net_smtp [23:16:09] I'm going to update $wgSMTP, as i've heard several other people having this issue lately [23:22:59] Probably not a bad idea. Our wiki is VERY old, so it's likely that the include is a relic from a time when you had to manually set your PEAR install.