Project:Support desk

Jump to navigation Jump to search

About this board

Welcome to the MediaWiki Support desk, where you can ask MediaWiki questions!

(Read this message in a different language)

See also

Before you post

Post a new question

  1. To help us answer your questions, please indicate which versions you are using, as found on your wiki's Special:Version page:
    • MediaWiki version
    • PHP version
    • Database type and version
  2. Please include the web address (URL) to your wiki if possible. It's often easier for us to identify the source of the problem if we can see the error directly.
  3. To start a new thread, click "Start a new topic".

Question about LDAP Usage on Special site / Create new user Account

2
91.38.157.210 (talkcontribs)

Hi,

I have a question about creating new Users for my restricted Mediawiki. I setup the Wiki with LDAP Authentication. Everything works fine and the user can login with their LDAP (Active Directory) Accounts. When I now want to authorize new LDAP Users on the Special Site – Create new User Account I am not able to “browse” the LDAP Directory to search for the new users. I can put the name into the field and then the User can login, but I would be nice if I could integrate an LDAP browser. I already searched but didn’t find something that points me to the right direction. Can this behavior be archived?


OS: CentOS 8

Mediawiki Version 1.36

MySQL Server 7.4.26

Apache WebServer 2.4.37


Extensions:

LDAPAuthentication2

LDAPAuthorization

LDAPGroups

LDAPProvider

LDAPUserInfo

OAuth

ParserFunctions

PluggableAuth

91.38.157.210 (talkcontribs)

Has nobody an idea on this or do you need more information?

Reply to "Question about LDAP Usage on Special site / Create new user Account"

Why is "Content pages" in Special:Statistics 0?

8
AnonymousStackOverflow (talkcontribs)

MediaWiki version: 1.37.0

PHP version: 8.0.13

SQLite version: 3.33.0

When I go to Special:Statistics, "Content pages" is 0 even though I have some mainspace pages, and so is "Active users". All other values are correct.

The incorrect statistics page
Active users page showing more then 0 active users
All pages which shows that I have more then 0 mainspace pages
Malyacko (talkcontribs)
AnonymousStackOverflow (talkcontribs)

I set the value to "any" and it still isn't working. It also doesn't explain why the active users count is 0.

This post was hidden by AnonymousStackOverflow (history)
Bawolff (talkcontribs)
AnonymousStackOverflow (talkcontribs)

That fixed the content pages, but didn't fix active users.

Samwilson (talkcontribs)

There's a separate --active flag for that:

php maintenance/initSiteStats.php --update --active
This post was hidden by AnonymousStackOverflow (history)
Reply to "Why is "Content pages" in Special:Statistics 0?"

Unparenthesized `a ? b : c ?: d` is not supported

2
Salas58 (talkcontribs)

Today when I opened my Wiki, I got the following error:

Fatal error: Unparenthesized `a ? b : c ?: d` is not supported. Use either `(a ? b : c) ?: d` or `a ? b : (c ?: d)` in /var/www/lutwik.com/includes/page/Article.php on line 822

I found the following code starting on line 822 of that file:

$pOutput = ( $outputDone instanceof ParserOutput )

// phpcs:ignore MediaWiki.Usage.NestedInlineTernary.UnparenthesizedTernary -- FIXME T203805

? $outputDone // object fetched by hook

: $this->mParserOutput ?: null; // ParserOutput or null, avoid false

I added parens to the last line, which I think is what I'm supposed to do:

: ($this->mParserOutput ?: null);

but I still get the same error.

Stack Overflow has a couple of entries about this: https://stackoverflow.com/questions/61432488/php-error-unparenthesized-a-b-c-d-e-is-deprecated-use-either-a?noredirect=1&lq=1, but I think I did it correctly.

How can I fix this?

Bawolff (talkcontribs)

Upgrade to at least mediawiki 1.33

Reply to "Unparenthesized `a ? b : c ?: d` is not supported"

How to can I use wordpress blog with mediawiki in same ip

4
180.230.13.129 (talkcontribs)

I use ubuntu 20.04, apache2, mediawiki, php 8.0.

I was used to mediawiki spesific domain.

and today I want to open wordpress blog same my mediawiki's ip for save money.

I already installed my wordpress files, dns setting goods, sites-available already settings alright, blog floder files locate alright, https done.

