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".

My MediaWiki shows error when first access.

5
318cyz (talkcontribs)

PHP Notice: Trying to access array offset on value of type null in C:\inetpub\wwwroot\mediawiki\includes\profiler\SectionProfiler.php on line 99

PHP Notice: Trying to access array offset on value of type null in C:\inetpub\wwwroot\mediawiki\includes\profiler\SectionProfiler.php on line 99

PHP Notice: Trying to access array offset on value of type null in C:\inetpub\wwwroot\mediawiki\includes\profiler\SectionProfiler.php on line 100

PHP Notice: Trying to access array offset on value of type null in C:\inetpub\wwwroot\mediawiki\includes\profiler\SectionProfiler.php on line 100

PHP Notice: Trying to access array offset on value of type null in C:\inetpub\wwwroot\mediawiki\includes\profiler\SectionProfiler.php on line 101

PHP Notice: Trying to access array offset on value of type null in C:\inetpub\wwwroot\mediawiki\includes\profiler\SectionProfiler.php on line 101


Refresh can load it correctly.

When I post changes the connection will reset, even on localhost.

Bawolff (talkcontribs)

Please include the contents of LocalSettings.php (minus any passwords or secret keys)

318cyz (talkcontribs)

<?php

# This file was automatically generated by the MediaWiki 1.41.1

# installer. If you make manual changes, please keep track in case you

# need to recreate them later.

#

# See includes/MainConfigSchema.php for all configurable settings

# and their default values, but don't forget to make changes in _this_

# file, not there.

#

# Further documentation for configuration settings may be found at:

# https://www.mediawiki.org/wiki/Manual:Configuration_settings

# Protect against web entry

if ( !defined( 'MEDIAWIKI' ) ) {

   exit;

}

## Uncomment this to disable output compression

# $wgDisableOutputCompression = true;

$wgSitename = "TestProject";

## The URL base path to the directory containing the wiki;

## defaults for all runtime URL paths are based off of this.

## For more information on customizing the URLs

## (like /w/index.php/Page_title to /wiki/Page_title) please see:

## https://www.mediawiki.org/wiki/Manual:Short_URL

$wgScriptPath = "/wiki";

$wgScriptExtension  = ".php";

$wgArticlePath = "${wgScriptPath}/$1";

## The protocol and server name to use in fully-qualified URLs

$wgServer = "http://www.vividcycle.org:32648";

## The URL path to static resources (images, scripts, etc.)

$wgResourceBasePath = $wgScriptPath;

## The URL paths to the logo.  Make sure you change this from the default,

## or else you'll overwrite your logo when you upgrade!

$wgLogos = [

   '1x' => "$wgResourceBasePath/resources/assets/change-your-logo.svg",

   'icon' => "$wgResourceBasePath/resources/assets/change-your-logo.svg",

];

## UPO means: this is also a user preference option

$wgEnableEmail = true;

$wgEnableUserEmail = true; # UPO

$wgEmergencyContact = "318cyz@vividcycle.org";

$wgPasswordSender = "318cyz@vividcycle.org"; # The email is a false one

$wgEnotifUserTalk = true; # UPO

$wgEnotifWatchlist = true; # UPO

$wgEmailAuthentication = true;

## Database settings

$wgDBtype = "mysql";

$wgDBserver = "localhost";

$wgDBname = "my_wiki";

$wgDBuser = "wikiuser";

$wgDBpassword = [REDACTED];

# MySQL specific settings

$wgDBprefix = "";

$wgDBssl = false;

# MySQL table options to use during installation or update

$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";

# Shared database table

# This has no effect unless $wgSharedDB is also set.

$wgSharedTables[] = "actor";

## Shared memory settings

$wgMainCacheType = CACHE_NONE;

$wgMemCachedServers = [];

## To enable image uploads, make sure the 'images' directory

## is writable, then set this to true:

$wgEnableUploads = false;

#$wgUseImageMagick = true;

#$wgImageMagickConvertCommand = "/usr/bin/convert";

# InstantCommons allows wiki to use images from https://commons.wikimedia.org

$wgUseInstantCommons = false;

# Periodically send a pingback to https://www.mediawiki.org/ with basic data

