Project:Support desk

About this board

Welcome to the MediaWiki Support desk. This is a place where you can ask any questions you have about installing, using or administrating the MediaWiki software.

(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 version of MediaWiki you are using, as found on your wiki's Special:Version page:
  2. If possible, add $wgShowExceptionDetails = true;error_reporting( -1 );ini_set( 'display_errors', 1 ); to LocalSettings.php in order to make MediaWiki show more detailed error messages.
  3. 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.
  4. To start a new thread, click the box with the text "Start a new topic".
202.153.82.194 (talkcontribs)

stop

Reply to "arrow"

upload_tmp_dir - MediaWiki ignores php specified path

8
Arkasha (talkcontribs)

MediaWiki 1.17wmf1
PHP 5.2.12 (apache)
MySQL 5.0.90-log

There is a problem with a temporary folder path resolving.
Php on server side sets this directive as following:
upload_tmp_dir = /home/XXXXX/hdlwiki.com/tmp
and
open_basedir = /home/XXXXX/
However Wiki ignores these directives and tries to use /var/tmp
which is out of the allowed path.
This warning I received during Wiki installation:

     Warning: is_dir() [function.is-dir]: open_basedir restriction in effect.
File(/tmp) is not within the allowed path(s): (/home/XXXXX/) in /home/XXXXX/hdlwiki.com/www/config/Installer.php on line 474 Warning: Your session.save_path value (/tmp) appears to be invalid or is not writable.
PHP needs to be able to save data to this location for correct session operation.

As a result I cannot upload files by url. The system returns an error:

     Warning:  tempnam() [<a href='function.tempnam'>function.tempnam</a>]: open_basedir restriction in effect.
File(/var/tmp/) is not within the allowed path(s): (/home/XXXXX/)in/home/XXXXX/hdlwiki.com/www/includes/upload
/UploadFromUrl.php on line 101

What can be a solution for such problem.

Bawolff (talkcontribs)

Set the TMP (or TEMP or TMPDIR) environment variables for what you want your temp directory. (for the upload by url error)

For the install error, this can be caused if php is configured to store session files in the temp directory (sesssion.save_path in your php.ini). This should cause logins to not work at all, but perhaps only mediawiki is dissallowed, and php session handlers don't have the open_basedir restriction. If you get that warning when installing, but can still log in after the install is done, then the warning is in error, and is a bug in the installer (should probably file a bug about it).

Arkasha (talkcontribs)

Where should I set TMP variable? I have these in my LocalSettings.php

$wgEnableUploads  = true;
$wgAllowCopyUploads = true;
$wgUploadPath = "{$wgScriptPath}/images";
$wgUploadDirectory = "{$IP}/images";
$wgTmpDirectory = "{$wgUploadDirectory}/temp";

$wgGroupPermissions['sysop']['upload_by_url'] = true;

and I still have the above mentioned error. The folders for uploads are all writable. The Special:Upload shows Could not create temporary file. in red.

Bryan (talkcontribs)

putenv("TMP={$wgUploadDirectory}/temp");

UploadFromUrl appears to not support wgTmpDirectory, I believe this is a bug.

Bawolff (talkcontribs)

Really I'd consider it a bug in wfTempDir() function. Imports, and diffs (depending on config) are also affected.

Arkasha (talkcontribs)

Thank you! This solved the problem. Can it be fixed in the following MW release?

Bryan (talkcontribs)

Dunno if the fix will make it into 1.17, but in 1.18 it most likely will.

Narcisgarcia (talkcontribs)

I still see the problem in MediaWiki 1.41.1

  • If you can edit webserver site, you need to configure PHP's sys_temp_dir (this is the server's variable MediaWiki uses!)
  • If you can only edit CMS files, the only workaround is to add
$wgTmpDirectory = ini_get('upload_tmp_dir');
to LocalSettings.php
Reply to "upload_tmp_dir - MediaWiki ignores php specified path"
87.191.161.144 (talkcontribs)

Hi,

we are trying to add a sidebar dropdown to our wiki, but it doesn't work. We tried it by changing Common.js, Vector.css and the sidebar page, butr that didn't work.

Also, we wanted to follow the instructions in this thread, but the extensions wer not available anymore: Topic:Plrdnw4b2i0pxwmb

Can someoone please help a complete Noob?!

Reply to "Sidebar Dropdown"

"The supplied credentials could not be authenticated."

1
136.226.245.33 (talkcontribs)

Hi, I upgraded my mediawiki from version 1.38 to version 1.39. The upgradation is successful.

I got the following error "The supplied credentials could not be authenticated." and no credential box (username and password box) show to me.

I updated the "wgPluggableAuth_Config" as directed and then I was able to see the username and password checkbox but the "keep me logged in" checkbox has on top of username