but when I enter my blog domain on the browser, connected 'my mediawiki domain'.

I don't know why this happen like this. Can't help google with me.

How do I make my blog's domain appear when I enter my domain in the browser?

Bawolff (talkcontribs)

Your webserver virtualhost settings are probably incorrect.

180.230.13.129 (talkcontribs)

This is writer. I solved this problem myself. I check with command 'a2query -s' and I edited. It's all worked I want to.

Reply to "How to can I use wordpress blog with mediawiki in same ip"

Unclear documentation for Wikibase configuration

5
Hyperreview (talkcontribs)

I'm trying to follow the main guide for installing and configuring the client, here the guide asks to add the following line to the LocalSettings.php: Wikibase/Installation#2. Enable Wikibase Client only

$wgWBClientSettings['repoUrl'] = 'https://pool.my.wiki';

$wgWBClientSettings['repoScriptPath'] = '';

$wgWBClientSettings['repoArticlePath'] = '/wiki/$1';

$wgWBClientSettings['repositories']['']['repoDatabase'] = 'poolwiki';

$wgWBClientSettings['repositories']['']['changesDatabase'] = 'poolwiki';

$wgWBClientSettings['siteLinkGroups'] = [ 'mywikigroup' ];

$wgWBClientSettings['siteGlobalID'] = 'en';


But actually it's not clear why a Client should set up a repo... does it mean that the client can read only from one repo? Is it a cache? Also the example is not very clear... https://pool.my.wiki it's not realistic. Which would be a real example?

Bawolff (talkcontribs)
Hyperreview (talkcontribs)

But so I can use Wikidata as a repo for my wiki or not? This guy says no and reading here I thought it was possible. I've lost a lot of time, maybe the documentation could be made more clear.

Malyacko (talkcontribs)

If you can choose between random folks on internet forums versus official documentation, what's exactly unclear about the official documentation?

Bawolff (talkcontribs)

Which part of "If you have your own instance of MediaWiki, you can't use Wikidata's data using these features." (From the page you linked to) was unclear?

Reply to "Unclear documentation for Wikibase configuration"
Patjacdil (talkcontribs)

Hi

I am running MediaWiki on Synology DS414 NAS. I recently update MediaWiki, PHP and MariaDB using standard Synology update process. Since this update I cannot access any more to my Wiki, I receive the following error message


$wgShowExceptionDetails = true; MediaWiki internal error.

Original exception: [ed07867d352d2e5c2b0e1e8c] 2021-12-14 13:16:07: Fatal exception of type "Wikimedia\Rdbms\DBConnectionError"

Exception caught inside exception handler.

Set $wgShowExceptionDetails = true; at the bottom of LocalSettings.php to show detailed debugging information.


I try to add $wgShowExceptionDetails = true in the LocalSetting.php to get detailed infos but with no success.

I also run php update.php and I got also some errors accessing the database:

root@DS414-PDI:/volume1/web/mediawiki/maintenance# php update.php PHP Warning: PHP Startup: Unable to load dynamic library 'mcrypt.so' (tried: /usr/local/lib/php73/modules/mcrypt.so (/usr/local/lib/php73/modules/mcrypt.so: cannot open shared object file: No such file or directory), /usr/local/lib/php73/modules/mcrypt.so.so (/usr/local/lib/php73/modules/mcrypt.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'mcrypt.so' (tried: /usr/local/lib/php73/modules/mcrypt.so (/usr/local/lib/php73/modules/mcrypt.so: cannot open shared object file: No such file or directory), /usr/local/lib/php73/modules/mcrypt.so.so (/usr/local/lib/php73/modules/mcrypt.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'mysql.so' (tried: /usr/local/lib/php73/modules/mysql.so (/usr/local/lib/php73/modules/mysql.so: cannot open shared object file: No such file or directory), /usr/local/lib/php73/modules/mysql.so.so (/usr/local/lib/php73/modules/mysql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 MediaWiki 1.35.3 Updater

