Topic on Project:Support desk

Problems loading the wiki on Windows

10
Cible30 (talkcontribs)

Hello, i moved my wiki from Debian to Windows. I use XAMPP (php 7.4) and i had the folder (named wiki) containing the file system of the wiki on xampp/htdocs. I also removed the folder of 2 extension (and their localsetting line) that gived a warning.

When i write localhost/wiki it gives the following error:

MediaWiki internal error.

Original exception: [cedf8c6d6bc85e98eb987394] /wiki/ Wikimedia\Rdbms\DBConnectionError from line 1380 of C:\xampp1\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php: Cannot access the database: Unknown error (127.0.0.1) Backtrace:

  1. 0 C:\xampp1\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(931): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()
  2. 1 C:\xampp1\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(898): Wikimedia\Rdbms\LoadBalancer->getServerConnection(integer, string, integer)
  3. 2 C:\xampp1\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(1043): Wikimedia\Rdbms\LoadBalancer->getConnection(integer, array, string, integer)
  4. 3 C:\xampp1\htdocs\wiki\includes\GlobalFunctions.php(2576): Wikimedia\Rdbms\LoadBalancer->getMaintenanceConnectionRef(integer, array, string)
  5. 4 C:\xampp1\htdocs\wiki\includes\cache\localisation\LCStoreDB.php(56): wfGetDB(integer)
  6. 5 C:\xampp1\htdocs\wiki\includes\cache\localisation\LocalisationCache.php(441): LCStoreDB->get(string, string)
  7. 6 C:\xampp1\htdocs\wiki\includes\cache\localisation\LocalisationCache.php(487): LocalisationCache->isExpired(string)
  8. 7 C:\xampp1\htdocs\wiki\includes\cache\localisation\LocalisationCache.php(363): LocalisationCache->initLanguage(string)
  9. 8 C:\xampp1\htdocs\wiki\includes\cache\localisation\LocalisationCache.php(304): LocalisationCache->loadItem(string, string)
  10. 9 C:\xampp1\htdocs\wiki\languages\Language.php(4413): LocalisationCache->getItem(string, string)
  11. 10 C:\xampp1\htdocs\wiki\languages\Language.php(265): Language::getFallbacksFor(string)
  12. 11 C:\xampp1\htdocs\wiki\languages\Language.php(225): Language::newFromCode(string)
  13. 12 C:\xampp1\htdocs\wiki\includes\ServiceWiring.php(163): Language::factory(string)
  14. 13 C:\xampp1\htdocs\wiki\includes\libs\services\ServiceContainer.php(458): Wikimedia\Services\ServiceContainer->{closure}(MediaWiki\MediaWikiServices)
  15. 14 C:\xampp1\htdocs\wiki\includes\libs\services\ServiceContainer.php(427): Wikimedia\Services\ServiceContainer->createService(string)
  16. 15 C:\xampp1\htdocs\wiki\includes\MediaWikiServices.php(540): Wikimedia\Services\ServiceContainer->getService(string)
  17. 16 C:\xampp1\htdocs\wiki\includes\Setup.php(801): MediaWiki\MediaWikiServices->getContentLanguage()
  18. 17 C:\xampp1\htdocs\wiki\includes\WebStart.php(81): require_once(string)
  19. 18 C:\xampp1\htdocs\wiki\index.php(41): require(string)
  20. 19 {main}