# about this MediaWiki instance. The Wikimedia Foundation shares this data

# with MediaWiki developers to help guide future development efforts.

$wgPingback = true;

# Site language code, should be one of the list in ./includes/languages/data/Names.php

$wgLanguageCode = "zh-cn";

# Time zone

$wgLocaltimezone = "UTC";

## Set $wgCacheDirectory to a writable directory on the web server

## to make your wiki go slightly faster. The directory should not

## be publicly accessible from the web.

#$wgCacheDirectory = "$IP/cache";

$wgSecretKey = [REDACTED];

# Changing this will log out all existing sessions.

$wgAuthenticationTokenVersion = "1";

# Site upgrade key. Must be set to a string (default provided) to turn on the

# web installer while LocalSettings.php is in place

$wgUpgradeKey = [REDACTED];

## For attaching licensing metadata to pages, and displaying an

## appropriate copyright notice / icon. GNU Free Documentation

## License and Creative Commons licenses are supported so far.

$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright

$wgRightsUrl = "";

$wgRightsText = "";

$wgRightsIcon = "";

# Path to the GNU diff3 utility. Used for conflict resolution.

$wgDiff3 = "";

# The following permissions were set based on your choice in the installer

$wgGroupPermissions['*']['createaccount'] = false;

$wgGroupPermissions['*']['edit'] = false;

## Default skin: you can change the default skin. Use the internal symbolic

## names, e.g. 'vector' or 'monobook':

$wgDefaultSkin = "vector";

# Enabled skins.

# The following skins were automatically enabled:

wfLoadSkin( 'MinervaNeue' );

wfLoadSkin( 'MonoBook' );

wfLoadSkin( 'Timeless' );

wfLoadSkin( 'Vector' );

# Enabled extensions. Most of the extensions are enabled by adding

# wfLoadExtension( 'ExtensionName' );

# to LocalSettings.php. Check specific extension documentation for more details.

# The following extensions were automatically enabled:

wfLoadExtension( 'AbuseFilter' );

wfLoadExtension( 'CategoryTree' );

wfLoadExtension( 'Cite' );

wfLoadExtension( 'CiteThisPage' );

wfLoadExtension( 'CodeEditor' );

wfLoadExtension( 'ConfirmEdit' );

wfLoadExtension( 'DiscussionTools' );

wfLoadExtension( 'Echo' );

wfLoadExtension( 'Gadgets' );

wfLoadExtension( 'ImageMap' );

wfLoadExtension( 'InputBox' );

wfLoadExtension( 'Interwiki' );

wfLoadExtension( 'Linter' );

wfLoadExtension( 'LoginNotify' );

wfLoadExtension( 'Math' );

wfLoadExtension( 'MultimediaViewer' );

wfLoadExtension( 'Nuke' );

wfLoadExtension( 'OATHAuth' );

wfLoadExtension( 'PageImages' );

wfLoadExtension( 'ParserFunctions' );

wfLoadExtension( 'PdfHandler' );

wfLoadExtension( 'Poem' );

wfLoadExtension( 'ReplaceText' );

wfLoadExtension( 'Scribunto' );

wfLoadExtension( 'SecureLinkFixer' );

wfLoadExtension( 'SpamBlacklist' );

wfLoadExtension( 'SyntaxHighlight_GeSHi' );

wfLoadExtension( 'TemplateData' );

wfLoadExtension( 'TextExtracts' );

wfLoadExtension( 'Thanks' );

wfLoadExtension( 'TitleBlacklist' );

wfLoadExtension( 'VisualEditor' );

wfLoadExtension( 'WikiEditor' );

# End of automatically generated settings.

# Add more configuration options below.

Bawolff (talkcontribs)

Huh. LocalSettings.php looks normal.

318cyz (talkcontribs)

If you want to see the site go to the URL included in this file: $wgServer = "http://www.vividcycle.org:32648";

Reply to "My MediaWiki shows error when first access."

Everytime I try setting a default skin (to vector-2022), I get this

1
38.96.234.21 (talkcontribs)

Exception caught inside exception handler: [f50174ea9643bba6b783fb21] /wiki/index.php/Main_Page Error: Class "ResourceLoaderSkinModule" not found

Backtrace:

