Is there any extension that shows when was the page last visited(viewed), so that it helps to track the older pages
Project:Support desk
See your server logs but what is the use case? Going over "unpopular pages" to solve which problem?
Extension:HitCounters, but often an external solution is better for analytics
Not quite what you want, but with Extension:DynamicPageList3 you can order by "lastedit".
Thanks for the response!!
HitCounters extension will only show how many times a page has been accessed. We want something like when was it last accessed since we want to remove really old pages which are no longer required. So if there is any extension or any other to track. Thanks in advance!!
Perhaps the ‘Analytics’ extension would suit you? It includes a page search function and provides a history of both edits and views. But it only provides stats from the moment it is installed.
knbj
wikimedia 1.35 on linux debian, php 7.3
what possibly could give a client side ERR_CONNECTION_RESET editing a sub section, no apparent errors server side, editing the entire page works properly, I intentionally disabled https, plain http is enough inside a secure lan
thanks for any hints whatsoever where to look possibly
Did you look at your webserver error logs (apache error logs, php-fpm process logs...)? A connection reset may indicate the webserver or (more commonly) the php engine crashed while processing the request (usually with a SIGSEV signal, or "segmentation fault"). If that's the case, this may happen due to a buggy php extension installed, sometimes related to php caching.
I have this at the beginning of LocalSettings.php :
error_reporting( E_ALL );
ini_set( 'display_errors', 1 );
and at the end :
$wgShowError = true;
$wgShowErrors = true;
$wgShowSQLError = true;
$wgShowSQLErrors = true;
$wgShowException = true;
$wgShowExceptions = true;
$wgShowExceptionDetails = true;
$wgDebugComments = true;
$wgDebugLogFile = "/var/log/mediawiki/logfile.log";
no errors in /var/log/apache2/error.log
[Tue Sep 17 21:07:31.966640 2024] [mpm_prefork:notice] [pid 1487] AH00163: Apache/2.4.38 (Debian) configured -- resuming normal operations
[Tue Sep 17 21:07:31.966765 2024] [core:notice] [pid 1487] AH00094: Command line: '/usr/sbin/apache2'
in /var/log/mediawiki/logfile.log
I can't find any "error" or "segmentation" what should I look for say "timeout" ?
/var/log/syslog also nothing apparent :
Sep 17 21:07:31 mediawiki1 systemd[1]: Started The Apache HTTP Server.
Sep 17 21:09:00 mediawiki1 systemd[1]: Starting Clean php session files...
Sep 17 21:09:00 mediawiki1 systemd[1]: phpsessionclean.service: Succeeded.
Sep 17 21:09:00 mediawiki1 systemd[1]: Started Clean php session files.
Sep 17 21:09:01 mediawiki1 CRON[1558]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Sep 17 21:22:01 mediawiki1 CRON[1566]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Sep 17 21:39:00 mediawiki1 systemd[1]: Starting Clean php session files...
Sep 17 21:39:00 mediawiki1 systemd[1]: phpsessionclean.service: Succeeded.
it is php 7.3, how to configure php-fpm ?
If you are using apache, you're using apache-mod-php and not php-fpm.
Looks like you can discard a segmentation fault at this point. It may be an intermediate firewall or proxy (mis)detecting some weird thing and resetting the connection. Only you know the different devices/software between your browser and the server to know what could be. A network inspecting tool like Wireshark or tcpdump can be used by an expert to check on both server and client from where the connection reset originates.
from wireshark, after the POST there is a red RST, connection dropped I suspect from server side, the strange thing is that editing the entire page works
if possible to delete previous message, it should be :
from wireshark on client side, after the POST there is a red RST, connection dropped I suspect from server side, the strange thing is that editing the entire page works
tgf
ugvvjn
lkkl
Hello,
I am using MediaWiki version 1.39.1 and when I define the SyntaxHighlight_GeSHi extension in LocalSettings.php file, I encounter two separate errors.
Problems I am experiencing:
$wgServer must be set in LocalSettings.php error: I get this error and then I define $wgServer correctly (for example: https://www.docs.clomosy.com). However, when I resolve this error, I encounter a second error.
500 Internal Server Error: I cannot access the page and I get a 500 Internal Server Error error. Because of this error, I have to disable the extension.
Tests I have performed:
When I test the same configuration on my local server with MediaWiki version 1.39.0, everything works fine.
However, I am facing this issue with version 1.39.1 in the live environment.
I have set the $wgServer configuration correctly and checked the file permissions.
When I remove the wfLoadExtension( 'SyntaxHighlight_GeSHi' ); line that I added to the LocalSettings.php file, the site is accessible again.
I kindly ask for your help on what to do about this.
For the second error, is there a more detailed error in your php error log? (See How to debug)
Where to put Manual:File page warnings in Manual:Contents?
I've uploaded pictures to the main page of my wiki, but they only display when I'm logged in. I'd like people I share the wiki link with to be able to see those pictures without having to have a Miraheze account, so what can I do to fix this? Many thanks
Can you link to an example?
You'll probably have to ask this on the Miraheze community portal though; this support desk is about the MediaWiki software only.
I have different wikis running. On one running MediaWiki 1.42, links with templated are not interpreted as links, e.g. [[ {{valuefromtemplate}} ]] are just like blocked while working in other wikis running MediaWiki 1.41 or below. Is there a configuration or parameter I should set? Thanks!
I have set up a local Redis instance with an open socket. I have followed the instructions here and have made changes in my LocalSettings.php to use it both as an object cache and job queue. However, I have not been seeing any objects or jobs appear when I view the cache contents. I was wondering what the best way to debug / test whether the MediaWiki instance is properly using the cache? Thanks!
My LocalSettings.php contains these configurations:
$'wgMainCacheType' = 'redis';
$'wgObjectCaches'['redis'] = [
'class' => 'RedisBagOStuff',
'servers' => [ '...redis.sock' ]
];
$'wgSessionCacheType' = 'redis';
$'wgJobTypeConf'['default'] = [
'class' => 'JobQueueRedis',
'redisServer' => '...redis.sock',
'redisConfig' => [],
'claimTTL' => 3600,
'daemonized' => true
];
first step - enable mediawiki debug logging (see How to debug ) the debug log should list which cache is in use for various things and any errors.
Make sure that "...redis.sock" is correct syntax (i dont know if its right or not. Dont know that much about redis)
Thanks, @Bawolff!
Following your suggestion, I enabled the debug logging and am seeing the following:
[objectcache] MainWANObjectCache using store RedisBagOStuff
[MessageCache] MessageCache using store RedisBagOStuff
[MessageCache] MessageCache::load: Loading en... local cache is empty, got from global cache
[caches] parser: RedisBagOStuff
Article::view using parser cache: yes
Parser cache options found.
ParserOutput cache found.
Article::view: showing parser cache contents
Which suggests that the redis cache is indeed up. I was wondering whether there is a deterministic way to populate the cache to confirm that it is working as expected.
I tried something simple like refreshing the page to see whether the MessageCache would no longer need to fall back to the "global cache", which I am assuming here refers to the DB.
well its saying its serving the current page out of parser cache, and parser cache is backed by redis, so that should mean its populated.
For message cache, not sure, but local cache might mean APCu and global cache redis.
Thanks for the answer, @Bawolff
Is there a way to force Redis to populate for the different caches (e.g. object, message, and parser).
Based on what you said, I'm quite confident now that the cache is connecting, but for some reason I'm still not seeing any keys appear in the cache, which makes me want to confirm that writing to it is working as expected.
you could use eval.php
MediaWiki\MediaWikiServices::getInstance()->getMainWANObjectCache()->get( 'keyname');
And
echo MediaWiki\MediaWikiServices::getInstance()->getMainWANObjectCache()->set( "keyname", "value" );
Yes, that worked! Also, from playing around, it seems like logging in as the admin and loading / reloading a number of the pages seemed to populate the cache with a few hundred keys.
Hello been trying to config Redis for mediawiki 1.41.2 recently but i'm getting
Fatal error: Uncaught error: Class "wikimedia\IPUtils" not found when I run jobrunner as suggested Here on Redis Page.
I've posted my setting here if anyone would like to take a look.
Did u have any issues when u run "php redisJobChronService --config-file=config.json" ?
For the fatal error, did you run composer install?
Not sure I follow, the command I ran from a terminal in Cpanel. But I used composer to install semantic mediawiki.
You mean should I run composer
php composer.phar update --no-dev
beforehand?
Yes, in the directory the job runner service is in.
The error is gone but when I run php redisJobChronService --config-file=config.json nothing seems to happen it just stays at NOTICE: Starting job chron loop(s)...
Should I change the dispatcher in the config.json from "nothing" to link to runJobs.php file?
if I run php redisJobChronService --config-file=config.json --verbose I get the following messages that gets repeated infinitely
2024-08-07T09:21:38+00:00 DEBUG: Redis cmd: get ["RedisJobChronService::executePeriodicTasks:lock:0"]
2024-08-07T09:21:38+00:00 DEBUG: Redis cmd: getset ["RedisJobChronService::executePeriodicTasks:lock:0",1723022498.49072]
2024-08-07T09:21:38+00:00 DEBUG: Redis cmd: sMembers ["global:jobqueue:s-queuesWithJobs"]
2024-08-07T09:21:38+00:00 DEBUG: Redis cmd: hMSet ["jobqueue:aggregator:h-ready-queues:v2:temp",{"_epoch":1723022498}]
2024-08-07T09:21:38+00:00 DEBUG: Redis cmd: rename ["jobqueue:aggregator:h-ready-queues:v2:temp","jobqueue:aggregator:h-ready-queues:v2"]
2024-08-07T09:21:38+00:00 DEBUG: Redis cmd: del ["RedisJobChronService::executePeriodicTasks:lock:0"]
2024-08-07T09:21:39+00:00 DEBUG: Memory usage: 683848 bytes.
Same for php redisJobRunnerService --config-file=config.json --verbose I get these repeating infinetly
2024-08-07T09:20:56+00:00 DEBUG: Redis cmd: hGetAll ["jobqueue:aggregator:h-ready-queues:v2"]
2024-08-07T09:20:56+00:00 DEBUG: No jobs available...
2024-08-07T09:20:56+00:00 DEBUG: No jobs available...
2024-08-07T09:20:56+00:00 DEBUG: No jobs available...
2024-08-07T09:20:56+00:00 DEBUG: No jobs available...
2024-08-07T09:20:56+00:00 DEBUG: No jobs available...
2024-08-07T09:20:56+00:00 DEBUG: No jobs available...
2024-08-07T09:20:56+00:00 DEBUG: No jobs available...
2024-08-07T09:20:57+00:00 DEBUG: No jobs available...
2024-08-07T09:20:57+00:00 DEBUG: No jobs available...
2024-08-07T09:20:57+00:00 DEBUG: No jobs available...
And I also have another question regarding this part
Configure a daemon to run this at server start:
php redisJobChronService --config-file=config.json
How can I configure a daemon to run this?
Apologies in advance for all those questions but it's all a bit confusing if you don't have much experience in this
Hi, ich have the same problem, when I run php redisJobChronService --config-file=config.json nothing seems to happen it just stays at NOTICE: Starting job chron loop(s)..., event when i changed the "nothing" to the runJobs.php path in the config.json. Have you already solved the problem?
Still working on migrating from a 1.35 Mediawiki on Centos 7, to 1.42 on Ubuntu. The Wiki is up and running fine, except for the LDAP connection.
I've tried to follow some guides, and also tried to get to know the different extensions when that didn't work well. I got a lot further from studying them - but not far enough.
When I try to log in with a domain user now, the MediaWiki login feedback is: User cannot be authenticated
In pluggableauth.log:
mediawiki: Getting PluggableAuth instance
mediawiki: Plugin name: LDAPAuthentication2
mediawiki: Authentication failure.
In LDAPAuthentication2.log:
mediawiki: Try to authenticate user: frodobaggins
mediawiki: Not local login. Checking LDAP...
mediawiki: LDAP domain: intratriona.se
mediawiki: Username not found in user info provided by LDAP!Please check LDAP domain configuration. Specifically usernameattribute
mediawiki: LDAP user info results for user frodobaggins: Array
(
<snip>
[samaccountname] => FrodoBaggins
LocalSettings.php and ldapprovider.json are as follows:
LocalSettings.php - LDAP part
wfLoadExtension('PluggableAuth');
wfLoadExtension('LDAPProvider');
wfLoadExtension('LDAPAuthentication2');
wfLoadExtension('LDAPAuthorization');
wfLoadExtension('LDAPUserInfo');
wfLoadExtension('LDAPGroups');
$LDAPProviderDomainConfigs = "/srv/mediawiki/ldapprovider.json";
$LDAPAuthentication2UsernameNormalizer = 'strtolower';
$LDAPAuthorizationAutoAuthUsernameNormalizer = 'strtolower';
$wgLDAPGroupUseFullDN = false; # Use short group names instead of full DNs (optional)
$wgLDAPGroupsPrevail = false; # LDAP groups take precedence over MediaWiki's internal group settings
$wgPluggableAuth_Config['Domain login'] = [
'plugin' => 'LDAPAuthentication2',
'data' => [
'domain' => 'ourfirm.com',
],
];
$wgLDAPPreferences = [
"ourfirm.com" => [
"email" => "mail",
"realname" => "displayname"
]
];
------------------------
ldapprovider.json
{
"ourfirm.com": {
"connection": {
"server": "ldaps.ourfirm.com",
"port": "636",
"user": "<password",
"pass": "<username>",
"enctype": "ssl",
"options": {
"LDAP_OPT_DEREF": 1
},
"basedn": "DC=ourfirm,DC=com",
"groupbasedn": "OU=Groups,OU=Tech,DC=ourfirm,DC=com",
"userbasedn": "OU=Users,OU=Tech,DC=ourfirm,DC=com",
"searchattribute": "sAMAccountName",
"usernameattribute": "sAMAccountName",
"realnameattribute": "displayname",
"emailattribute": "mail"
},
"authorization": {
"rules": {
"groups": {
"required": ["CN=Tech Users,OU=Admin,DC=ourfirm,DC=com"]
}
}
}
}
}
Any help with this would be much appreciated!
Hello. I am trying to develop a MediaWiki extension in PhpStorm, but all imports from MediaWiki, such as use MediaWiki\\MediaWikiServices, are recognized as undefined. How can I resolve this?
Is your PhpStorm project just the extension directory, or the whole mediawiki directory? I think it's more normally the latter.
It is open only in the extensions directory.
I think it'd be easier to open the project as the whole MediaWiki directory, rather than figure out a way to get PhpStorm to index the rest of the files without doing that. Maybe someone else has a better idea though. :)
How to restrict special characters in summary while uploading file?