Exception caught inside exception handler: [cedf8c6d6bc85e98eb987394] /wiki/ Wikimedia\Rdbms\DBConnectionError from line 1380 of C:\xampp1\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php: Cannot access the database: Unknown error (127.0.0.1) Backtrace:

  1. 0 C:\xampp1\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(931): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()
  2. 1 C:\xampp1\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(898): Wikimedia\Rdbms\LoadBalancer->getServerConnection(integer, string, integer)
  3. 2 C:\xampp1\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(1043): Wikimedia\Rdbms\LoadBalancer->getConnection(integer, array, string, integer)
  4. 3 C:\xampp1\htdocs\wiki\includes\GlobalFunctions.php(2576): Wikimedia\Rdbms\LoadBalancer->getMaintenanceConnectionRef(integer, array, string)
  5. 4 C:\xampp1\htdocs\wiki\includes\cache\localisation\LCStoreDB.php(56): wfGetDB(integer)
  6. 5 C:\xampp1\htdocs\wiki\includes\cache\localisation\LocalisationCache.php(386): LCStoreDB->get(string, string)
  7. 6 C:\xampp1\htdocs\wiki\includes\cache\localisation\LocalisationCache.php(304): LocalisationCache->loadItem(string, string)
  8. 7 C:\xampp1\htdocs\wiki\languages\Language.php(4413): LocalisationCache->getItem(string, string)
  9. 8 C:\xampp1\htdocs\wiki\languages\Language.php(265): Language::getFallbacksFor(string)
  10. 9 C:\xampp1\htdocs\wiki\languages\Language.php(225): Language::newFromCode(string)
  11. 10 C:\xampp1\htdocs\wiki\includes\ServiceWiring.php(163): Language::factory(string)
  12. 11 C:\xampp1\htdocs\wiki\includes\libs\services\ServiceContainer.php(458): Wikimedia\Services\ServiceContainer->{closure}(MediaWiki\MediaWikiServices)
  13. 12 C:\xampp1\htdocs\wiki\includes\libs\services\ServiceContainer.php(427): Wikimedia\Services\ServiceContainer->createService(string)
  14. 13 C:\xampp1\htdocs\wiki\includes\MediaWikiServices.php(540): Wikimedia\Services\ServiceContainer->getService(string)
  15. 14 C:\xampp1\htdocs\wiki\includes\ServiceWiring.php(440): MediaWiki\MediaWikiServices->getContentLanguage()
  16. 15 C:\xampp1\htdocs\wiki\includes\libs\services\ServiceContainer.php(458): Wikimedia\Services\ServiceContainer->{closure}(MediaWiki\MediaWikiServices)
  17. 16 C:\xampp1\htdocs\wiki\includes\libs\services\ServiceContainer.php(427): Wikimedia\Services\ServiceContainer->createService(string)
  18. 17 C:\xampp1\htdocs\wiki\includes\MediaWikiServices.php(738): Wikimedia\Services\ServiceContainer->getService(string)
  19. 18 C:\xampp1\htdocs\wiki\includes\cache\MessageCache.php(115): MediaWiki\MediaWikiServices->getMessageCache()
  20. 19 C:\xampp1\htdocs\wiki\includes\exception\MWExceptionRenderer.php(310): MessageCache::singleton()
  21. 20 C:\xampp1\htdocs\wiki\includes\exception\MWExceptionRenderer.php(51): MWExceptionRenderer::reportOutageHTML(Wikimedia\Rdbms\DBConnectionError)
  22. 21 C:\xampp1\htdocs\wiki\includes\exception\MWExceptionHandler.php(121): MWExceptionRenderer::output(Wikimedia\Rdbms\DBConnectionError, integer)
  23. 22 C:\xampp1\htdocs\wiki\includes\exception\MWExceptionHandler.php(195): MWExceptionHandler::report(Wikimedia\Rdbms\DBConnectionError)
  24. 23 C:\xampp1\htdocs\wiki\includes\exception\MWExceptionHandler.php(167): MWExceptionHandler::handleException(Wikimedia\Rdbms\DBConnectionError)
  25. 24 [internal function]: MWExceptionHandler::handleUncaughtException(Wikimedia\Rdbms\DBConnectionError)
  26. 25 {main}
Ciencia Al Poder (talkcontribs)

This is the error: Cannot access the database: Unknown error (127.0.0.1)

Review the database connection settings, check if they are correct. Try to connect to mysql using the database credentials stored in LocalSettings.php through phpmyadmin or a local mysql client

Cible30 (talkcontribs)

Yes thank you, it was easier than i expected.

Now the wiki work but this message stay on top of every page:

"Warning: array_key_exists() expects parameter 2 to be array, null given inC:\xampp1\htdocs\wiki\extensions\Iframe\Iframe_body.phpon line136"


And this that stay on top of the homepage:

"Notice: Trying to access array offset on value of type bool inC:\xampp1\htdocs\wiki\extensions\SemanticMediaWiki\includes\dataitems\SMW_DI_Property.phpon line508"

Cible30 (talkcontribs)

And also when i search a page named "Camponotus vagus" it gives to me this error

"[7cd620d1cfe1c7b70b38f41f] /wiki/index.php/Camponotus_vagus Wikimedia\Rdbms\DBReadOnlyError from line 975 of C:\xampp1\htdocs\wiki\includes\libs\rdbms\database\Database.php: Database is read-only: Dumping Database, Access will be restored shortly"


The DBuser have all privileges on the database

Ciencia Al Poder (talkcontribs)
Cible30 (talkcontribs)

But where i must add that php code?

Ciencia Al Poder (talkcontribs)

If you use the function error_reporting(0); put that in LocalSettings.php

You can edit php.ini and set display_errors = Off to turn off any error reporting (it's recommended to set it to log file instead)

Cible30 (talkcontribs)

Thank you very much for the help!

Ciencia Al Poder (talkcontribs)

The "Database is read-only: Dumping Database, Access will be restored shortly" seems pretty self explanatory.

You probably set the database to readonly, or even set the site to readonly in LocalSettings.php

Cible30 (talkcontribs)

I didn't expect that, i don't remember that line on LocalSetting.php :/