Project:Support desk

Jump to navigation Jump to search

About this board

vde   Welcome to MediaWiki.org's Support desk, where you can ask MediaWiki questions!

There are also other places where to askCommunication: IRCCommunication#Chat, mailing listsMailing lists, Wikimedia Developer Support, Q&A, mwusers (unofficial forum) etc.

Before you post

Post a new question

  1. To help us answer your questions, please always indicate which versions you are using (reported by your wiki's Special:Version page):
    • MediaWiki
    • PHP
    • Database
  2. Please include the URL of your wiki unless you absolutely can't. It's often a lot easier for us to identify the source of the problem if we can look for ourselves.
  3. To start a new thread, click "Start a new topic".

Restored from backup, wiki showing error persistently (security concern)

6
174.82.103.15 (talkcontribs)

Botched upgrade from 1.31 reverted back to 1.30 with a backup which probably wasn't very comprehensive, since the original backup failed and the backup-backup couldn't even be obtained.

https://wikizilla.org/wiki/Special:RecentChanges


The notice:

Notice: Undefined variable: type in /[...]/wiki/extensions/HeadScript/HeadScript.php on line 3


I have already fixed the issue that this talks about. More than that, I even commented out the extension on LocalSettings.php, turning off error notifications on the .htaccess on the folder containing /wiki/ & the .htaccess on /wiki/ . I've set $wgShowExceptionDetails to false. There is no error_reporting( -1); in there either. php.ini also has error reporting off. Yet this still shows. A dozen other extensions are broken too and recent changes.

174.82.103.15 (talkcontribs)

*and recent changes isn't showing the arrow on the left which allows you to see specific revisions changed.


But please most urgent is figuring out why this isn't updating/how to hide this. Even trying to make every page redirect to a 503.php page in both .htaccess files was completely ignored except for exclusively on the bare website URL... https://wikizilla.org

493Titanollante (talkcontribs)

Changing LocalSettings.php at all seems to get ignored, whereas I know previously it used to be pretty immediate.

Malyacko (talkcontribs)

Which webserver software is used? How did you restart your webserver software so it can pick up the changes you made?

493Titanollante (talkcontribs)

It's on cPanel (non-WHM... shared hosting I think)

Server Name

[blanked out]

cPanel Version 70.0 (build 51)
Apache Version 2.4.33
PHP Version 5.6.36
MySQL Version 5.6.39-cll-lve
Architecture x86_64
Operating System linux

I didn't try / know to or know how to restart it. I don't know if I have to restart Apache ("Apache Version"; got no clue how to even get to that), or should it be linux via SSH ("Operating System"), or if I have to do something else.


I went ahead and edited the Monobook.css mediawiki page to move the entire mediawiki body up so that the notice is hidden (but still visible when loading any page on the site) as a temporary non-solution fix.

AhmadF.Cheema (talkcontribs)

Can you once more make sure that you're making changes to the correct LocalSettings.php file?🤔

Reply to "Restored from backup, wiki showing error persistently (security concern)"

Error in update from 1.23.11 to 1.32.0

1
RrogersCalibr (talkcontribs)

I've been working on migrating my wiki from one server to another. The old server is on version 1.23.11, while the new server I'm attempting to migrate has version 1.32.0. When attempting to run update.php I get the following output:


"

MediaWiki 1.32.0 Updater

Your composer.lock file is up to date with current dependencies!

Going to run database updates for my_wiki

Depending on the size of your database this may take a while!

Abort with control-c in the next five seconds (skip this countdown with --quick) ... 0

...skipping: 'mwuser' table doesn't exist yet.

...skipping: 'mwuser' table doesn't exist yet.

...skipping: 'pagecontent' table doesn't exist yet.

...sequence logging_log_id_seq already exists.

...sequence page_restrictions_pr_id_seq already exists.

Creating sequence filearchive_fa_id_seq

[71c46908d4ca49beddc58f98] [no req]   Wikimedia\Rdbms\DBQueryError from line 1496 of /var/www/html/wiki/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: CREATE SEQUENCE filearchive_fa_id_seq OWNED BY filearchive.fa_id

Function: Wikimedia\Rdbms\Database::query

Error: 42P01 ERROR:  relation "filearchive" does not exist

Backtrace:

#0 /var/www/html/wiki/includes/libs/rdbms/database/Database.php(1466): Wikimedia\Rdbms\Database->makeQueryException(string, string, string, string)

#1 /var/www/html/wiki/includes/libs/rdbms/database/Database.php(1226): Wikimedia\Rdbms\Database->reportQueryError(string, string, string, string, boolean)

#2 /var/www/html/wiki/includes/installer/PostgresUpdater.php(772): Wikimedia\Rdbms\Database->query(string)

#3 /var/www/html/wiki/includes/installer/DatabaseUpdater.php(485): PostgresUpdater->addSequence(string, string, string)

#4 /var/www/html/wiki/includes/installer/DatabaseUpdater.php(449): DatabaseUpdater->runUpdates(array, boolean)

#5 /var/www/html/wiki/maintenance/update.php(203): DatabaseUpdater->doUpdates(array)

#6 /var/www/html/wiki/maintenance/doMaintenance.php(94): UpdateMediaWiki->execute()

#7 /var/www/html/wiki/maintenance/update.php(248): require_once(string)

#8 {main}

"


If I look at my database, I can see that a 'filearchive' table does exist. I'm not too sure how to proceed from here. Any assistance would be very welcome and appreciated.

Reply to "Error in update from 1.23.11 to 1.32.0"

Where is the data from which the existence of "Sloane's gap" was inferred?

4
Michael Hardy (talkcontribs)

On the page below we find that someone has a list of the frequencies of appearance in oeis of the first ten-thousand positive integers. Given that this has been a topic of several preprints on the arXiv and a section in Wikipedia's article about oeis and the page whose URL appears below, it seems surprising that that that list of frequencies cannot be instantly found on the web. But I've looked around and can't find it. Where is it?

(And is there no contact information for those responsible for maintaining this site?)

oeis.org/wiki/Frequency_of_appearance_in_the_OEIS_database

Malyacko (talkcontribs)

Welcome to the support desk for the MediaWiki software. What makes you think that a random third-party website (oeis.org) is related to MediaWiki / why did you ask this on mediawiki.org?

Michael Hardy (talkcontribs)

I thought I had reached this page within the oeis.org site.

AhmadF.Cheema (talkcontribs)

Sites using MediaWiki often keep the default hyperlink of the "Help" button in the sidebar. That hyperlink leads to Help:Contents which displays near the top, a note mentioning that we might be unable to help with issues not related to MediaWiki software.

This is an often-made mistake.🤔

Reply to "Where is the data from which the existence of "Sloane's gap" was inferred?"
Zissouu (talkcontribs)

So I have been running into an issue with a mediawiki installation. I tried rolling back to 1.31.1 from 1.32 since I was running into issues but upon install I recieve this error and I can't seem to resolve it. I appreciate any help and thank you in advance

  • Setting up database... done
  • Creating tables... [b2e8f96f6b18d66046f58c42] /wiki/mw-config/index.php?page=Install Wikimedia\Rdbms\DBQueryError from line 1457 of C:\xampp\htdocs\wiki\includes\libs\rdbms\database\Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? Query: CREATE TABLE `user` ( user_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, user_name varchar(255) binary NOT NULL default '', user_real_name varchar(255) binary NOT NULL default '', user_password tinyblob NOT NULL, user_newpassword tinyblob NOT NULL, user_newpass_time binary(14), user_email tinytext NOT NULL, user_touched binary(14) NOT NULL default '', user_token binary(32) NOT NULL default '', user_email_authenticated binary(14), user_email_token binary(32), user_email_token_expires binary(14), user_registration binary(14), user_editcount int, user_password_expires varbinary(14) DEFAULT NULL ) ENGINE=InnoDB, DEFAULT CHARSET=binary Function: Wikimedia\Rdbms\Database::sourceFile( C:\xampp\htdocs\wiki/maintenance/tables.sql ) Error: 1050 Table 'user' already exists (localhost) Backtrace: #0 C:\xampp\htdocs\wiki\includes\libs\rdbms\database\Database.php(1427): Wikimedia\Rdbms\Database->makeQueryException(string, integer, string, string) #1 C:\xampp\htdocs\wiki\includes\libs\rdbms\database\Database.php(1200): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean) #2 C:\xampp\htdocs\wiki\includes\libs\rdbms\database\Database.php(4194): Wikimedia\Rdbms\Database->query(string, string) #3 C:\xampp\htdocs\wiki\includes\libs\rdbms\database\Database.php(4129): Wikimedia\Rdbms\Database->sourceStream(resource (closed), NULL, NULL, string, NULL) #4 C:\xampp\htdocs\wiki\includes\installer\DatabaseInstaller.php(225): Wikimedia\Rdbms\Database->sourceFile(string) #5 C:\xampp\htdocs\wiki\includes\installer\DatabaseInstaller.php(248): DatabaseInstaller->stepApplySourceFile(string, string, boolean) #6 C:\xampp\htdocs\wiki\includes\installer\Installer.php(1575): DatabaseInstaller->createTables(MysqlInstaller) #7 C:\xampp\htdocs\wiki\includes\installer\WebInstallerInstall.php(44): Installer->performInstallation(array, array) #8 C:\xampp\htdocs\wiki\includes\installer\WebInstaller.php(281): WebInstallerInstall->execute() #9 C:\xampp\htdocs\wiki\mw-config\index.php(79): WebInstaller->execute(array) #10 C:\xampp\htdocs\wiki\mw-config\index.php(38): wfInstallerMain() #11 {main} Notice: Uncommitted DB writes (transaction from DatabaseInstaller::stepApplySourceFile). in C:\xampp\htdocs\wiki\includes\libs\rdbms\database\Database.php on line 4543
Ciencia Al Poder (talkcontribs)

Looks like the database you selected already contains a "user" table, and the installer is trying to create it again.

MediaWiki can't be downgraded once you've run the upgrade script. You should restore a backup from before the upgrade.

Reply to "Error in setup"

Moving MediaWiki from Linux to Windows and updating

5
80.147.223.128 (talkcontribs)

Hi! Currently I host my MediaWiki on an Ubuntu Server. I would like to Upgrade the wiki to the 1.32 Version and move it to my Windows Server.

What I tried doing was creating a new Wiki on the Win-Server, creating a dump from mysql of the Linux Server and importing it manually to the new db (since phpmyadmin Import did not want to work). Changed the Settings so that they link to the new database but in the end it did not work.

Is there a proper way to migrate from Linux to Windows and upgrade? Did anyone already do this?

Osnard (talkcontribs)

Actually your approach seems to be correct. I have moved a lot of wikis between different servers (even Linux to Windows and vice versa) with that procedure:

  1. Dump database using mysqldump CLI tool on source server
  2. Copy over complete codebase + all configuration files (e.g. LocalSettings.php) from source to destination server
  3. Import database using mysql CLI tool on destination server
  4. Maybe adapt configuration redarding database ($wgDB*) and server ($wgServer)
195.85.237.130 (talkcontribs)

I am getting following Error:


Fatal error: Uncaught TypeError: Argument 1 passed to MWExceptionHandler::report() must be an instance of Exception, instance of Error given, called in C:\xampp\htdocs\wiki\includes\Exception.php on line 569 and defined in C:\xampp\htdocs\wiki\includes\Exception.php:482 Stack trace: #0 C:\xampp\htdocs\wiki\includes\Exception.php(569): MWExceptionHandler::report(Object(Error)) #1 [internal function]: MWExceptionHandler::handle(Object(Error)) #2 {main} thrown in C:\xampp\htdocs\wiki\includes\Exception.php on line 482


Since it was not me who originally made our Wiki, I do not know much about it. On the Linux server there is obviously a folder called "Wiki" in the www and a folder called WikiMedia in the var/data (Does anyone know what that Folder does and where I need to set a Path to it in the LocalSettings.php?)

195.85.237.130 (talkcontribs)

Okay. To update this. What I actually did now was create a fresh wiki (1.32) on windows and then start the config file again with the Database from my Linux that I dumped. The config saw that it was another version and updated it. After the update, I got all the pages as they are on the Linux wiki, just that they all DO NOT HAVE any text. I literally got every page but blank. I ran the update.php script, which walked through for about 15 minutes and finished successfully but the text is still not there.


What is wrong with the db, how can I restore my text?

AhmadF.Cheema (talkcontribs)

When you click on "Edit" for a page, is the text content visible there, or is it absent from there too?

Reply to "Moving MediaWiki from Linux to Windows and updating"

Unable to use website! - (Cannot access the database)

2
103.252.57.45 (talkcontribs)

So I'm hosting a mediawiki image on an Azure VM (apache2 webserver, mysql database, mediawiki webapplication). Basically the VM ran out of $$$ and shutdown. I then paid more $$$ for more time allowing me to 'Start' the VM.


After spinning it up and trying to access the website, I get hit with 500 status error looking like this:


Sorry! This site is experiencing technical difficulties.

Try waiting a few minutes and reloading.

(Cannot access the database)


Here is the backtrace:

#0 /opt/bitnami/apps/mediawiki/htdocs/includes/libs/rdbms/loadbalancer/LoadBalancer.php(769): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()
#1 /opt/bitnami/apps/mediawiki/htdocs/includes/GlobalFunctions.php(2694): Wikimedia\Rdbms\LoadBalancer->getConnection(0, Array, false)
#2 /opt/bitnami/apps/mediawiki/htdocs/includes/cache/localisation/LCStoreDB.php(54): wfGetDB(-1)
#3 /opt/bitnami/apps/mediawiki/htdocs/includes/cache/localisation/LocalisationCache.php(410): LCStoreDB->get('en', 'deps')
#4 /opt/bitnami/apps/mediawiki/htdocs/includes/cache/localisation/LocalisationCache.php(456): LocalisationCache->isExpired('en')
#5 /opt/bitnami/apps/mediawiki/htdocs/includes/cache/localisation/LocalisationCache.php(375): LocalisationCache->initLanguage('en')
#6 /opt/bitnami/apps/mediawiki/htdocs/includes/cache/localisation/LocalisationCache.php(294): LocalisationCache->loadSubitem('en', 'messages', 'title-invalid-e...')
#7 /opt/bitnami/apps/mediawiki/htdocs/languages/Language.php(2643): LocalisationCache->getSubitem('en', 'messages', 'title-invalid-e...')
#8 /opt/bitnami/apps/mediawiki/htdocs/includes/cache/MessageCache.php(970): Language->getMessage('title-invalid-e...')
#9 /opt/bitnami/apps/mediawiki/htdocs/includes/cache/MessageCache.php(928): MessageCache->getMessageForLang(Object(LanguageEn), 'title-invalid-e...', false, Array)
#10 /opt/bitnami/apps/mediawiki/htdocs/includes/cache/MessageCache.php(870): MessageCache->getMessageFromFallbackChain(Object(LanguageEn), 'title-invalid-e...', false)
#11 /opt/bitnami/apps/mediawiki/htdocs/includes/Message.php(1299): MessageCache->get('title-invalid-e...', false, Object(LanguageEn))
#12 /opt/bitnami/apps/mediawiki/htdocs/includes/Message.php(851): Message->fetchMessage()
#13 /opt/bitnami/apps/mediawiki/htdocs/includes/Message.php(943): Message->toString('text')
#14 /opt/bitnami/apps/mediawiki/htdocs/includes/title/MalformedTitleException.php(49): Message->text()
#15 /opt/bitnami/apps/mediawiki/htdocs/includes/title/MediaWikiTitleCodec.php(297): MalformedTitleException->__construct('title-invalid-e...', '')
#16 /opt/bitnami/apps/mediawiki/htdocs/includes/Title.php(3748): MediaWikiTitleCodec->splitTitleString('', 0)
#17 /opt/bitnami/apps/mediawiki/htdocs/includes/Title.php(377): Title->secureAndSplit()
#18 /opt/bitnami/apps/mediawiki/htdocs/includes/MediaWiki.php(83): Title::newFromURL('')
#19 /opt/bitnami/apps/mediawiki/htdocs/includes/MediaWiki.php(140): MediaWiki->parseTitle()
#20 /opt/bitnami/apps/mediawiki/htdocs/includes/MediaWiki.php(776): MediaWiki->getTitle()
#21 /opt/bitnami/apps/mediawiki/htdocs/includes/MediaWiki.php(517): MediaWiki->main()
#22 /opt/bitnami/apps/mediawiki/htdocs/index.php(48): MediaWiki->run()
#23 {main}


There are no logs made in apache2.


Any help would be most appreciated!!!

Ciencia Al Poder (talkcontribs)

The error seems very descriptive: Cannot access the database

Is mysql up and running? Can you access it from command line or phpmyadmin?

Reply to "Unable to use website! - (Cannot access the database)"

Persistent 504 gateway errors on editing pages - never on reading

11
Antek Baranski (talkcontribs)

Hi there,

I am very new to MediaWiki, never touched the thing until this week. :D


I have 8 wikis running on https://www.esportspedia.com and I am having timeout issues on 2 (https://www.esportspedia.com/lol/ and https://pt.esportspedia.com/lol/) of them when submitting a change to a page, the other 6 wikis save pages just fine albeit they are a little slower than I'd like them to be but that's not the main problem right now.


The nginx/fpm-php frontend runs on its own 8CPU 16GB RAM system and the databases & `runJobs` scripts for the 8 wikis run on a 16CPU 32GB RAM system.


I've looked at increasing the fpm-php timeout to 300 and also tried using `set_time_limit(120);` in my LocalSettings.php but neither option appears to have any impact what so ever.

Examknow (talkcontribs)

I looked on your site and found nothing wrong with it. Maybe it is your computer.

Antek Baranski (talkcontribs)

Is that a serious answer or are you just a troll?

Examknow (talkcontribs)

@Antek Baranski No I am definitely not a troll. It is my mission to keep wikis free of trolls. If you check your site maybe on another computer, then it might work. However as far as I can see there is nothing wrong. Also I noticed that you are hosting on a hosting provider. If you have further issues, you should let them know.

Antek Baranski (talkcontribs)

The behaviour only occurs when you EDIT pages as I wrote in the first post, and its been confirmed by at least 12+ people, so how you were able to verify this I don't understand because unless you are already registered as a contributor you won't be able to edit anything.


As for hosting, the wikis are running on an EC2 instance behind CloudFlare, so I am not entirely sure what you mean by a `hosting provider`.

Examknow (talkcontribs)

Okay never mind. I am going to remove myself before a dispute arises. Please do not reply to me any further.

Ciencia Al Poder (talkcontribs)

How long does it take when you submit the edit until you get the 504 error? Does it match the configured timeout? It could be on different layers: Cloudflare has a timeout, the webserver (nginx, apache...) another, php-fpm another... You'll hit the lowest value from all of them.

About the slowness, I'm not sure if setting a debug log for a couple of requests would give timestamps on the debug log, which should give some indication on where it seems to spend most of the time. Manual:Profiling would definitively help in diagnosing the problem.

Antek Baranski (talkcontribs)

The timeout occurs on 2 fronts, CloudFlare & php-fpm.


CloudFlare responds that the 'nginx' server replied with a 504 after 60 seconds which is the default nginx proxy timeout, which if memory serves me right is what is used when passing a request on to php-fpm, I've bumped up nginx timeouts like this:

        client_header_timeout 300;

        client_body_timeout 300;

        fastcgi_read_timeout 300;

        proxy_read_timeout 300;

        proxy_send_timeout 300;

And I also modified the php & php-fpm timeouts to be 300 seconds.


On the php-fpm I am seeing the following 5 recurrent issues:

[19-Feb-2019 16:17:38 UTC] PHP Fatal error:  Maximum execution time of 300 seconds exceeded in /home/docs/master_wiki/includes/exception/MWExceptionHandler.php on line 521

[19-Feb-2019 17:58:58 UTC] PHP Fatal error:  Maximum execution time of 300 seconds exceeded in /home/docs/master_wiki/includes/exception/MWExceptionHandler.php on line 388

[19-Feb-2019 16:27:01 UTC] PHP Fatal error:  Maximum execution time of 300 seconds exceeded in /home/docs/master_wiki/includes/exception/MWExceptionHandler.php on line 154

[19-Feb-2019 18:03:35 UTC] PHP Fatal error:  Maximum execution time of 300 seconds exceeded in /home/docs/master_wiki/includes/json/FormatJson.php on line 144

[19-Feb-2019 18:53:01 UTC] PHP Fatal error:  Maximum execution time of 300 seconds exceeded in /home/docs/master_wiki/includes/exception/MWExceptionHandler.php on line 154


None of those changes seems to have had any meaningful impact

Ciencia Al Poder (talkcontribs)

Try the debug log thing. Set up a debug log, perform an action that takes that long time, and disable it. Then inspect its contents and try to identify any possible problem from the log.

Antek Baranski (talkcontribs)

@Ciencia Al Poder thanks for that tip, the SQL debug log showed the reason for the timeouts.


Apparently every page edit on the wiki triggers a SELECT statement to be fired against the database for every single image on the wiki, this happens after the actual page edit is saved as the changes are persisted.


On the https://www.esportspedia.com/lol wiki, that is a massive 30K SELECT statements being fired by MW against the DB one after the other, even with the DB server being configured to have all data cache in memory, running 30K queries one-by-one is going to take a while which in turn causes the time outs.


Now the obvious question is, why would an individual page edit cause these SELECT statements to begin with?

Below is a sample of the SELECT statements being fired after an edit:

[DBQuery] lolpt_wiki SELECT /* LinkCache::fetchPageRow  */  page_id,page_len,page_is_redirect,page_latest,page_content_model,page_touched  FROM `page`    WHERE page_namespace = '6' AND page_title = 'ASE_2014_logo_small.png'  LIMIT 1  

[objectcache] Rejected set() for lolpt_wiki:page:6:7bec0c289f58cb1f91c8b8cafba04553b9c713c3 due to pending writes.

[DBQuery] lolpt_wiki SELECT /* Wikimedia\Rdbms\Database::query  */         MIN(rev_timestamp) AS creation_timestamp,

        COUNT(rev_timestamp) AS revision_count

        FROM `revision` WHERE rev_page = 2863

[DBQuery] lolpt_wiki SELECT /* LinkCache::fetchPageRow  */  page_id,page_len,page_is_redirect,page_latest,page_content_model,page_touched  FROM `page`    WHERE page_namespace = '6' AND page_title = 'Veigar_Splash_2.jpg'  LIMIT 1  

[objectcache] Rejected set() for lolpt_wiki:page:6:ad0841858ea15065f25c9db347fefc2cfe0d8734 due to pending writes.

[DBQuery] lolpt_wiki SELECT /* Wikimedia\Rdbms\Database::query  */         MIN(rev_timestamp) AS creation_timestamp,

        COUNT(rev_timestamp) AS revision_count

        FROM `revision` WHERE rev_page = 2864

[DBQuery] lolpt_wiki SELECT /* LinkCache::fetchPageRow  */  page_id,page_len,page_is_redirect,page_latest,page_content_model,page_touched  FROM `page`    WHERE page_namespace = '6' AND page_title = 'Adaptive_Helm.png'  LIMIT 1  

[objectcache] Rejected set() for lolpt_wiki:page:6:4b8983d7295c057cf42451727898ce7f998300a1 due to pending writes.

[DBQuery] lolpt_wiki SELECT /* Wikimedia\Rdbms\Database::query  */         MIN(rev_timestamp) AS creation_timestamp,

        COUNT(rev_timestamp) AS revision_count

        FROM `revision` WHERE rev_page = 2865

[DBQuery] lolpt_wiki SELECT /* LinkCache::fetchPageRow  */  page_id,page_len,page_is_redirect,page_latest,page_content_model,page_touched  FROM `page`    WHERE page_namespace = '6' AND page_title = 'Pr0llyCOL2014.png'  LIMIT 1  

[objectcache] Rejected set() for lolpt_wiki:page:6:3badd71acb2eb57e4edda4eaf35240cf92ca8558 due to pending writes.

[DBQuery] lolpt_wiki SELECT /* Wikimedia\Rdbms\Database::query  */         MIN(rev_timestamp) AS creation_timestamp,

        COUNT(rev_timestamp) AS revision_count

        FROM `revision` WHERE rev_page = 2866

Ciencia Al Poder (talkcontribs)

Are you using some sort of shared file upload configuration? I also experienced something similar on my test wiki, when I pointed uploads to the existing production wiki with a shared upload configuration, although I think this was done by the Manual:Job queue. If that's the case, it may be worth a Bugreport.

Reply to "Persistent 504 gateway errors on editing pages - never on reading"

Issues connecting MySQL container and MediaWiki Container on Docker

5
Squeak24 (talkcontribs)

Hi All

I am tryingto install MediaWiki using Docker. I am using Windows, but want to use Docker so I have more scope of what I can do. Long term I want to create my own image so I can have Parsoid and GraphViz running on it.

The issue I am getting is when I go onto the database page of the installation I get:

Cannot access the database: php_network_getaddresses: getaddrinfo failed: Name or service not known (mysqlhost).

Check the host, username and password and try again.


I have tried to create my own hostname for the MySQL running the line:

docker run --name=mysql1 -–network=mysqlhost -d mysql/mysql-server

But it comes up with the same error.

To get the container for MediaWiki working I have used:

docker run --name mediawiki -p 80:80 mediawiki

It looks like they are both working, just not talking to each other.

I have tried to link the MySQL up with MediaWiki as detailed on the MediaWiki Docker page using:

docker run --name mediawiki --link wiki:mysql -d mediawiki


But with that I get the error:


C:\Users\User>docker run --name mediawiki --link wiki:mysql -d mediawiki docker: Error response from daemon: Conflict. The container name "/mediawiki" is already in use by container "eb03498d223748379186507fe6d58e1cb7f59f4f2de3e6e1ba863d5b8210bf3c". You have to remove (or rename) that container to be able to reuse that name. See 'docker run --help'.

So I tried:

docker run --name wiki --link wiki:mysql -d mediawiki


But I get the error:

C:\Users\User>docker run --name wiki --link wiki:mysql -d mediawiki docker: Error response from daemon: could not get container for wiki: No such container: wiki. See 'docker run --help'.

Not sure what I am doing wrong, any help is appreciated,


Ciencia Al Poder (talkcontribs)

You use "docker run" to create a new container. Once you do that, you can't use the same name, unless you destroy that container. Try "docker rm mediawiki" to remove it and recreate it again.

Once you have the container created, and stop it, you can start it again with "docker start mediawiki"

Squeak24 (talkcontribs)

I get that, I just can't seem to get the MediaWiki container to talk to the MySQL container. I found this which indicates the MySQL host is mysql in my case.

199.58.99.202 (talkcontribs)

This is an issue for me as well. is there any resolution that has been found?

Ciencia Al Poder (talkcontribs)
Reply to "Issues connecting MySQL container and MediaWiki Container on Docker"
Spiros71 (talkcontribs)

I use PAGENAME in a template as part of a URL. However, when the pagename is more than a word (has space) the URL breaks. Is there a way to use it in a URL safe way?

Notmadewelcome (talkcontribs)

Use Uul0qlni8jnp5kpo, a variant that encodes spaces to make a valid URL

Spiros71 (talkcontribs)

Thank you, I found it here Manual:PAGENAMEE encoding#PAGENAMEE as it was parsed on this page. However, there is one issue, for a phrase (words separated with spaces), the wiki automatically adds an underscore in the URL, so in the search it is encoded with an underscore rather than a space.

Ciencia Al Poder (talkcontribs)
Spiros71 (talkcontribs)
Notmadewelcome (talkcontribs)

When I wanted to couple a wiki with my own website, I used .htaccess RewriteRule to allow incoming underscores to be treated as space, so I could offer both. This was easier than getting mediawiki to change its approach

Spiros71 (talkcontribs)

Well, in my case it is outgoing URLs to third sites.

Summary by Leaderboard

Out of project scope.

Mcgyver2k (talkcontribs)

I created the page https://wiki.usace.army.mil/NWW but never added any content and I won't be. I would appreciate it if someone with 'rights' could delete it for me. Nothing links to it and nobody has contributed anything to it.

Thank you, Mcgyver2k

Malyacko (talkcontribs)

If you want something deleted on wiki.usace.army.mil you need to contact someone at wiki.usace.army.mil and not at mediawiki.org. :)

Mcgyver2k (talkcontribs)

That's actually where I asked this question, the MilWiki programmers need to fix it so it doesn't show up here on this (civilian) side.

Tropicalkitty (talkcontribs)

The link doesn't work, and for a faster response you could contact administrators from wikis not related to Wikimedia Foundation to request a deletion.

Mcgyver2k (talkcontribs)

I created the page (and asked this question) on the Military Wikipedia domain, that's why the link won't work for you. The MilWiki programmers need to fix it so it doesn't show up here on this (civilian) side.

Malyacko (talkcontribs)

Then you need to contact the "MilWiki programmers" and not us.