Can I get any advice on it?

Reply to ""The supplied credentials could not be authenticated.""

strange section indentation Help:Contents

7
Wladek92 (talkcontribs)

i activate numbering of paragraphs in my user preferences. Then when displaying the page itself numbering is:

Sommaire
1 2 Welcome to MediaWiki.org help pages
2.1Reading
2.2Editing
2.3Advanced editing
2.4Collaboration
2.5Personal customization
2.6Wiki administration

Strange: There is nothing between level 1 and level 2 on first line and all is under level 2.

Then making modify source + preview with a forced TOC, all is under level 1:

Sommaire
1Welcome to MediaWiki.org help pages
1.1Reading
1.2Editing
1.3Advanced editing
1.4Collaboration
1.5Personal customization
1.6Wiki administration

Can someone analyse and correct the display ? Thanks. --Christian 🇫🇷 FR (talk) 09:04, 18 May 2024 (UTC)

Malyacko (talkcontribs)

What "page itself"? Please provide clear and full steps to reproduce something somewhere, including URLs.

Wladek92 (talkcontribs)
TheDJ (talkcontribs)

This might have something to do with the change of the heading structure that is rolling out. Although I have proper spacing between the numbers and the titles. I suggest we wait a week or so more, before fixing this to allow changes to settle down.

Wladek92 (talkcontribs)

thanks sometimes things appear strange to me, so I just warn. --Christian 🇫🇷 FR (talk) 10:18, 21 May 2024 (UTC)

Wladek92 (talkcontribs)
Wladek92 (talkcontribs)
Reply to "strange section indentation Help:Contents"

Can I still attribute my contributions to my account after forgetting to log in?

4
StarGazer909 (talkcontribs)

I rather not have my IP-adress listed, but I forgot to log in. How can I attribute those edits to my account now? It's an IPv6 and the contributions were just a few hours ago so since I am on logged in through the same IPv6 it should be obvious that I am the same person.

TheDJ (talkcontribs)

Generally, you would request the administrators of the specific wiki to remove/suppress those contributions and you can make them again when logged in.

StarGazer909 (talkcontribs)

Thanks but would it not be possible for the administrator to change the user attribution on edits without destroying them?

Leaderboard (talkcontribs)
Reply to "Can I still attribute my contributions to my account after forgetting to log in?"

لقد وجدت ثغرة اختراق

2
Abobakr515 (talkcontribs)

لقد وجدت ثغرة اختراق في موقعكم واريد التواصل معكم ل اخباركم عنها معلومات خاصة

Clump (talkcontribs)
Reply to "لقد وجدت ثغرة اختراق"

How can I make reset in sqlzoo.net?

3
Dax123dax (talkcontribs)

How can I make reset in sqlzoo.net?

I made it before and I want to go through it again.

Dax123dax (talkcontribs)

Deleting cookies doesn't work

Malyacko (talkcontribs)

@Dax123dax Hi, this is mediawiki.org. Why do you think that we know anything about other random websites like "sqlzoo.net"? Because we do not.

Reply to "How can I make reset in sqlzoo.net?"

1.39 how to setup mobile skin?

6
2003:C2:3F21:FD00:9449:AC0F:F20E:94B7 (talkcontribs)

Mediawiki 1.39.6, PHP 7.4.3, MySQL 8.0.36

wfLoadExtension( 'MobileDetect' );
wfLoadExtension( 'MobileFrontend' );
wfLoadSkin( 'MinervaNeue' );
$wgMFDefaultSkinClass = 'SkinMinerva';
$wgDefaultMobileSkin = 'MinervaNeue';
$wgMinervaEnableSiteNotice = true;
$wgMFAutodetectMobileView = true;
$wgMFEditorOptions = array(
        'anonymousEditing' => false,
        'skipPreview' => false
);


Till 1.35 we used to have MinervaNeue as mobile skin. With 1.39, this doesn't work anymore. Mobile devices apparently use the vector skin. What will i have to do to make the mobile skin work?

The mediawiki logfile is full of thousands of lines which don't say nothing to me, by filtering "mobile" i found one interesting line:

[resourceloader] Module "ext.MobileDetect.mobileonly" not loadable on target "mobile".

???

Bawolff (talkcontribs)

Do you have the correct versions of all your extensions? You need 1.39 version of Minerva and MobileFrontend etc.

2003:C2:3F21:FD00:E5D4:4DFC:FAFA:3692 (talkcontribs)

I am quite sure. MobileDetect 2.2 (fc3a66e) 18:49, 11. Feb. 2024, MobileFrontend 2.4.0 (7dc20b0) 07:36, 4. Mär 2024, MinervaNeue – (d515f6a) 08:24, 29. Apr. 2024