Your composer.lock file is up to date with current dependencies! Wikimedia\Rdbms\DBConnectionError from line 1420 of /volume1/web/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php: Cannot access the database: Unknown error (localhost:/run/mysqld/mysqld10.sock)

  1. 0 /volume1/web/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(934): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()
  2. 1 /volume1/web/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(901): Wikimedia\Rdbms\LoadBalancer->getServerConnection(0, 'pdi_wiki-pdiwik...', 4)
  3. 2 /volume1/web/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1046): Wikimedia\Rdbms\LoadBalancer->getConnection(-2, Array, 'pdi_wiki-pdiwik...', 4)
  4. 3 /volume1/web/mediawiki/maintenance/includes/Maintenance.php(1368): Wikimedia\Rdbms\LoadBalancer->getMaintenanceConnectionRef(-2, Array, 'pdi_wiki-pdiwik...')
  5. 4 /volume1/web/mediawiki/maintenance/update.php(141): Maintenance->getDB(-2)
  6. 5 /volume1/web/mediawiki/maintenance/doMaintenance.php(107): UpdateMediaWiki->execute()
  7. 6 /volume1/web/mediawiki/maintenance/update.php(253): require_once('/volume1/web/me...')
  8. 7 {main}


Using phpMyAdmin, I have no problem to access the wiki database.

Software Version
DSM 6.2.4-25556 Update 2
MediaWiki 1.53.3-0144
PHP 7.3.24-0010
MariaDB 10.3.29-0070

I request support to Synology but after access to my NAS, they told me to ask support to MediaWiki.

Any idea to investigate to solve my problem

Thanks in advance

TheDJ (talkcontribs)

That means that for whatever reason, your MediaWiki cannot connect to the database any longer. Have you checked that the database is running ? Can you manually access the database via terminal ? Have you tried enabling MediaWiki debug logging ?

> I request support to Synology but after access to my NAS, they told me to ask support to MediaWiki.

That's just them being lazy. They ship it, it's their packaging, they should help you if there was an upgrade problem. They are a commercial company, they do not get to shove their problems into the hands of volunteers.

Patjacdil (talkcontribs)

To TheDJ

Thanks for your help.

Since your answer, I have add somme informations in may first message about the result of "php update.php" with errors and no problem to access the database using phpMyAdmin.


I just add the "MediaWiki debug logging" in LocalSettings.php and also add the "debug" directory with all the right to access but no debug file is created when i run MediaWiki.

But I made a mistake in inserting "$wgShowExceptionDetails = true;" in LocalSettings.php and now I have the following verbose output when running MediaWiki:


MediaWiki internal error.

Original exception: [b397500f6c9871ed9a9fc6b9] /mediawiki/index.php?title=Accueil Wikimedia\Rdbms\DBConnectionError from line 1420 of /volume1/web/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php: Cannot access the database: Unknown error (localhost:/run/mysqld/mysqld10.sock)

Backtrace:

#0 /volume1/web/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(934): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()

#1 /volume1/web/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(901): Wikimedia\Rdbms\LoadBalancer->getServerConnection(integer, string, integer)

#2 /volume1/web/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1046): Wikimedia\Rdbms\LoadBalancer->getConnection(integer, array, string, integer)

#3 /volume1/web/mediawiki/includes/GlobalFunctions.php(2463): Wikimedia\Rdbms\LoadBalancer->getMaintenanceConnectionRef(integer, array, string)

#4 /volume1/web/mediawiki/includes/cache/localisation/LCStoreDB.php(56): wfGetDB(integer)

#5 /volume1/web/mediawiki/includes/cache/localisation/LocalisationCache.php(449): LCStoreDB->get(string, string)

#6 /volume1/web/mediawiki/includes/cache/localisation/LocalisationCache.php(495): LocalisationCache->isExpired(string)

#7 /volume1/web/mediawiki/includes/cache/localisation/LocalisationCache.php(371): LocalisationCache->initLanguage(string)

#8 /volume1/web/mediawiki/includes/cache/localisation/LocalisationCache.php(312): LocalisationCache->loadItem(string, string)

#9 /volume1/web/mediawiki/includes/language/LanguageFallback.php(106): LocalisationCache->getItem(string, string)

#10 /volume1/web/mediawiki/includes/language/LanguageFactory.php(175): MediaWiki\Languages\LanguageFallback->getAll(string)

#11 /volume1/web/mediawiki/includes/language/LanguageFactory.php(121): MediaWiki\Languages\LanguageFactory->newFromCode(string)

