Manual talk:Configuration settings/Archive 1

From mediawiki.org

Configuration Settings - Index Creation

As a big thank you to Brion, for all his useful help over IRC, I decided I'd put a bit back and make a more useful 'configuration settings' index. All data has come from the configuration page on meta, and has been translated partially by machine, partially by hand. Errors or omissions are bound to have crept in (in particular links within the summaries/descriptions). All settings pages currently have 2 warnings. The first indicates that the information is not necessarily accurate or up-to-date. The second indicates that the version information has not been checked. Initially, all settings are listed as being available in 1.5, whether they are or not!

Please hold off editing any of these pages until I have removed the notice from the top of this main page sielpia.

-- HappyDog 02:32, 21 October 2005 (UTC)Reply

I have completed the update. ALL information from [1] should now be incorporated here. I have even included notes that were not attached to a particular setting (i.e. attached to a heading), even though I think these are probably not wanted here. We can move/remove them later though, once things are bedded in.
There are sure to be some conversion errors, even aside from the version data that I have flagged, so be warned!
--HappyDog 04:39, 21 October 2005 (UTC)Reply
Well done and a Thank you again :-) --:Bdk: 10:14, 16 January 2006 (UTC)Reply

Subdomains??

My mediawiki is reachable under http://mydomain.com/mediawiki/ Is it possible that the mediawiki is reachable under http://wiki.mydomain.com?

07 May 2006

Point wiki.mydomain.com to your ip, create a new virtual host for it under /etc/apache2/sites-enabled (default is a good example). Also use the apache rules under /etc/mediawiki/apache.conf for it. I'm sure you'll figure it all out. 129.241.139.198 17:20, 24 May 2006 (UTC)Reply
If have your subdomain at your webserver set up correctly, it's easily possible to perform a fresh install of the MediaWiki software there. It is also possible to move an existing installation from http://mydomain.com/mediawiki/ to http://wiki.mydomain.com by changing all the relevant entries in LocalSetting.php - but this may require a few trial-and-error interations before you got everything right. --Klaws 14:24, 15 June 2006 (UTC)Reply
I don't understand... I suck at English... should i go to http://85.30.155.6/smashbros.elwiki.com/ (my wiki isa t smashbros.elwiki.com) 85.30.155.6 23:04, 26 August 2006 (UTC)Reply
I have managed to get it to work by changing two variables in LocalSetting.php
I set $IP to the full path on the server (not the web path) eg /var/www/html/wiki (with NO trailing slash)
I set $wgScriptPath to an empty string. (with a slash only I did not get any style just the plain text)
I have found now that I cannot access the wiki with www.mydomain.com/wiki now (obviously) so I have added this code if($_SERVER["SERVER_NAME"]=="wiki.mydomain.com"){ .... } around the new lines and left the old lines alone (My if statement goes after the original line(s))
this way I can access the same wiki both ways.
Tony

File Uploads

My testing indicates that the only flag from the upload section that still works is wgEnableUploads. (Backward step imo from 1.4, where I could select whether or not to allow certain file types to be uploaded) - Kevin 192.85.50.2 10:02, 16 January 2006 (UTC)Reply

Adjust Time

My Server is running on Greenwich Main Time but I would like to set it to German Time. Can I do that in LocalSettings.php? I tried to set $wgLocaltimezone but it has no effect. 212.126.218.123 11:18, 28 January 2006 (UTC)Reply

Hi, I have the same problem, the $wgLocaltimezone doesn't working correct, so I experiment a little bit and find out, that following entries set the german time:

#Set Default Timezone

$wgLocaltimezone = "EUR-1";
$oldtz = getenv("TZ");
putenv("TZ=$wgLocaltimezone");
$wgLocalTZoffset = date("Z") / 3600;
putenv("TZ=$oldtz");

Date sielpia domki March 2008 (UTC)

--84.246.248.39 12:01, 10 March 2006 (UTC)Reply

dumpMessages.php

I don't find no information about this "dumpMessages.php". Is is deprecated ? Or just no one writing a help file ? --tr:katpatuka

User Options

How can I change the default options for non-logged-in users? I mean things like numberheadings or justify the text. When I'm logged-in, I can change the options for me, but not for the non-logged-in users.

thx!

$wgDefaultUserOptions

Trail

Is there a configuration parameter for adding the 'Trail' somewhere on the GUI. I'm looking for the list of pages that you have visited that gets stored at the top of the page. I can then click on any page and go back to that page. The previous version of Wiki (JSPWiki v2.2.33) had this and I can't seem to find it in MediaWiki.

Thx

Nope. There might be a third-party extension, try googling it up. The usual term is something like 'breadcrumbs'. --Brion VIBBER 21:36, 11 April 2006 (UTC)Reply


There are extensions to add BreadCrumbs for your MediaWiki site. Dont bother with google, search mediawiki.org : http://www.mediawiki.org/w/index.php?title=Special%3ASearch&search=breadcrumbs&go=Go

Or just try this working one: Extension:BreadCrumbs

Updates

I am updating all the individual configuration settings sub-pages, with the following changes:

  • If the page still has the 'unchecked version' it will be removed, and the version will be listed as '??'.
  • The name of the setting will be passed to the template minus the $wg part, so it can be used to order the category listings appropriately (as well as being available for future use within the template itself).
  • Adding a '== Details ==' header, as this needs to be removed from the template. In the current situation, clicking the section-edit link to edit the details section takes you to the template instead.

Note that I will not be checking accuracy or completeness at this stage. I may do so in the future - but then again I may not :) --HappyDog 00:37, 16 April 2006 (UTC)Reply

All done. Still a lot of tidying up/fact checking to do, but it's getting better. --HappyDog 03:06, 16 April 2006 (UTC)Reply

localsettings.php

It may sound stupid but could someone please tell me how to access the localsettings page to enter all these configurations. TIA --172.143.130.105 18:47, 16 April 2006 (UTC)Reply