from C:\Program Files\xampp\htdocs\wiki\includes\ResourceLoader\ResourceLoader.php(417)

#0 C:\Program Files\xampp\htdocs\wiki\includes\Output\OutputPage.php(627): MediaWiki\ResourceLoader\ResourceLoader->getModule(string)

#1 C:\Program Files\xampp\htdocs\wiki\includes\Output\OutputPage.php(651): MediaWiki\Output\OutputPage->filterModules(array, NULL, string)

#2 C:\Program Files\xampp\htdocs\wiki\includes\Output\OutputPage.php(672): MediaWiki\Output\OutputPage->getModules(boolean, NULL, string, string)

#3 C:\Program Files\xampp\htdocs\wiki\includes\Output\OutputPage.php(3477): MediaWiki\Output\OutputPage->getModuleStyles(boolean)

#4 C:\Program Files\xampp\htdocs\wiki\includes\Output\OutputPage.php(3558): MediaWiki\Output\OutputPage->getRlClient()

#5 C:\Program Files\xampp\htdocs\wiki\includes\skins\SkinMustache.php(98): MediaWiki\Output\OutputPage->headElement(MediaWiki\Skins\Vector\SkinVector22)

#6 C:\Program Files\xampp\htdocs\wiki\includes\skins\SkinTemplate.php(177): SkinMustache->generateHTML()

#7 C:\Program Files\xampp\htdocs\wiki\includes\Output\OutputPage.php(3017): SkinTemplate->outputPage()

#8 C:\Program Files\xampp\htdocs\wiki\includes\exception\MWExceptionRenderer.php(187): MediaWiki\Output\OutputPage->output()

#9 C:\Program Files\xampp\htdocs\wiki\includes\exception\MWExceptionRenderer.php(106): MWExceptionRenderer::reportHTML(Error)

#10 C:\Program Files\xampp\htdocs\wiki\includes\exception\MWExceptionHandler.php(135): MWExceptionRenderer::output(Error, integer)

#11 C:\Program Files\xampp\htdocs\wiki\includes\exception\MWExceptionHandler.php(239): MWExceptionHandler::report(Error)

#12 C:\Program Files\xampp\htdocs\wiki\includes\MediaWikiEntryPoint.php(222): MWExceptionHandler::handleException(Error, string)

#13 C:\Program Files\xampp\htdocs\wiki\includes\actions\ActionEntryPoint.php(82): MediaWiki\MediaWikiEntryPoint->handleTopLevelError(Error)

#14 C:\Program Files\xampp\htdocs\wiki\includes\MediaWikiEntryPoint.php(206): MediaWiki\Actions\ActionEntryPoint->handleTopLevelError(Error)

#15 C:\Program Files\xampp\htdocs\wiki\index.php(58): MediaWiki\MediaWikiEntryPoint->run()

#16 {main}

Reply to "Everytime I try setting a default skin (to vector-2022), I get this"
2409:4063:4280:31CF:0:0:11DE:28AD (talkcontribs)
Bawolff (talkcontribs)
Reply to "Page Statistics"

Editing late husband's information

3
Titpup (talkcontribs)

I am the husband of the late Steve Hurley. I've attempted to make correction on his page but none of my corrections are saved. DOB 5/16/1957 DOD 4/16/2022 Place of Birth Ypsilanti, Michigan, USA.

P858snake (talkcontribs)

@Titpup We have no such page on this wiki, as this wiki is about the MediaWiki software package, You would need to seek assistance on the wiki you are trying to edit.

Bawolff (talkcontribs)
Reply to "Editing late husband's information"

svg transclusion in templates

4
Aloist (talkcontribs)

We have a template which places .gif images like this

https://www.astro.com/im/sym/s_su.18.gif

In the html page rendering, it appears as

<img src="https://www.astro.com/im/sym/s_su.18.gif" alt="s_su.18.gif">

I would like to replace the .gif image with a .svg image like this

https://www.astro.com/im/sym/s_su.18.svg

but that is rendered into

<a class="external free" href="https://www.astro.com/im/sym/s_su.18.svg">https://www.astro.com/im/sym/s_su.18.svg</a>


How can I have it rendered the same way as a gif image?