#12 /volume1/web/mediawiki/includes/ServiceWiring.php(241): MediaWiki\Languages\LanguageFactory->getLanguage(string)

#13 /volume1/web/mediawiki/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer->{closure}(MediaWiki\MediaWikiServices)

#14 /volume1/web/mediawiki/vendor/wikimedia/services/src/ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService(string)

#15 /volume1/web/mediawiki/includes/MediaWikiServices.php(623): Wikimedia\Services\ServiceContainer->getService(string)

#16 /volume1/web/mediawiki/includes/Setup.php(700): MediaWiki\MediaWikiServices->getContentLanguage()

#17 /volume1/web/mediawiki/includes/WebStart.php(89): require_once(string)

#18 /volume1/web/mediawiki/index.php(44): require(string)

#19 {main}

Exception caught inside exception handler: [b397500f6c9871ed9a9fc6b9] /mediawiki/index.php?title=Accueil Wikimedia\Rdbms\DBConnectionError from line 1420 of /volume1/web/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php: Cannot access the database: Unknown error (localhost:/run/mysqld/mysqld10.sock)

Backtrace:

#0 /volume1/web/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(934): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()

#1 /volume1/web/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(901): Wikimedia\Rdbms\LoadBalancer->getServerConnection(integer, string, integer)

#2 /volume1/web/mediawiki/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1046): Wikimedia\Rdbms\LoadBalancer->getConnection(integer, array, string, integer)

#3 /volume1/web/mediawiki/includes/GlobalFunctions.php(2463): Wikimedia\Rdbms\LoadBalancer->getMaintenanceConnectionRef(integer, array, string)

#4 /volume1/web/mediawiki/includes/cache/localisation/LCStoreDB.php(56): wfGetDB(integer)

#5 /volume1/web/mediawiki/includes/cache/localisation/LocalisationCache.php(394): LCStoreDB->get(string, string)

#6 /volume1/web/mediawiki/includes/cache/localisation/LocalisationCache.php(312): LocalisationCache->loadItem(string, string)

#7 /volume1/web/mediawiki/includes/language/LanguageFallback.php(106): LocalisationCache->getItem(string, string)

#8 /volume1/web/mediawiki/includes/language/LanguageFactory.php(175): MediaWiki\Languages\LanguageFallback->getAll(string)

#9 /volume1/web/mediawiki/includes/language/LanguageFactory.php(121): MediaWiki\Languages\LanguageFactory->newFromCode(string)

#10 /volume1/web/mediawiki/includes/ServiceWiring.php(241): MediaWiki\Languages\LanguageFactory->getLanguage(string)

#11 /volume1/web/mediawiki/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer->{closure}(MediaWiki\MediaWikiServices)

#12 /volume1/web/mediawiki/vendor/wikimedia/services/src/ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService(string)

#13 /volume1/web/mediawiki/includes/MediaWikiServices.php(623): Wikimedia\Services\ServiceContainer->getService(string)

#14 /volume1/web/mediawiki/includes/ServiceWiring.php(694): MediaWiki\MediaWikiServices->getContentLanguage()

#15 /volume1/web/mediawiki/vendor/wikimedia/services/src/ServiceContainer.php(447): Wikimedia\Services\ServiceContainer->{closure}(MediaWiki\MediaWikiServices)

#16 /volume1/web/mediawiki/vendor/wikimedia/services/src/ServiceContainer.php(416): Wikimedia\Services\ServiceContainer->createService(string)

#17 /volume1/web/mediawiki/includes/MediaWikiServices.php(925): Wikimedia\Services\ServiceContainer->getService(string)

#18 /volume1/web/mediawiki/includes/exception/MWExceptionRenderer.php(329): MediaWiki\MediaWikiServices->getMessageCache()

#19 /volume1/web/mediawiki/includes/exception/MWExceptionRenderer.php(63): MWExceptionRenderer::reportOutageHTML(Wikimedia\Rdbms\DBConnectionError)

#20 /volume1/web/mediawiki/includes/exception/MWExceptionHandler.php(106): MWExceptionRenderer::output(Wikimedia\Rdbms\DBConnectionError, integer)

#21 /volume1/web/mediawiki/includes/exception/MWExceptionHandler.php(185): MWExceptionHandler::report(Wikimedia\Rdbms\DBConnectionError)