localsettings.php is in the top level of your mediawiki directory. --Rick 01:35, 24 May 2006 (UTC)Reply
OK, I hate to sound twice as stupid, but I have the same question, and that answer didn't help. Could you pleeeeeeeeese explain, really simple like, exactly what I have to do to find this page??? 70.105.24.59 06:48, 27 August 2006 (UTC)Reply
You have to log into your server account and go to the wiki root directory and then if you list the contents of that directory, then you will see the file named LocalSettings.php. Open and edit using your favourite text editor. Or using your ftp client, connect to the server, again go to the wiki root directory, then transfer the file to your computer, edit using your favourite text editor, then upload back to the server the new version. --Dr DBW 00:12, 12 December 2006 (UTC)Reply
I would also like to sound stupid so I just have to ask: What is "wiki root directory"? --62.240.86.78 22:34, 30 July 2009 (UTC)Reply

When I edit my LocalSettings.php and then upload it and refresh... no changes happen! I tried just changing the logo and no go.

Yup, same here. Is $wgLogo special? I just moved my logo into the wiki.png image file, but I'd prefer to, you know, "do it right." --Brad Eleven 19:30, 28 June 2007 (UTC)Reply

There are some caching issues involved I suspect. And there are two places this can happen, with the browser you are using and with MediaWiki itself. With the latter, a trivial change to the page typically fixes it. --Dr DBW 02:43, 29 June 2007 (UTC)Reply
So how do you get MediaWiki to refresh its cache?
I think what he/she means is that if you add a word or a comma somewhere and save, that's enough to force Mediawiki's cache to refresh. I don't know, though. Just guessing. To force your browser's cache to refresh, in Firefox, for instance, reload the page by holding down Ctrl-Shift-R simultaneously. Quixote7

How to enable IFRAME Tag?

Hi, I need to learner how to enable IFRAME HTml tag in this script. Or I need to understand which line of file creat a Title of Article. I put a code is this line. Thanks.

Sorry for my bad english.

contatc: flaviogomes (a) correios.net.br --201.10.139.15 12:37, 26 April 2006 (UTC)Reply


In your LocalSettings.php, set $wgRawHtml=true. Note that will allow raw HTML for everyone, on every page!

In one of my Wikis, I have an extension which allows raw HTML for Sysops only (on protected pages only), to prevent abuse. Available upon request. --Klaws 12:09, 15 June 2006 (UTC) mapa sielpia April 2008 (UTC)Reply


When I edit my LocalSettings.php and then upload it and refresh... no changes happen! I tried jsut changing the logo and no go.

  • Maybe you made a typographical error?

you need to put it in an html tag container...

<html>
  <a href=whatever text=something>link</a>
</html>

Using $wgDBuser

Hi! I want to use the variables $wgDBuser, $wgDBPassword, $wgDB... in an other file.

How can i get informations from this variable in there?

A:

  • require_once("/path/to/LocalSettings.php");

How to override functions in SpecialUpload.php???

I want to customize some of the functions in SpecialUpload.php. I do NOT want to edit that file. Instead I want to "subclass" it or in some other way get wiki to read another file with custom functions. What is the best way to override one of the standard wiki phps??

Depending on what you are trying to do, you may be able to acheive what you're after by writing an extension using one of the supplied hooks. See Manual:MediaWiki hooks for more details. --HappyDog 23:09, 3 May 2006 (UTC)Reply


Is there a configuration to turn off section edit links, globally?

Is there any configuration setting to remove the section edit links for all pages? Something like a global "__NOEDITSECTION__" which could be set in "localSettings.php"... any ideas? thanks, --Zeroasterisk 04:13, 4 May 2006 (UTC)Reply

I don't know of a setting for this (doesn't mean there isn't one...) but it is something that individual users can enable/disable through their preferences. You could set the default option for non-logged-in and new users to be off, though I don't know if you could stop someone turning it on if they chose. --HappyDog 13:11, 4 May 2006 (UTC)Reply
That's a great idea - it's a least a good start. (how to do it: [2] [3]) It would still be nice to know if anyone knew of the actual setting...? --Zeroasterisk 15:59, 5 May 2006 (UTC)Reply

$wgEmailConfirmToEdit

Please add the above setting to the "Email settings" list. Archon 19:46, 9 May 2006 (UTC)Reply

Wiki on old MySQL

Is pssible installing Wiki on MySQL 3.23.40 and PHP Version 4.3.8? Wich version?--82.200.186.12 22:11, 19 May 2006 (UTC)Reply

  • I Had a similar problem, I just used an older stable version of MediaWiki (1.6.X) I beleive

and it works fine, Im sure there are some security threats, but its a private Wiki with a great crew to help me maintain it.

Windows path quoting