TheDJ (talkcontribs)

It's because core doesn't know svg as an image format for external images. It is not listed in EXT_IMAGE_REGEX of the Parser, only: gif,png,jpg,jpeg. This regex probably could use an update, please file a ticket in Phabricator to ask for this functionality.

(obligatory note about potential dangers of allowing your editors to include images from the internet)

Aloist (talkcontribs)

Thank you so much. I patched EXT_IMAGE_REGEX in ./parser/Parser.php

I do not know how to file a ticket.

Our wiki is not open to random editors, only a small trusted group can edit.

Pppery (talkcontribs)
Reply to "svg transclusion in templates"

How to remove discussion tab (timeless skin)

2
AlexMeneghin (talkcontribs)

What I need to do remove or hide the discussion tab ?

thanks

Samwilson (talkcontribs)
Reply to "How to remove discussion tab (timeless skin)"

Error 1264: Out of range value for column 'pp_page' at row 1

1
Kghbln (talkcontribs)

Did anybody ever run into the issue I tracked with T365510? I was able to work my way past it, but I am unsure if this was the correct thing to do.

Reply to "Error 1264: Out of range value for column 'pp_page' at row 1"

[RESOLVED] Warning: is_executable(): open_basedir restriction in effect

11
Cavila (talkcontribs)

Since I've started a data refresh process that's necessary for Semantic MediaWiki, I'm seeing the following error message at the bottom of every page:

Warning: is_executable(): open_basedir restriction in effect. 
File(/usr/bin/php) is not within the allowed path(s): 
([...]/:/tmp/) in [...]/includes/Wiki.php on line 655 

Line 655 refers to something beginning

if ( !wfShellExecDisabled() && is_executable( $wgPhpCli ) )

No shell access as I'm on a shared host (with Suhosin enabled). Decreasing JobRunRate from "1" to e.g. "0.5" helps somewhat to reduce occurrences of the error message, but it does not solve the issue, let alone speed up the process.

With some googling you'll find a variety of solutions for PHP configuration issues involving "open_basedir restriction in effect", but almost none of them seems to cover this specific situation. The exception may be here, where the third suggestion about setting $wgPhpCli to a dummy value (?) might or might not be helpful in my case.

Any idea what could be done about it?

Cavila (talkcontribs)

Some additional notes. The problem persists even if the refresh process has been cancelled. I also noticed that a lot of wikis are affected by the same issue, although no bugzilla report has been submitted yet.

Cavila (talkcontribs)

OK, this may be a bug in MW 1.22:

  • $wgPhpCli used to have a default value of 'php', without any requirement to set it explicitly in LocalSettings.php.
  • In MW 1.22, the default value appears to have become '/usr/bin/php', pointing to a file which does not exist, hence the error message above. Explicitly reverting to a value of 'php' woukd appear to solve the issue.

Is that correct?

Ciencia Al Poder (talkcontribs)

It was changed to /usr/bin/php even before than 1.19.

You can change $wgPhpCli in your LocalSettings if you need to, that's fine if that solves your problem.

Cavila (talkcontribs)

Thanks for responding. There have not been any issues on my MW 1.19.7 installation, so something else must be involved. But at least the error message no longer shows up.

Sophivorus (talkcontribs)

Had the same problem in 1.23alpha installations and fixed it by setting $wgPhpCli = 'php';

122.101.20.5 (talkcontribs)

Thanks for Fix it.

Before:global $wgJobRunRate, $wgPhpCli, $IP;   ... 639 Line
After:global $wgJobRunRate, $wgPhpCli, $IP;    ...639 Line
             $wgPhpCli = 'php';               ...640 Line
Benby (talkcontribs)

Adding $wgPhpCli = 'php'; to /wiki/LocalSettings.php worked on my configuration as well. Thanks for sharing.

(In my LocalSettings.php I actually had to add a new line for $wgPhpCli. Searching for that variable only gave me occurences in DefaultSettings.php - just an addition which may help other MediaWiki newbies like me.)

Cavila (talkcontribs)

There may be a catch though. I now have a job queue of well over a million. Does MW somehow need this to run jobs?

Cavila (talkcontribs)
Narcisgarcia (talkcontribs)