#22 /volume1/web/mediawiki/includes/exception/MWExceptionHandler.php(156): MWExceptionHandler::handleException(Wikimedia\Rdbms\DBConnectionError, string)

#23 [internal function]: MWExceptionHandler::handleUncaughtException(Wikimedia\Rdbms\DBConnectionError)

#24 {main}


Any idea?

I agree with for the "nice" answer from Synology.

I use to be a hardware/software engineer (retired now) but not to much familiar with database and php.


thanks again for your help.

Bawolff (talkcontribs)

It sounds like something might be wrong with your php.ini file (especially for the commandline part - sounds like mysqli php extension could not be loaded)

Patjacdil (talkcontribs)

To Bawolff

Thanks for your help.

I don't know which is the used php.ini file, this the list of php.ini found in the system:


/usr/local/etc/php73/cli/php.ini

/usr/local/etc/php72/cli/php.ini

/usr/local/etc/php56/php.ini

/usr/syno/etc/packages/WebStation/php70/php.ini

/usr/syno/etc/packages/WebStation/php56/php.ini

/etc/php/php.ini


My feeling was /etc/php/php.ini the used one. I check if it is the same that /usr/local/etc/php73/cli/php.ini and it wasn't so I save /etc/php/php.ini and I copy /usr/local/etc/php73/cli/php.ini to /etc/php but the with nos success.

I remove any php.ini from /etc/php and the result was the same when I run MediaWiki so I think is not the used one?

An other point is that phpMyAdmin is running with no problem with php 7.3.24 :

  • nginx/1.16.1
  • Version du client de base de données : libmysql - mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $
  • Extension PHP : mysqli curl mbstring
  • Version de PHP : 7.3.24

phpMyAdmin has access to my wiki database with no problem.


Any other idea?

Thanks again

Patjacdil (talkcontribs)

Nobody can help me, No idea? .....

TheDJ (talkcontribs)

> Cannot access the database: Unknown error (localhost:/run/mysqld/mysqld10.sock)

MediaWiki expects there to be a database connection (socket) on /run/mysqld/mysqld10.sock and its not there. We cannot know why.

Reply to "DBConnectionError"
Spiros71 (talkcontribs)

Is there any way to limit the number of page views per x time by visitors/users? Mostly for reasons of bots/scrapers.

I cannot find something like that in Manual:$wgRateLimits

Jonathan3 (talkcontribs)
TheDJ (talkcontribs)

I'm not sure why you need ratelimits on pageviews, but it sounds like maybe you should add edge layer http caching instead.

Reply to "Rate limit page views?"

How to hinder search in trancluded text?

2
Whugemann (talkcontribs)

I manage a MediaWiki with a lot of literature lists that users generated using direct links to the wiki pages instead of categorising the wiki pages. This is not optimal, as many pages appear twice or more when searching for title keywords. I fear this cannot be rolled back.

Luckily, most this literature lists are separate pages that are only referenced/trancuded. (See https://www.colliseum.eu/wiki/Splitterwurfweiten for an example.)

Can I somehow exclude such sections from the wiki search?

Bawolff (talkcontribs)

Probably would need a custom search extension

Reply to "How to hinder search in trancluded text?"

Newbie needs help setting up a wiki

3
Goon32 (talkcontribs)

As the title suggests, I'm new to this and need help setting up a wiki. I have Ubuntu installed so far, but need guidance on all the other stuff needed and I learn best in direct conversation so if anyone's willing to lend a hand you can contact me on Discord, my username's deadgoon64#2443 thanks

Malyacko (talkcontribs)

See the available documentation on this site. If you have specific questions, feel free to bring them up.

Goon32 (talkcontribs)

I've tried that but it just ends up making me disoriented so it'd be nice to have someone there to go over it step-by-step with me

And if I were to bring up all my questions here, I'm afraid I'd clog up the feed and bury the questions of others

Reply to "Newbie needs help setting up a wiki"
122.58.154.222 (talkcontribs)

The wikis degrowthaotearoa and degrowthgreensaotearoa were recently closed. One was last efited on Dec 21st 2021 and the other on Jan 10th 2022. The notification talked about no edits in the last 60 days. I have reopened them.

Malyacko (talkcontribs)

Whatever website you refer to, you need to bring that up on that website.

Reply to "Wikis closed incorrectly."