To whom it may concern: I (as 67.170.224.143, sorry, I forgot I didn't have an account on this site) added a note in Manual:$wgSVGConverters about quoting the executable path for Windows. Hope this is OK. It doesn't seem to apply to $wgImageMagickConvertCommand, which (at least in 1.6) is properly escaped by Image.php before use. JohanTheGhost 20:31, 21 May 2006 (UTC)Reply

$wgRightsText

There appears to be very little info about how to get this this variable to work.

I found that if I place a string in it, I can only get the string to display if I also put something into the '$wgRightsPage' variable, but I don't want a rights page, so I placed a space into it, which works, but I'm still left with the 'Content is available under' as lead in to the page link.

Why are these two variables so interdependent?

Why are there no docs anywhere about them?

tia

Never mind - I finally found the info (on Meta)

$wgRightsText is the string displayname for the page located by $wgRightsPage
I added some more information to Manual:$wgRightsPage, Manual:$wgRightsText and Manual:$wgRightsUrl. Please add to this if there is anything else I missed. --HappyDog 00:08, 28 June 2006 (UTC)Reply

LocalSettings.php as an article

I've always preferred having my LocalSettings.php available as an article rather than a file so configuration can be done directly from within the wiki (sysop only because you can break the wiki if the article has a fatal error in it). So if any admin thinks this is useful, could you move it to the article or somewhere appropriate? I can't edit much here now that its all locked down :-(

To get it to execute the LocalSettings.php article, add the following lines to your index.php file after the line containing the wfProfileIn('main-misc-setup'); statement:

$tmp = new Article(Title::newFromText('LocalSettings.php'));
eval($tmp->fetchContent(0, false, false));
#eval($tmp->getContentWithoutUsingSoManyDamnGlobals()); # use this for version 1.4x or less
--Nad 22:31, 28 June 2006 (UTC)Reply
However, it may be impractical that after saving a version with a fatal error, you have to undo the changes above in order to be able to correct the error.--Patrick 14:09, 14 February 2007 (UTC)Reply

$wgSitename

Is it possible to use special chars like the German ä in $wgSitename? I tried using ä and ä in the $wgSitename-String, in both cases it´s not displayed as ä the Browser-<title> as well as for the Project-Link in the Navigation bar. What can I do? --89.48.62.134 14:24, 7 July 2006 (UTC) (I use the latest stable MetaWiki Version with German localization)Reply

That's due to the way your browser handles special characters. If not sure if newer browsers or browsers running on computers set in German may display this correctly. Anyway, you site users may not have updated browswers, so that won't work. Unfortunly non-English characters can not reliably be used on the Internet today. Sorry --141.158.62.105 17:38, 7 August 2006 (UTC)Reply
Actually you can use accentuated characters in $wgSitename, but it needs to be encoded in UTF-8. Probably your LocalSettings.php file is encoded in IS0-8859-1 (latin1) if you use Windows (depends on your text editor too). For the $wgSitename to contain UTF-8 encoded string, use the PHP function $wgSitename=ut8_encode('Schwarzwälderkirschtorte'); and it will display fine.
The issue is not related to 'reliability' of browsers, but to understanding of wikipedia:character encoding. English people who can rely entirely on ASCII (the 128 first characters common to most encodings) tend to forget about that and make things 'unreliable' for the rest of the planet. So be carefull! :) BigueNique@yahoo.ca --64.18.180.117 19:54, 31 May 2007 (UTC)Reply

Sitenotice

Can someone change the listing for $wgSiteNotice, because it is currently full of POV. The notice does not have to be bold or ugly. --141.158.62.105 17:31, 7 August 2006 (UTC)Reply

Done. --HappyDog 17:34, 8 August 2006 (UTC)Reply

File Upload

Hello, I need some help. I have started a wikisite, and had the host install the wikifiles, I belive with the very latest version as of Thursday, August 17th. I cannot seem to get file upload activated, but the documentation seems to say it should be...--Trek84 20:47, 18 August 2006 (UTC)Reply

Add this please

Manual:$wgBlockAllowsUTEdit. Oh and I probably didn't format it properly when writing it so it may need some template stuff. I don't know which version it started being active, either. 12.72.105.234 07:46, 8 September 2006 (UTC)Reply

Done; thanks for reporting this. —dto 08:12, 8 September 2006 (UTC)Reply

New 1.7 Configuration Settings

Please add the two configuration settings added in MediaWiki 1.7: $wgSaveDeletedFiles and $wgSaveDeletedFiles

/**
 * By default deleted files are simply discarded; to save them and
 * make it possible to undelete images, create a directory which
 * is writable to the web server but is not exposed to the internet.
 *
 * Set $wgSaveDeletedFiles to true and set up the save path in
 * $wgFileStore['deleted']['directory'].
 */
$wgSaveDeletedFiles = false;

/**
 * New file storage paths; currently used only for deleted files.
 * Set it like this:
 *
 *   $wgFileStore['deleted']['directory'] = '/var/wiki/private/deleted';
 *
 */
$wgFileStore = array();
$wgFileStore['deleted']['directory'] = null; // Don't forget to set this.
$wgFileStore['deleted']['url'] = null;       // Private
$wgFileStore['deleted']['hash'] = 3;         // 3-level subdirectory split

Many thanks! --130.202.234.240 04:42, 10 October 2006 (UTC)Reply

Selecting default fonts

Which config file specifies the font selections for the skin? I looked in MonoBook.js, MonoBook.css, and localsettings.php. Perhaps I missed it, but I didn't see it there. I'd like to tweak the skin so that section headers use a different font. Thanks.

Templates not working for me

There are many templates (mostly for Infoboxes) that I have been trying to copy from Wikipedia to my Wikia. The Conditionals, I think, are crashing the code. (Example: http://wiki.raceNOSPAMtotheright.com/index.php?title=Template:Infobox_Radio_station) I have installed the Parser extensions. H-E-L-P, please. --Mnyakko 19:38, 30 October 2006 (UTC)Reply

Images not showing up

Mine is a new installation, and I'm trying to insert images in the wiki pages. The images are hosted in a seperate gallery software (PhotoPost), but on the same domain.

Anyway, I'm still calling the images using a full url (I would love to see a bridge for PP-MW, but that's for another day), by typing bracket bracket Image: http:// fullurletc .jpg pipe title bracket bracket.

However, it's creating a link to the Special:Upload page instead of embedding the photo. I have $wgAllowExternalImages = true; in LocalSettings.php - so why is it not inserting the photo? I have gone through the documentation and I cannot seem to figure what I've overlooked. I don't want people uploading images to the wiki directly, I want them to upload them to the PhotoPost installation, so I want to steer away from enabling uploads.

While I have you, speaking of not enabling uploads, where can I locate the file I use to edit the text on Special:Upload -> "Uploads disabled... File uploads are disabled on this wiki." I want to change that and tell them to go to the PP gallery and upload them there instead (with the respective link).

2 questions. Thank you for your time. MediaHound 01:09, 3 November 2006 (UTC)Reply

bump MediaHound 01:26, 6 November 2006 (UTC)Reply
where exactly are you trying to bump to? --HappyDog 04:22, 13 November 2006 (UTC)Reply
the 2 questions above that I'm asking for help with, can you help? thanks MediaHound 18:34, 15 November 2006 (UTC)Reply
Not 'what', 'where'.  :) --HappyDog 03:18, 16 November 2006 (UTC)Reply
Right here :) MediaHound 15:57, 9 April 2007 (UTC)Reply
As you read above I was calling the images with brackets. What I did to fix my problem, (yes, I worked around it), was drop the brackets and call the image by the full url AND since I was using dynamic image urls chock-full-of ? and & characters etc it did not end with a common image filetype. So I added &filefix=.jpg to the end of my urls and that got it to parse properly as an image. I'm still wondering where to edit the text "File uploads are disabled on this wiki.", but since I worked around the problem that led me to that page, I care less now. MediaHound 15:57, 9 April 2007 (UTC)Reply
found it /index.php?title=MediaWiki:Uploaddisabledtext&action=edit :blows kisses: MediaHound 16:19, 9 April 2007 (UTC)Reply