These are the versions I get when using ExtensionDistributor and SkinDistributor using target "1.39"

In the desktop browser, skin MinervaNeue has got the look. After login, of course. On my mobile, the skin is s.th. like vector, whether I am logged in or not. This means even when I select MinervaNeue in my user preferences!

Certainly the problem is sitting here in front of my screen, but I've got no more ideas where to look.

Pspviwki (talkcontribs)

How about $wgDefaultMobileSkin = 'minerva';

2003:C2:3F3F:4A00:49D7:2504:A269:1D1 (talkcontribs)

This answer is not helpful. In fact, may you be volunteers or not, this is exactly the kind of answer that makes me angry. This is exactly the kind of support that is superfluous. "Why do you want to use x, use y" is intolerable.

We used to have MinervaNeue as mobile skin for years and years. It used to work for years and years. Now with the upgrade it does not work anymore. You tell me I should use another skin. I am upset, i am outraged. If it does not work THEN DO NOT OFFER IT.

2003:C2:3F3F:4A00:B4E7:5E4:D871:A6EB (talkcontribs)

f***, te name of the skin is MinervaNeue but the value of the parameter is minerva. But, it has been working for years and years so obviously some sort of braniac must have changed it. Those kind of modifications are making me ill. Thanks for the conversation.

Reply to "1.39 how to setup mobile skin?"

Error "Cannot access the database"

4
NowInHD (talkcontribs)

Hello! I recently messed up. A few days ago, I shut down my PC without stopping Apache or MySQL, which I have been running through XAMPP to use MediaWiki. I think this caused issues with MySQL, since when I tried running it again, it kept crashing and refusing to load any pages. I have since reinstalled XAMPP and copied over the MediaWiki and MySQL data folders, and MySQL is no longer crashing, however i am now getting the following error when trying to access my wiki:

MediaWiki internal error.

Original exception: [2e740f7107b90c8fdf67f407] /wiki/ Wikimedia\Rdbms\DBConnectionError: Cannot access the database: Access denied for user 'wikiuser'@'localhost' (using password: YES) (localhost)

Backtrace:

from C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(1149)

#0 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(805): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()

#1 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(793): Wikimedia\Rdbms\LoadBalancer->getServerConnection(integer, string, integer)

#2 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\libs\rdbms\database\DBConnRef.php(99): Wikimedia\Rdbms\LoadBalancer->getConnectionInternal(integer, array, string, integer)

#3 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\libs\rdbms\database\DBConnRef.php(117): Wikimedia\Rdbms\DBConnRef->ensureConnection()

#4 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\libs\rdbms\database\DBConnRef.php(710): Wikimedia\Rdbms\DBConnRef->__call(string, array)

#5 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\libs\rdbms\database\Database.php(2760): Wikimedia\Rdbms\DBConnRef->getSessionLagStatus()

#6 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\user\User.php(526): Wikimedia\Rdbms\Database::getCacheSetOptions(Wikimedia\Rdbms\DBConnRef)

#7 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\libs\objectcache\wancache\WANObjectCache.php(1725): MediaWiki\User\User->MediaWiki\User\{closure}(boolean, integer, array, NULL, array)

#8 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\libs\objectcache\wancache\WANObjectCache.php(1556): WANObjectCache->fetchOrRegenerate(string, integer, Closure, array, array)

#9 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\user\User.php(522): WANObjectCache->getWithSetCallback(string, integer, Closure, array)

#10 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\user\User.php(480): MediaWiki\User\User->loadFromCache()

#11 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\user\User.php(412): MediaWiki\User\User->loadFromId(integer)

#12 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\session\UserInfo.php(92): MediaWiki\User\User->load()

#13 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\session\CookieSessionProvider.php(127): MediaWiki\Session\UserInfo::newFromId(string)

#14 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\session\SessionManager.php(538): MediaWiki\Session\CookieSessionProvider->provideSessionInfo(MediaWiki\Request\WebRequest)

#15 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\session\SessionManager.php(244): MediaWiki\Session\SessionManager->getSessionInfoForRequest(MediaWiki\Request\WebRequest)

#16 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\Request\WebRequest.php(840): MediaWiki\Session\SessionManager->getSessionForRequest(MediaWiki\Request\WebRequest)

#17 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\session\SessionManager.php(165): MediaWiki\Request\WebRequest->getSession()

#18 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\Setup.php(486): MediaWiki\Session\SessionManager::getGlobalSession()

#19 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\WebStart.php(92): require_once(string)

#20 C:\Users\Aven\Desktop\xampp\htdocs\wiki\index.php(44): require(string)

#21 {main}

Exception caught inside exception handler: [2e740f7107b90c8fdf67f407] /wiki/ Wikimedia\Rdbms\DBConnectionError: Cannot access the database: Access denied for user 'wikiuser'@'localhost' (using password: YES) (localhost)