MWException: PEAR mail package is not installed even after installing it and checking include path - fedora server (using dnf package)

4
Reesericdotci (talkcontribs)

I am getting a strange pear mail error after installing it on Fedora Server and checking the include path through following the checklist on PEAR's site. Here's all the debug info I got:


Webpage:

[3b4977d818b6fe8f04e8b74a] /index.php?title=Special:ConfirmEmail MWException: PEAR mail package is not installed

Backtrace:

from /usr/share/mediawiki/includes/mail/UserMailer.php(369)

#0 /usr/share/mediawiki/includes/mail/UserMailer.php(173): UserMailer::sendInternal()

#1 /usr/share/mediawiki/includes/user/User.php(3068): UserMailer::send()

#2 /usr/share/mediawiki/includes/user/User.php(3042): User->sendMail()

#3 /usr/share/mediawiki/includes/specials/SpecialConfirmEmail.php(145): User->sendConfirmationMail()

#4 /usr/share/mediawiki/includes/htmlform/HTMLForm.php(729): SpecialConfirmEmail->submitSend()

#5 /usr/share/mediawiki/includes/htmlform/HTMLForm.php(619): HTMLForm->trySubmit()

#6 /usr/share/mediawiki/includes/htmlform/HTMLForm.php(635): HTMLForm->tryAuthorizedSubmit()

#7 /usr/share/mediawiki/includes/specials/SpecialConfirmEmail.php(118): HTMLForm->show()

#8 /usr/share/mediawiki/includes/specials/SpecialConfirmEmail.php(79): SpecialConfirmEmail->showRequestForm()

#9 /usr/share/mediawiki/includes/specialpage/SpecialPage.php(701): SpecialConfirmEmail->execute()

#10 /usr/share/mediawiki/includes/specialpage/SpecialPageFactory.php(1428): SpecialPage->run()

#11 /usr/share/mediawiki/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath()

#12 /usr/share/mediawiki/includes/MediaWiki.php(904): MediaWiki->performRequest()

#13 /usr/share/mediawiki/includes/MediaWiki.php(562): MediaWiki->main()

#14 /usr/share/mediawiki/index.php(49): MediaWiki->run()

#15 /usr/share/mediawiki/index.php(45): wfIndexMain()

#16 {main}


pear version:

PEAR Version: 1.10.15

PHP Version: 8.2.18

Zend Engine Version: 4.2.18

Running on: Linux localhost.localdomain 6.8.9-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May  2 18:44:19 UTC 2024 x86_64


pear list:

Installed packages, channel pear.php.net:

=========================================

Package          Version State

Archive_Tar      1.5.0   stable

Auth_SASL        1.2.0   stable

Console_Getopt   1.4.3   stable

Mail             2.0.0   stable

Mail_Mime        1.10.12 stable

Net_SMTP         1.12.1  stable

Net_Socket       1.2.2   stable

PEAR             1.10.15 stable

PEAR_Manpages    1.10.0  stable

Structures_Graph 1.1.1   stable

XML_Util         1.4.5   stable


ls -lah on /usr/share/pear:

drwxrwxr-x.  11 caddy apache 4.0K May 20 20:59 pear

ls -lah on /usr/share/pear/

drwxrwxr-x.   2 caddy apache  162 May 20 20:59 Mail


php.ini

;;;;;;;;;;;;;;;;;;;;;;;;;

; Paths and Directories ;

;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX: "/path1:/path2"

include_path = ".:/usr/share/pear/"


the pear bool was true when checking, and the include path included pear when using check_php

Samwilson (talkcontribs)

@Reesericdotci: You shouldn't install PEAR globally for it to be used by MediaWiki, it's in the MW vendor/ directory already along with all other PHP dependencies. How did you install MediaWiki? You may need to either make sure you've downloaded all submodules, or run composer update --no-dev -o.

Reesericdotci (talkcontribs)

I installed MediaWiki using `sudo dnf install mediawiki` - I can try symlinking to vendor maybe?

Reesericdotci (talkcontribs)

Alright, running composer update --no-dev -o in /var/www/wiki worked for me - thank you!

strange section indentation Help:Contents

5
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)

Reply to "strange section indentation Help:Contents"