How to set upload limit?

As title, how to set upload limit to my Wiki?

Are you after a total upload limit for a user, or per file? The latter is quite easy to do, but it only provides a warning, not something that stops it from being done entirely. See, Manual:$wgUploadSizeWarning. --Dr DBW 00:19, 12 December 2006 (UTC)Reply

undocumented option $wgEnableScaryTranscluding

$wgEnableScaryTranscluding allows you include template from another wiki.

  • in LocalSettings.php add $wgEnableScaryTranscluding = true
  • in database in interwiki table in column 'iw_trans' you must set to 1.
  • then use {{prefix:template page}} in page

--84.32.99.253 11:12, 24 November 2006 (UTC)Reply

$wgUseTidy

The manual entry for this is here: Manual:$wgUseTidy. Is there any further information around about how this actually works, how to configure etc? Would be nice to know what the code is actually being run too, is it already incorporated into the distribution of MediaWiki, or where is it actually been run? Where it the default configuration file for Tidy, or does one not exist and all defaults are being used?

Reason being that I have enabled it to solve some issues with HTML table coding not rendering correctly, but now it messes up the coding for all images within the wiki. Full details are on the talk page - Manual_talk:$wgUseTidy --Dr DBW 00:19, 12 December 2006 (UTC)Reply

From what I can tell, looking in DefaultSettings.php, tidy is run off the server that MediaWiki is installed on (on my server it is at /usr/bin/tidy). There is no configuration file being used, but if you do the default location is at /extensions/tidy/tidy.conf --Dr DBW 01:02, 12 December 2006 (UTC)Reply

Problem with implementing Infoboxes

I'm having the same issue as mentioned in an early comment with setting up Infoboxes and other coding that uses the #if parameter in on my local MediaWiki site. Any ideas? --TotalBalance

What exactly is the problem? Or a link to where it is detailed?--Dr DBW 01:10, 9 January 2007 (UTC)Reply

A:

  • you need to copy the css code for the box as well
    • Example: Template:Extension
    • Look for this
      class="ext-infobox ext-status-{{#switch: {{lc: {{{status|unknown}}}}}|unstable|experimental|beta|stable={{{status}}}|unknown}}"
      

       class="ext-header"
      

      And Other "class parts"
    • Check for the css file here:
      [4]
    • Code to copy (and modify to your need)
/********* Extension Infobox Styling ***********/
 
.ext-infobox {
  border: 2px solid #aaaaaa;
  width: 272px; 
  float: right; 
  margin: 0 0 0.5em 0.5em; 
  border-collapse: collapse; 
  background-color: white;
}
 
.ext-infobox td {
  border: 2px none #aaaaaa;
  padding: 0.2em 0.5em;
  border-bottom: 1px solid #f0f0f0 !important;
}
 
.ext-header {
  background-color: #aaaaaa;
  color: white;
  text-align: left;
}
.ext-header td {
  padding-top: 0.5em;
}
 
.ext-header img {
  padding: 0 0.2em 0 0.5em;
}
 
.ext-status-unstable, .ext-status-unstable td {
  border-color: #990000;
}
.ext-status-unstable .ext-header {
  background-color: #990000;
  color: #ffff00;
}
 
.ext-status-experimental, .ext-status-experimental td {
  border-color: #CC6600;
}
.ext-status-experimental .ext-header {
  background-color: #CC6600;
}
 
.ext-status-beta, .ext-status-beta td {
  border-color: #000099;
}
.ext-status-beta .ext-header {
  background-color: #000099;
}
 
.ext-status-stable, .ext-status-stable td  {
  border-color: #009900;
}
.ext-status-stable .ext-header {
  background-color: #009900;
}

changed LocalSettings.php does not work

The installation was succesfull. After enabling image uploads, and thus only changing false into true, de LocalSettings.php doesn't work anymore. I get this error:

Warning: Cannot modify header information - headers already sent by (output started at /opt/www/avontsk/web/www.derepubliek.eu/vvp/wiki/LocalSettings.php:1) in /opt/www/avontsk/web/www.derepubliek.eu/vvp/wiki/includes/WebResponse.php on line 9

Only the original LocalSettings.php seems to work. I've tried chmodding, but to no effect. Can anyone help me?

Avonts 16:13, 14 January 2007 (UTC)Reply