Backtrace:

from C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(1149)

#0 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(805): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()

#1 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\libs\rdbms\loadbalancer\LoadBalancer.php(793): Wikimedia\Rdbms\LoadBalancer->getServerConnection(integer, string, integer)

#2 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\libs\rdbms\database\DBConnRef.php(99): Wikimedia\Rdbms\LoadBalancer->getConnectionInternal(integer, array, string, integer)

#3 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\libs\rdbms\database\DBConnRef.php(117): Wikimedia\Rdbms\DBConnRef->ensureConnection()

#4 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\libs\rdbms\database\DBConnRef.php(710): Wikimedia\Rdbms\DBConnRef->__call(string, array)

#5 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\libs\rdbms\database\Database.php(2760): Wikimedia\Rdbms\DBConnRef->getSessionLagStatus()

#6 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\user\User.php(526): Wikimedia\Rdbms\Database::getCacheSetOptions(Wikimedia\Rdbms\DBConnRef)

#7 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\libs\objectcache\wancache\WANObjectCache.php(1725): MediaWiki\User\User->MediaWiki\User\{closure}(boolean, integer, array, NULL, array)

#8 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\libs\objectcache\wancache\WANObjectCache.php(1556): WANObjectCache->fetchOrRegenerate(string, integer, Closure, array, array)

#9 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\user\User.php(522): WANObjectCache->getWithSetCallback(string, integer, Closure, array)

#10 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\user\User.php(480): MediaWiki\User\User->loadFromCache()

#11 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\user\User.php(412): MediaWiki\User\User->loadFromId(integer)

#12 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\session\UserInfo.php(92): MediaWiki\User\User->load()

#13 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\session\CookieSessionProvider.php(127): MediaWiki\Session\UserInfo::newFromId(string)

#14 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\session\SessionManager.php(538): MediaWiki\Session\CookieSessionProvider->provideSessionInfo(MediaWiki\Request\WebRequest)

#15 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\session\SessionManager.php(244): MediaWiki\Session\SessionManager->getSessionInfoForRequest(MediaWiki\Request\WebRequest)

#16 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\Request\WebRequest.php(840): MediaWiki\Session\SessionManager->getSessionForRequest(MediaWiki\Request\WebRequest)

#17 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\user\User.php(1024): MediaWiki\Request\WebRequest->getSession()

#18 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\user\User.php(393): MediaWiki\User\User->loadDefaults()

#19 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\user\User.php(1637): MediaWiki\User\User->load()

#20 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\user\User.php(2297): MediaWiki\User\User->getId()

#21 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\user\UserOptionsManager.php(656): MediaWiki\User\User->isRegistered()

#22 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\user\UserOptionsManager.php(500): MediaWiki\User\UserOptionsManager->getCacheKey(MediaWiki\User\User)

#23 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\user\UserOptionsManager.php(147): MediaWiki\User\UserOptionsManager->loadUserOptions(MediaWiki\User\User, integer)

#24 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\context\RequestContext.php(459): MediaWiki\User\UserOptionsManager->getOption(MediaWiki\User\User, string)

#25 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\language\Message.php(389): RequestContext->getLanguage()

#26 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\language\Message.php(1485): Message->getLanguage()

#27 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\language\Message.php(972): Message->fetchMessage()

#28 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\language\Message.php(1059): Message->format(string)

#29 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\exception\MWExceptionRenderer.php(254): Message->text()

#30 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\exception\MWExceptionRenderer.php(398): MWExceptionRenderer::msg(string, string)

#31 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\exception\MWExceptionRenderer.php(103): MWExceptionRenderer::reportOutageHTML(Wikimedia\Rdbms\DBConnectionError)

#32 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\exception\MWExceptionHandler.php(134): MWExceptionRenderer::output(Wikimedia\Rdbms\DBConnectionError, integer)

#33 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\exception\MWExceptionHandler.php(251): MWExceptionHandler::report(Wikimedia\Rdbms\DBConnectionError)

#34 C:\Users\Aven\Desktop\xampp\htdocs\wiki\includes\exception\MWExceptionHandler.php(219): MWExceptionHandler::handleException(Wikimedia\Rdbms\DBConnectionError, string)

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

#36 {main}


Any help is appreciated, thank you! :)

NowInHD (talkcontribs)

Ah. Just discovered that the wiki SQL database is gone. Where can I go from here?

NowInHD (talkcontribs)

Looking in the folder mysql/data/data i have found that the folder for my wiki database is still there, however it isnt showing up on phpMyAdmin and it responded with "Unknown database 'wikidb'" when i tried to access it using SQL.

Bawolff (talkcontribs)
Reply to "Error "Cannot access the database""