[00:44:20] I asked some days ago but I'm unsure if I got a response. Anyway. Read through several MW.org pages but found no workaround to make my wiki randomly change its logo from a set of images. Is that even possible? There is a new $wgLogos variable but it isn't exactly for such a thing [00:49:43] it's possible, but it's not a feature that exists [05:39:45] bedivere: you could do it ‘manually’ without altering MW source but it would lead to loss of browser/reverse caching for the logo [05:43:36] bedivere: for example, years ago I wrote this https://paste.ee/p/JkMMC as a simple CGI script (did not want to bother with FastCGI/WSGI at the time) [12:15:23] Hi, running 1.38.2 and only when I search for fixme I get: [13f6aac954b7d25c2af02f64] 2022-07-26 12:15:10: Fatal exception of type "Wikimedia\Assert\PreconditionException" [12:15:40] any ideas what that can be? [12:55:46] !debug [12:55:46] For information on debugging (including viewing errors), see https://mediawiki.org/wiki/Manual:How_to_debug . A list of related configuration variables is at https://mediawiki.org/wiki/Manual:Configuration_settings#Debug.2Flogging Also see https://mediawiki.org/wiki/Manual:Errors_and_symptoms [12:56:12] webmind ^ try to get a stack trace of the error to look at [13:57:20] thanks [15:03:09] Hi, I'm running MediaWiki 1.37 and notice this error that PHP Notice: Undefined index: storeDirectory in /includes/cache/localisation/LocalisationCache.php on line 210 [15:03:29] On line 210 I have [15:03:30] $conf['storeDirectory'] ?: $fallbackCacheDir; [15:03:43] so can someone please help to point out what this error is? [15:08:06] Anyone aware of this error? [15:17:56] probably something got misconfigured in LocalSettings [15:18:54] (in particular, $wgLocalisationCacheConf) [15:19:47] Thank you moonmoon. I'll check and get back asap. [15:20:48] $wgLocalisationCacheConf = [ [15:20:48]   'class' => LocalisationCache::class, [15:20:49]   'store' => 'files' [15:20:49] ]; [15:21:24] moonmoon : This is what I have in my LocalSettings.php [15:29:22] Guest14: that would be the issue, then [15:29:34] don't redefine the entire variable, set each line individually [15:29:54] you also don't need to set 'class' -- that's the default value [15:30:07] so what you want to do is replace that entire thing with $wgLocalisationCacheConf['store'] = 'files'; [15:30:37] Ok thank you for pointing out the issue. I actually copied it from https://www.mediawiki.org/wiki/Manual:$wgLocalisationCacheConf [15:30:45] yeah, don't do that :) [15:31:12] I'll remove the entire. [15:31:17] Thank you :) [15:31:26] for associative array variables (ones with key => value pairs), it's better to only customize the bit you wish to change, and leave the rest as default [15:32:21] Gotcha [15:32:50] Also, do you have any idea if LuaSandbox is compatible with Openlitespeed? [15:33:22] yes [15:33:44] exact webserver you use doesn't matter, since it's a PHP extension [15:34:09] so only thing that matters is PHP version, and LuaSandbox has been compiled for all recent ones [15:35:00] Ok, actually I was told by my server provider that to use LuaSandbox I need to shift to Apache from OpenLiteSpeed. [15:35:05] they would be wrong [15:35:47] :) [15:35:56] just install/enable it normally in your php.ini [15:36:30] I guess so. Is there any doc file for that like what I need to add to php.ini? [15:36:37] er, I guess I should ask this first: are you on shared hosting or are you on a VPS/dedicated server? [15:36:53] (aka do you have root access) [15:37:08] I'm on dedicated server [15:37:19] and have the rood access. [15:37:32] root* [15:37:36] awesome, then you're all good [15:37:44] check https://www.php.net/manual/en/luasandbox.installation.php and see if that helps [15:38:15] some package managers already bundle/ship it, so you can install from e.g. apt [15:38:59] Ok I'll try to install myself instead of requesting to my server provider because they will repeat the same thing. [15:40:57] what OS are you using? [15:43:58] CentOS 8 [15:44:30] Linux [15:54:19] hopefully you mean CentOS Stream 8 there since regular CentOS 8 is EOL, but you'll want to use the pecl command to install it since it doesn't look like it's shipped in their package repos (except for remi, which I personally don't recommend using) -- https://www.php.net/manual/en/install.pecl.pear.php [16:01:52] I'm not 100% sure if it's CentOS 8 or CentOS Stream 8 but when I purchased I was told that it's Linux CentOS 8. [16:02:02] So I need to check the exact version. [16:05:46] Sorry it says Operating System: Centos-7 [16:05:50] oh [16:06:04] do cat /etc/redhat-release while connected to the server [16:06:15] that should tell you for sure [16:06:24] (what it says on the host panel isn't necessarily accurate) [16:07:31] CentOS Linux release 8.5.2111 [16:13:20] so, and you don't need to do this immediately but you should start investigating and planning for it sooner rather than later, you should migrate to a non-EOL OS. There are three main options here (technically 5 but guessing you probably don't care much about the last 2), migrate to CentOS Stream 8, migrate to AlmaLinux, or migrate to Rocky Linux [16:13:44] Each of those migrations is extremely simple, involving downloading and running a shell script, and can be done without the need to reboot [16:14:17] I suggest doing some research on them and determining which works best for you [16:15:30] depending on which you move to, you may wish to do it before attempting to install LuaSandbox (since the PHP version might change between now and then) [16:16:36] Okk I'll do some investigate and move to the best option you mentioned above since as you said above the regular CentOS 8 is EOL and that could create issues in future so its better to move to one of the options above. I'll also ask the server provider if they can do this for me if so that would be great. [16:17:11] They tried to install LuaSandbox a few weeks ago but it didn't worked so I'll ask them to stop that process for now. [16:18:19] (for sake of completion, the other 2 options you probably don't care much about, but are similarly easy to migrate to without downtime, are Oracle Linux and Red Hat Enterprise Linux) [16:19:04] I don't suggest either of them [16:19:29] Great, I have heard of Oracle Linux so I'll check which one is best and easy to migrate to from CentOS 8. [16:20:19] Thank you so much for your time and suggestions. I'll look forward to go with your suggestions. :) [16:20:25] they're all equivalently easy; it's a shell script you run that just points your dnf repos to different mirrors and swaps a branding package [16:20:42] otherwise it's all the same stuff behind-the-scenes [16:20:59] Ok gotcha 👍 [16:51:07] wow ctype_digit is an "interesting" function [16:52:18] ctype_digit( 1 ) is false. ctype_digit( "1" ) is true. ctype_digit( 1e0 ) is false. ctype_digit( (string)1e0 ) is true [17:02:15] from a comment on the man page: ctype_digit() will treat all passed integers below 256 as character-codes. It returns true for 48 through 57 (ASCII '0'-'9') and false for the rest. [17:03:11] That is deprecated since 8.1 though, since it's incredibly confusing [17:04:27] Vulpix: its kind of unclear to me if locales are taken into account though, although maybe those don't exist anymore in php [17:04:54] Marijn[m]: indeed, that's how i came across it. I'm trying to fix deprecation warnings mediawiki is emitting in php 8.1 [17:09:14] Hmm, google seems to indicate that isdigit in c, is usually not locale dependent, except some microsoft compilers will consider 172, 173 and 185 to be digits [22:04:14] How can I get the HTML for a page in an integration test? Starting from a Title instance [22:04:44] The entire HTML, including whatever hooks are adding to it [22:16:16] TimStarling, Remilia, thanks for your input, specially about that script, Remilia. A more sensible approach would be, however, to make some changes to the source. I thought of making the $wgLogo variable reliant on some Parserfunctions-powered template but I'm not sure if that would work. [22:26:37] if it's a normal small self-hosted wiki, in LocalSettings.php just use [22:27:03] $wgLogo = [ '/logo1.png', '/logo2.png', 'logo3.png'][mt_rand(0, 2)]; [22:44:33] great, TimStarling, will do, many thanks for your help