You have probably added whitespace before the opening <?php tag, or at the end after the closing ?> tag. --HappyDog 15:29, 15 January 2007 (UTC)Reply
Thanks for your reaction. I've checked it. I didn't add any whitespace. It still doesn't work.
Since the initial LocalSettings.php works, but later uploads (which overwrite the old ones) don't, I was thinking it may have something to do with FileZilla. Any ideas? Avonts 17:18, 15 January 2007 (UTC)Reply
In that case, I don't know. The error is caused by some output being generated before the page headers are sent, and is normally caused by whitespace generated by include() calls, or by PHP errors. However, when there is an error, you should see that on the screen too. All I can suggest is to try checking the source of the page that is generated, and to undo your change and see if the problem goes away. Maybe someone else can offer some more advice. --HappyDog 18:11, 15 January 2007 (UTC)Reply
It seems that it is BOM at the beginning of LocalSettings.php. Use editor which can save in UTF-8 without BOM. 84.32.103.78 15:25, 16 January 2007 (UTC)Reply
I'm using Windows Notepad now. I'll try another one. Avonts 17:28, 16 January 2007 (UTC)Reply
You can fix it with Notepad, by using 'save as' and selecting "ANSI" as the encoding type. --HappyDog 23:19, 16 January 2007 (UTC)Reply
Yes, it was the BOM-thing. I'm using jEdit now. Thanks for your help.Avonts 08:05, 17 January 2007 (UTC)Reply

$wgMaxUploadSize

Please add $wgMaxUploadSize. 71.133.74.137 01:07, 3 February 2007 (UTC)Reply

Done --HappyDog 01:02, 7 February 2007 (UTC)Reply

broken Redirects

Is there anything I need to do to enable the special page "Broken redirects"? it does not seem to be updating at all.

Auto-Logout

Is there a parameter where I can config after what time a session gets closed? --GunterS 15:33, 14 March 2007 (UTC)Reply

Seconding this question: Is there an option to modify this timer? --Elonka 00:58, 8 April 2007 (UTC)Reply
Session timeout is set in php.ini, see ini.session.cache-expire --Nad 01:38, 8 April 2007 (UTC)Reply
On gNewSense /buntu, this looks like it is in /etc/php5/apache2/php.ini as "session.cache_expire =". Some useful keywords: login timeout logout logoff timeout expire expiry
On Debian/Ubuntu this is controlled by the session.gc_maxlifetime in the php.ini file. --Tim 15:17, 22 January 2010 (UTC)

I'd love to see this in LocalSettings.php! My users aren't going to like autologout - I can see them losing edits - and I don't want to change this value server wide. (And I don't have access to this file 8-) --Jeoknowhat 18:27, 2 July 2010 (UTC)Reply

If you are using apache, each website will have an entry in http.conf, one of the conf files http.conf includes, or a .htaccess file. You can add the following line to the config entry of your wiki (located in one of these files) to make the time before auto logout longer or shorter: php_value session.gc_maxlifetime 1440, e.g.
<VirtualHost 123.456.789.10>

   ServerName yoursite.com
   *** lots of other entries ***
   
   #time a session can last before garbagecollect in seconds
   php_value session.gc_maxlifetime 10800
   #10800 seconds is three hours

</VirtualHost>
I believe this change will only affect that one website. Can anyone verify if that is accurate?
You can also disable the session.gc_maxlifetime setting by setting session.save_path (in php.ini) to a directory other than the default. This results in session files being left in the new directory indefinitely, rather than remove by garbage collection according to session.gc_maxlifetime. So you'll also want to run a separate script to clean out the really old stuff, since there's also a maximum limit on how many sessions can be open, and sessions are open as long as the files are there. WhitBlauvelt (talk) 21:11, 13 July 2012 (UTC)Reply
Can I use ini_set? 129.94.242.47 11:56, 29 May 2011 (UTC)Reply

Page organization

I would like to see the site list a 10 most common settings at the top of the page. It should include login required for editing.

External images

$wgAllowExternalImages is listed under "#Parser" instead of "#Images", but I think it should be at least mentioned at the "Images" section. --Kjoonlee 17:33, 5 May 2007 (UTC)Reply

$wgNoFollowNsExceptions

