[10:44:59] Hello 👋 [12:04:27] Hi. So I am using mediawiki 1.27.1 with PHP7. I am getting the some deprecation notices that blows up my error logs. Is there a way to stop it? [12:04:29] https://phabricator.wikimedia.org/T155834 [12:04:34] This is the exact issue! [12:07:59] I tried to add a php.ini config, but it wont stop the logs. [12:08:24] Any other way to stop the warnings? [12:33:00] The southwestern route is believed to be the Ganges/Brahmaputra Delta, which has been the subject of international interest for over two millennia. Strabo, the 1st-century Roman writer, mentions the deltaic lands: "Regarding merchants who now sail from Egypt...as far as the Ganges, they are only private citizens..." His comments are interesting as Roman beads and other materials are being found at Wari-Bateshwar ruins, the ancient city with roots from [12:33:01] much earlier, before the Bronze Age, presently being slowly excavated beside the Old Brahmaputra. Ptolemy's map of the Ganges Delta, a remarkably accurate effort, showed that his informants knew all about the course of the Brahmaputra River, crossing through the Himalayas. It is doubtless that this delta was a major international trading center, almost certainly from much earlier than the Common Era. Gemstones and other merchandise were traded in the [12:33:01] delta and through it. making use of the ancient route, known as the 'Ledo' route, are believed to be the international trade centers in this route. [12:47:17] TridenRake: Error reporting can be changed on several levels (php.ini, .htaccess, LocalSettings). A later setting may override one earlier in the chain. See https://www.mediawiki.org/wiki/Manual:How_to_debug#PHP_errors [16:46:23] Hi. After fixing all issues, I am now facing a login issue. When I try to login it says 'Wiki uses cookies to log in users. You have cookies disabled. Please enable them and try again.'. [16:46:42] I searched for reasons and added $wgDisableCookieCheck=true; in localsettings.php. [16:46:47] Still I am unable to login. [16:47:16] To add more, I have made my php session folder writeable and even checked with 777 permissions. [16:47:37] None seem to work. Any solution for this? [16:53:59] The mediawiki debug log isn't helpful either. [16:54:11] Any help? [16:55:09] This is the exact issue I am facing - https://www.mediawiki.org/wiki/Topic:Sxbi2fnlrpbm3ita [16:59:45] Any solutions? [17:03:22] Additional info: mediawiki is sending session cookie. [17:03:43] I checked with different browsers as well. Still unable to login. [17:05:06] does your browser send cookies back to the server? [17:06:03] Yes. [17:11:15] foxlit, in the debug log I see this now: `[session] Session "{session}" requested without UserID cookie` [17:14:12] Please help. I've been stuck with this for more than five hours. [17:14:59] Tried creating a temp directory in the mediawiki installation as well. It remained empty even though I specified session write path to that. [17:15:44] chmod ed the /var/etc/php/sessions folder to 777 too. Nothing happened. [17:16:11] googling that message seems to suggest adding $wgSessionCacheType = CACHE_DB; to localsettings [17:17:57] foxlit, Still the same1 [17:21:47] I don't actually know how MW stores and validates session data, so your guess is probably as good as mine here. [17:27:12] I understand. [17:28:28] I am losing it at this point. sleep/food deprived - five hours straight - they need the wiki up and working today. sigh. [17:28:57] At this point, can any one tell me how to disable cookie entirely? [17:34:09] Anyone? Please. [17:35:46] TridenRake: My guess is as good or bad as yours, but I don't think it will work without cookies. You have to store that session data somewhere, otherwise you won't be able to login. [17:36:51] My permissions for the session storage folder is 777 and still MW wont write anything there. [17:37:33] TridenRake: Are you sure that you did not block cookies on client side? [17:38:09] To rule out that error, I checked in different browsers + a friend's computer as well. [17:40:57] This my php session folder /var/lib/php/sessions [17:41:06] The folder is set to 777 right now. [17:41:13] And still the folder is empty. [17:42:45] TridenRake: Is your wiki set to $wgReadOnly=true by any chance? [17:43:19] No. I rechecked it now as you mentioned. [17:46:59] TridenRake: As far as I can tell the PHP session handling is a red herring. MW uses its own handling. See https://www.mediawiki.org/wiki/Manual:$wgSessionCacheType [17:52:26] I tried all possible values. Still nothing. [17:56:51] Is there any other settings or maintenance script to reset or repair the wiki? [18:03:34] TridenRake: Using Chrome you can check, that the cookie is actually stored. Go to your wiki first, then to chrome://settings/siteData There should be a cookie wikidb_session [18:03:59] ...for your site [18:05:40] FoxT, yes, I do see the session cookie. [18:08:20] Path [18:08:20] is / [18:08:32] Send for [18:08:32] Secure connections only [18:09:05] As I see the cookie sent from server to browser... [18:09:27] I cant see the same cookie information anywhere in my wiki folder. [18:10:02] TridenRake: Well, if the cahce is set to CACHE_DB it probably ends up in the DB [18:11:28] I will try it once again. [18:12:49] FoxT, no, :( It's not working. [18:13:09] I set $wgSessionCacheType = CACHE_DB; in the localsettings. Still the same. [18:24:12] Any other suggestions? [18:26:31] TridenRake: Not really. CACHE_DB corresponds to the table objectcache in your DB. After a successful login there should be a row where the keyname contains MWSession. [18:28:10] I dont have any cache in the server. [18:28:14] https://phabricator.wikimedia.org/T138072 [18:30:05] "I dont have any cache in the server." - I don't understand that. [18:30:53] I'm sorry. What I meant is that I haven't enable any cache for the wiki. Meaning, I set the main cache to none; [18:31:16] $wgMainCacheType = CACHE_NONE; [18:31:16] $wgSessionCacheType = CACHE_DB; [18:31:16] $wgMemCachedServers = array(); [18:31:25] These are my localsettings now. [18:31:52] TridenRake: Ok, that means that at least for Sessions data you have CACHE_DB [18:32:04] i.e. using the database [18:32:22] Yeah. But :( It's not working. [18:33:20] I know this will be frowned upon here. But I have no options. Is there an alternative wiki software that's as good as mediawiki? [18:35:49] I also like to mention that I am using php 7.2. [18:37:39] TridenRake: This should work, but might cause warnings (as you noticed, I think) [18:39:19] Sorry, I did not receive any link from you? This? [18:50:32] This = " using php 7.2" [19:01:44] Okay. I have re-installed everything. I am still unable to fix this. [19:18:46] Any help? [19:21:56] TridenRake: this really sounds like a client side issue rather than serverside [19:22:07] after logging in, check your browser for what cookies you have [19:22:18] I checked, the session cookie is present. [19:22:32] you should have two cookies: a session cookie and a user id cookie [19:22:36] I checked on firefox, chrome, and a friend's laptop browsers too. [19:22:45] I only have a session cookie. [19:22:57] I don't see any user id cookie. [19:23:34] er, 3 cookies [19:23:36] username as well [19:23:47] hmm [19:23:49] is your wiki public? [19:24:03] It is public. [19:24:09] mind giving a link? [19:24:48] I am not sure if I can. Let me check. [19:24:52] ok [19:25:10] you can also send it in private (if you get approval for that), by doing /query Skizzerz [19:25:13] with the / in front [19:25:18] this should open up a new PM window/tab with me [19:26:54] I can tell you the contents of this page on chrome: chrome://settings/cookies/detail?site=example.com [19:27:16] that won't help [19:27:37] clear all your cookies for the site, do a network capture of the login process to see what it sends in the Cookie: header [19:27:52] if you changed your browser settings to block certain cookies, that may be a cause of issue [19:28:01] if I had a link, I'd try registering and logging in myself [19:28:28] *see what it sends in the Set-Cookie: header [19:30:38] Okay. I see only the session cookie in the set-cookie. [19:31:29] set-cookie: wiki_db_pre_w__session=ggupkp092rtma96mh4q17nbvv80rqf4m; path=/; secure; HttpOnly [19:32:03] odd [19:32:25] what version of mediawiki are you using? [19:32:36] 1.27.1 [19:32:55] try 1.30 [19:33:20] or the 1.31 release candidate [19:33:27] (1.31 is going to be the next LTS version) [19:33:45] It breaks a lot of their custom extensions. I am unable to do an upgrade. [19:33:58] try disabling all of their custom extensions and logging in again [19:34:00] see if that works [19:34:23] That I did already. commented all and tried. [19:34:43] check webserver config to see if it's blocking or rewriting cookies? [19:34:59] at this point I'm not sure what to say, but they should really look into updating their extensions as 1.27 falls out of support soonish [19:35:04] I think a year or two [19:35:20] You're not even using the latest patch version of 1.27... So you're vulnerable to various security issues [19:35:25] Wht should I be looking for in the webserver config specifically? [19:35:33] no idea, what webserver are you using? [19:35:41] apache [19:35:58] any proxies in front? (nginx, varnish, etc.)? [19:36:14] Not in the server now. [19:36:22] There is a cloudflare. [19:37:51] so, something is causing it to not send out or is stripping out the user id and username cookies, which seems to be the cause of your issue [19:38:18] I can't really offer any more assistance in that regard, but it should hopefully give you an idea of where to look and what to look for [19:38:42] Yes, I understand upto this. Mediawiki is not sending those two cookies for some reason. [19:40:18] I am at the same point as these issues - https://stackoverflow.com/questions/45511972/mediawiki-you-have-cookies-disabled?noredirect=1&lq=1 [19:40:51] Well, you don't know if it's MW not sending them, or apache/cloudflare infront [19:41:23] "This was caused because the server settings where set to cookie secure and the connection between CloudFlare and my server were not." [19:43:01] Where do I check this setting? In my vhosts? [19:43:15] sites-enabled/mysite.conf? [19:43:55] In the headers it is mentioned httponly! [19:44:26] https://www.mediawiki.org/wiki/Topic:S0fb62i6s3a9612p [19:44:34] https://www.mediawiki.org/wiki/Manual:CloudFlare [19:44:44] https://stackoverflow.com/questions/25317403/mediawiki-sessions-and-cookies-not-working-on-multi-server-behind-cloudflare [19:44:51] Basically... [19:44:54] Install memcached? [19:44:55] $wgMainCacheType = CACHE_ANYTHING; [19:44:55] $wgSessionsInObjectCache = true; [19:45:05] No memcached. [19:45:10] Install it? [19:46:05] Is there a way without using memcached? [19:46:34] Try reading some of the docs above and see what they say? [19:46:38] Why can't you install memcached? [19:47:39] The server already have five vhosts. [19:48:16] Running memcached for mediawiki would require more memory. And swap isn't allowed. so... [20:11:36] Is there a way to fix this without memcached? [20:17:00] Anyone? [21:02:44] Is there a solution for this issue? [21:04:18] We've already told you one [21:05:03] I'd like to know what is the problematic part here. Is it the server or PHP or mediawiki. [21:05:43] The problem is cloudflare [21:06:17] I stopped cloudflare and tested the same. It still had the issue. [21:10:13] Any other solutions? [21:32:34] I tried everything here - https://stackoverflow.com/questions/16127882/how-can-i-fix-the-mediawiki-error-wiki-uses-cookies-to-log-in-users-you-have-c?noredirect=1&lq=1 [21:40:07] Thanks Reedy, skizzers and fox for taking time and bearing with me. [21:40:45] I will try re-installing the server from scratch again. [22:07:07] That's it, don't try the things that don't actually fix it... [23:51:28] hi, anyone knows if theres option to write {{#if like that inside cargo_query ? https://pastebin.com/EYeWyKbT, if that decide if to write |fields + |group by + |order by or just |fields [23:53:01] you probably have to wrap it the other way around [23:53:06] have two cargo queries inside of an if [23:53:13] (one for the then condition and the other for the else) [23:53:57] i did that with 2 different cargo queries atm :S [23:54:45] you can't dynamically insert parameters using wikimarkup, so if you want to avoid duplicating the bulk of the query you'd be looking at creating it via a lua module in Scribunto [23:57:07] Just out of interest, what happen is that cargo receive the {{#if ... }} as its query?