Could someone add $wgNoFollowNsExceptions to the list? (Why is this page protected while the alphabetical list isn't, anyway? Shouldn't they have the same protection status? And why doesn't the protection log show anything?) --Ilmari Karonen 18:21, 13 May 2007 (UTC)Reply

Good point. Will do so. This page was protected way back then when it was located in Help:Configuration settings, and the protection log doesn't follow pages across page moves. (See Bug 8296 and Bug 7011.) Titoxd(?!?) 18:35, 13 May 2007 (UTC)Reply

Category/ies: link

How to modify the "Category/ies:" link (that is, Special:Categories by default) at the bottom of pages ?

nb: I think the topmost category should be a better default value. STyx 00:16, 27 May 2007 (UTC)Reply

How to change language??

How to change the language to swedish? I've tried to change : "$wgLanguageCode = "en" " to "$wgLanguageCode = "sv" " but it doesn't work. How should I do it??

Maybe it's because there's no LanguageSv.php in the language/classes directory of the standard installation - there is a MessagesSv.php file though, but I think it needs both... --Nad 21:26, 28 May 2007 (UTC)Reply
You have right, there is no LanguageSv.php but where can I get it? I can't do it myself cuz I can't PHP.

Cookies?

Can i turn the cookies off because the login doesn't work in IE7. It says: "Login error:SWiki uses cookies to log in users. You have cookies disabled. Please enable them and try again. ". I have all cookies accepted and session-cookies accepted. And plz help with the launguage problem over this post. And plz get a forum like phpBB or vBulletin. It should be easier to get answers so.

Try to add this line to your LocalSettings.php:
header('P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"');
It's a tweak for cookies to be accepted by IE6+. It worked for me on another PHP project, so who knows. BigueNique@yahoo.ca --64.18.180.117 20:06, 31 May 2007 (UTC)Reply
It is still the same problem :(

The above is nonsense. robchurch | talk 12:44, 21 July 2007 (UTC)Reply

using search for a 3 letter word

searching for "IBM" or anyother 3 letter word doesnt work on my wiki.

anywhere i can config this?

  its a mysql config problem
  Change your 'my.cnf' file to contain at least the following:
     [mysqld]
     ft_min_word_len=2
     [myisamchk]
     ft_min_word_len=2
  and then even 2-character words should be searchable.  
  IMPORTANT: Once you change this parameter, you need to rebuild the text index by running maintenance/rebuildtextindex.php


My hosting don't let me access to my.cnf. Is there another way?

Yes, use latest MediaWiki that has this issue fixed. Max Semenik 20:42, 3 June 2010 (UTC)Reply

Page customizations

Is the list of page customizations still up to date? I have MeidaWiki 1.9.3 and find that:

Am I living in the past or do these page names change very frequently?

You were living in the past. --Nemo 06:49, 10 August 2014 (UTC)Reply

Zakładanie konta przez administratora

Mam pewien problem z mediawiki i nadzieje ze ta stronke odwiedzi jakis polski uzytkownik i mi pomoze. Chodzi o to ze nie wiem jak sprawic by w przeze mnie stworzonej wiki tylko administrator mogl zakladac uzytkownikom konta, a uzytkownicy wysylali do administratora powiadomienie o checi zalozenia konta i wtedy administrator albo decyduje sie na zalozenie albo nie. Z gĂłry bardzo dziekuje za pomoc.

Categorise by section

Moved from User talk:Eep#Todo list

Hi Eep - On your 'todo' list, you have "Categorize Category:MediaWiki configuration settings (variables)". What are you planning to do here? Please discuss any changes before implementing them. Thank you, and welcome to MW.org --HappyDog 13:08, 25 July 2007 (UTC)Reply

Hi. Well, like how that category has a link to Manual:Configuration settings which divides the variables into functions/sections, categorizing each variable under the section (Category:Namespace variables, etc) would make them easier to reference, to along with categorizing MediaWiki functionality (Category:MediaWiki components). -Eep² 13:41, 25 July 2007 (UTC)Reply
I'm not sure I quite understood that. Do you mean adding categories for each of the section headings, 'General Settings', 'Paths', 'Shared uploads', etc. If so, this should be possible by just modifying Template:SettingSummary, as the section is already passed to it as a parameter. --HappyDog 02:09, 26 July 2007 (UTC)Reply
I don't mean sorting variables in Manual:Configuration settings but in actual MediaWiki categories under Category:Variables that match the sections in the manual. Categories are then categorizable under other categories (such as Category:Namespace variables under Category:Variables and Category:Namespace, which also includes other namespace-related articles/categories). The idea is to make finding related things easier. -Eep² 03:28, 26 July 2007 (UTC)Reply
I think we're talking about the same thing... What I mean is that the 'section' parameter is currently passed to the template, which provides a link to the appropriate section on the main config settings page. What I am suggesting is that it would be very easy to also use this parameter to add the setting to the appropriate category by using something like [[category:{{{section}}}]] (obviously checking that it's not blank, etc., first). That way all the settings will be automatically categorised without needing an edit, and that categorisation is consistent with the main config page. After that you would categorise the resulting categories into the appropriate locations as you describe. I would also recommend adding them to a new Category:Configuration settings by function so that they can be found easily from Category:MediaWiki configuration settings as well as from the more functional Category:Namespace, Category:User rights etc. (which would also hold help/manual pages and so on).
Note that we may need to add a prefix/suffix to the section names otherwise there may be clashes with more general purpose categories, so maybe "Config:" ("Config:General settings", "Config:Paths", "Config:Shared uploads") or "Config variables for "("Config variables for General settings", "Config variables for Paths", "Config variables for Shared uploads"), or perhaps ending with " (variables)" ("General settings (variables)", "Paths (variables)", "Shared uploads (variables)"). None of those examples are ideal, but I think we can't just use the settings names directly. Any better suggestions? --HappyDog 12:06, 26 July 2007 (UTC)Reply

slide shows

Is there a good way to upload slide shows to Mediawiki? Wlecroy 18:13, 23 August 2007 (UTC)Reply

Restrict Registration to specific Domain via email address

Hello, As this is a hack, I've elected to place it here. I just installed mediawiki for the first time this week. If I have time, I will explore the possibility of making an extention in the future. at this time I don't have the background experience with mediawiki to do so.

Purpose This hack restricts user registrations by adding a single conditional to the includes/SpecialUserlogin.php, adding a single function to includes/AuthPlugin.php and adding a new message to /Messages.php. In the event that you upgrade mediawiki, chances are you will need to update these files.

Steps

  • Turn off anonymous editing in localsettings.php
  • Open up /includes/SpecialUserlogin.php and add the following code (I added it at line 188)
    //Conditional added to require email is specific domain. Calls function from include/AuthPlugin.php
    if( !$wgAuth->checkEmail( $this->mEmail )){
    $this->mainLoginForm( wfMsg( 'wrongemailDomain' ) );
    return false;
    }
  • Open up /includes/Authplugin.php and add the following code (I added it at line 54)
    //Function added to require email from specific domain
    function checkEmail($email) {
    if(eregi("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$]", $email)) {
    return FALSE;
    }
    list($Username, $Domain) = split("@",$email);
    if($Domain != 'domain.com') {
    return FALSE;
    }else{
    return TRUE;
    }
    }

Replace 'domain.com' with your domain in the above code.

  • Open up /languages/messages.php and add the following code (I added it at line 404)
    //Added to Display Message when email is not from your domain
    'wrongemailDomain' => 'Email address was not from the correct domain. Please try again.',


$wgParserCacheType

This parameter is missing from the list. Jean-Lou Dupont 15:54, 1 November 2007 (UTC)Reply

Restrict Registration

What are the settings required for the following

  • allow only sysop to add users
  • deny visitors/unregistered users read/ sent them directly to login page
  • allow a specific group edit privileges to a page but allow other groups to view/comment

I have been through the documentation and followed the steps but anyone can still register only now the captcha doesn't show....

The setting you need is $wgGroupPermissions, you can also see Manual:Preventing access. iAlex 19:34, 5 December 2007 (UTC)Reply
Thanks

Sidebar Customization

The mediawiki:sidebar page is not listed under special pages, how do I access this to configure/customize?

Replace <yourwikidomain> below with the real IP address, or domain name, of your Wiki, then visit:

http://<yourwikidomain>/MediaWiki:SideBar

This will allow you to edit the page that is the Side Bar. It is a page, not a system message, and not a special page. For more information, Read the Manual.

Users - autoconfirm settings?

This page lists:

  1. $wgAutoConfirmAge (deprecated) - Number of seconds an account is required to age before it's given the implicit 'autoconfirm' group membership.
  2. $wgAutoConfirmCount (deprecated) - Number of edits an account requires before it's given the implicit 'autoconfirm' group membership..

There's nothing, however, on the descriptions for these individual settings to indicate them as deprecated. I'd be very surprised if they were, given that semi-protection is of rather recent vintage in MW. --66.102.80.212 19:26, 1 January 2008 (UTC)Reply

You are right, they are not deprecated. -- Duesentrieb ⇌ 13:01, 2 January 2008 (UTC)Reply

"Warning Dangerous" message

On this page we have one section where we've got a '!' icon saying Warning Dangerous. This is misleading because I'm sure there are actaully quite a few configuration variables which potentially open up gaping security holes. I'm not sure if it makes sense to try to identify and lable them all in this way, it would probably clutter the list quite a lot. ...or just remove that one warning -- Harry Wood 12:20, 3 April 2008 (UTC)Reply

Hmm... I can't think of that many... SQL queries, raw HTML (this one should get a warning!), some file types for uploads... that should be about it, I guess. -- Duesentrieb ⇌ 19:37, 3 April 2008 (UTC)Reply
Yeah. raw HTML and uploads related ones were the ones I was thinking of actually. Maybe there aren't that many "dangerous" settings. So I guess we should we add more dangerous lables hey?
As an aside, that Sysop SQL queries section actually presents settings which are available only via an extension. Should that section be included on this page at all in fact? -- Harry Wood 08:38, 4 April 2008 (UTC)Reply
That section is a holdover from way back, when Special:Asksql actually worked. I guess it could be moved to Extension:Asksql without problems. Titoxd(?!?) 21:57, 25 June 2008 (UTC)Reply

DJVU

Could someone add See How to use DjVu with MediaWiki, in DjVu section of this page ? Thanks.

Sunflower

I like the sunflower on the top left.:)

You can thank User:Anthere for it. --Nemo 06:49, 10 August 2014 (UTC)Reply

Need sample LocalSettings.php file

Trying to customize the file, but I'm having trouble figuring out which values to use. For instance: should

$wgProxyList  = true ?
$wgProxyList  = a URL?
$wgProxyList  =  something else entirely??

If there were a sample file that had all the values filled out, it would be easier to tell at least what I'm looking for.

Or, maybe even better, is there a list somewhere of what the possible values are for all the different variables? (I don't mean the ones that are site specific, like the site's URL.)

Just updated the document at Manual:$wgProxyList. In fact this is an array of IP addresses. For other variables, click on the links, those pages should say allowed values for each setting. iAlex 21:23, 4 December 2008 (UTC)Reply

Enabling support for Hijri (Islamic) calendar Feature in 1.13.3?

Dear, I've found this feature in 1.13.0 and am installing 1.13.3, but could not find any documentation on this feature? how to enable it and what affect is going to be there in my wiki? can anyone help me where to find out more about it? --Ageel 07:21, 19 January 2009 (UTC)Reply

Disable feed for particular namespace

Hi, is there a way to disable syndication only for a certain namespace? I would like to disable feed for pages in the user namespace, like for people playing in their User:username/sandbox.
Thanks. --Morue69 13:10, 24 March 2009 (UTC)Reply

How to send emails to particular group is there any settings?

Hi I have to send email to a particular group when a content is updated how to configure..

Why don't each one of these configuration pages list where they are located?

Why don't each one of these configuration pages list where they are located? It is madding to try and find exactly where each file is. For example: $wgAllowTitlesInSVG where is it located?Rumpsenate 06:56, 17 July 2009 (UTC)Reply

What do you mean by "located"? Where they are defined? In this case they're all defined in includes/DefaultSettings.php or where they are used? In that case it's includes/specials/SpecialUpload.php for $wgAllowTitlesInSVG (or includes/upload/UploadBase.php since 1.16). iAlex 10:44, 22 September 2009 (UTC)Reply

Accounts

My wiki has recently had a mother load of spam bots come in and edit as they pleased, took me ages to restore everything. Is there a way to set the wiki up so that only people who create accounts on the wiki can make edits? And if so, can account creations be monitored by myself so that I can accept or decline an attempted account creation? --124.187.51.10 06:35, 8 May 2010 (UTC)Reply

Development question: Putting configuration settings in the database vs. LocalSettings.php

When should configuration settings be put in the database rather than in LocalSettings.php? This question occurs to me in light of the recent proposal to add a field to the interwiki table for database name. A similar question arose in the discussion at Extension talk:InterwikiIntegration, in reference to whether it would be better to set wiki database names in a shared database table or in LocalSettings.php, and we basically concluded that it was better to set the database names in InitialiseSettings.php.

It seems to me that we usually put settings in LocalSettings.php when (1) the configuration setting is needed in order to even reach the database, as is the case with, e.g., $wgDBname and $wgDBpassword; (2) they are going to be changed a lot and therefore it's impractical to require the site owner to manually change them, or (3) when there is a lot of data to store, as is the case with the interwiki table, which has several dozen rows. On the other hand, database reads impose overhead, so it would seem more efficient to use configuration settings set in LocalSettings.php when possible. Hmm, I wonder if there is any way to get the best of both worlds (i.e. efficiency and ease of modifying the settings)? I guess we'll just have to see how that GSoC project to revamp the configuration settings system turns out. Tisane 23:42, 14 June 2010 (UTC)Reply

Beginner's opinion about this manual

Such a manual may have sense as a reference base for the administrators who already have some Mediawiki supporting some basic functions. But this manual is recommended in the LocalSetting.php and the beginners have to deal with thousand of options that are not yet supported at their servers, searching for any workable configuration... Tori 12:41, 1 March 2011 (UTC)Reply

I think for the basics you're supposed to use Manual:System administration in general and Manual:LocalSettings.php for settings specifically. This is just an index. --Nemo 06:46, 10 August 2014 (UTC)Reply

Shared uploads

I see that $wgForeignFileRepos is included in the bulleted list within the Shared Uploads section, which begins: "These settings are kept for backward compatibility..." Isn't $wgForeignFileRepos still current? In which case, should it be removed from the list? - GrahamSmith 16:24, 7 September 2011 (UTC)Reply

.htaccess

RewriteCond %{HTTP_HOST} ^123\.45\.67\.89 RewriteRule (.*) http://www.example.com/$1 [R=301,L]

Make sure mod_rewrite is on in httpd.conf

Configuration???

Seriously, to configure MediaWiki, we are supposed to copy lines from DefaultSettings.php to LocalSettings.php and then edit the PHP code by hand? And break the entire installation if we forget a semicolon, quote or bracket? This is ridiculous! 64.134.101.31 20:08, 29 April 2012 (UTC)Reply

For the first part, I find it better to actually add the lines myself without ever looking at my DefaultSettings.php. There are extensions that allow graphical configuration of settings, but they can't cover all of them; MediaWiki does however use such a configuration file and that's the way it has been for some time. For the second part, then, a simple syntax error breaks the configuration file, just like any other text-based configuration file (like INI files on Windows).--Jasper Deng (talk) 20:15, 29 April 2012 (UTC)Reply

Missing variable

Hi guys,

In the section "Profiling " the variable "$wgEnableProfileInfo" is missing. Please add it!

Thanks --88.130.109.215 15:36, 8 September 2012 (UTC)Reply

Error in page

Can't work out how to deal with this but there is a typo on the page in the users section.

Current line is * $wgLivePasswordStrengthChecks (deprecated in 1.17) - Enabes or disables JavaScript-based suggestions of password strength.

Enabes should be Enables.

Fixed.--Jasper Deng (talk) 20:37, 6 October 2012 (UTC)Reply

$wgEnableMWSuggest dosn't exist in 1.20

Can you please update comments and pages about $wgAjaxSearch and $wgEnableMWSuggest as both options doesn't work anymore ?

Thanks by advance --Jibec (talk) 23:54, 14 November 2012 (UTC)Reply

How do I add a Checkuser special page?

How do I add a special page that has to do with CheckUsers and the CheckUser log? Cmach7 (talk) 21:12, 1 January 2013 (UTC)Reply

I'm not sure what you are asking for here.--Jasper Deng (talk) 20:14, 2 January 2013 (UTC)Reply
I'm asking how to activate the Checkuser Log and the Checkuser special page Cmach7 (talk) 22:05, 3 January 2013 (UTC)Reply
Install Extension:CheckUser on your wiki and assign appropriate userrights.--Jasper Deng (talk) 02:37, 4 January 2013 (UTC)Reply

How do I use $wgServer?

Once I use $wgServer, my wiki breaks. Can you please help me? Cmach7 (talk) 01:30, 4 January 2013 (UTC)Reply

What value are you assigning to it?--Jasper Deng (talk) 02:38, 4 January 2013 (UTC)Reply

Hide external link URLs in printable view?

When we use the printable version of a page on our wiki, it displays the full URL of any external links on the page. It makes for some pretty ugly pages, and it's not like I'm going to go type in some huge URL from a printed page. Is there any way to turn this feature off? Thanks. --Jamesmontalvo3 (talk) 20:59, 19 April 2013 (UTC)Reply

404 error for file DefaultSettings.php

The url for DefaultSettings.php gives a 404 error: includes/DefaultSettings.php

The following url works: https://git.wikimedia.org/blob/mediawiki%2Fcore.git/e7f4f3a2f0b3c8e8c293a8e58c525a39beed1113/includes%2FDefaultSettings.php

I guess I can go ahead and change this, but I was wondering if there is a friendly url that works. Rrostie (talk) 10:05, 4 July 2013 (UTC)Reply

the following url is the appropriate one to use to view/browse the code:

https://github.com/wikimedia/mediawiki-core/blob/master/includes/DefaultSettings.php Rrostie (talk) 10:05, 4 July 2013 (UTC)Reply

HTCP configuration

Manual:Configuration settings#HTCP multicast purging is outdated.

The old variables still work (as of MW 1.23), but only because they're copied to the new variables in includes/Setup.php 66.102.87.61 15:09, 8 March 2014 (UTC)Reply

Ideas for making translatable

We have about 30 settings having a translatable manual, for instance Manual:$wgReadOnly and Manual:$wgAllowMicrodataAttributes. There are however about 600 more with a {{Languages }} template: Project:Language_policy/Migration_list#Configuration_settings. Other than the setting summary, for which see bugzilla:50124, what would a sensible way to make them translatable? I think we could:

  • make this page translatable, keep the English headers as invisible anchors and avoid using them for links;
  • store/access the translations of the section names in a lua module, then use that to display localised link labels in Template:SettingSummary;
  • apply this markup automatically by bot, then let translation admins approve and import translations;
  • maybe find a way to automatically list settings here based on the section they're declared to belong to in the respective page (perhaps with DPL? but that can only list titles);
  • ideally also transclude the (translated) setting summary from the respective page, e.g. with LST; let's see if this shows anything: {{#lst:Manual:$wgReadOnly/en|summary}}

(no, it seems it doesn't; doesn't interact well with Translate I guess). The first three are easy, the last two are not quite. --Nemo 07:23, 10 August 2014 (UTC)Reply