Manual talk:LocalSettings.php

From MediaWiki.org
Jump to: navigation, search
Please do not post support questions here.

Instead,

Further options for contacting appropriate people can be found at Communication.

Language: English  • Deutsch • español • français • 日本語 • 한국어 • Nederlands • polski • português • русский • ไทย • 中文(简体)‎
An archive box
Archives
Archive 1

Latex Equations[edit | edit source]

I believe there are some missing steps in the Latex equations enabling instructions in this page.

I have miktex intalled and latex is in the path. I edited LocalSettings as explained but I still receive the message: Failed to parse (Missing texvc executable; please see math/README to configure.)

I have seen the file but still could not make it work. I think I should have texvc executable in the math directory, but I could not make "Make" works. Is there any texvc.exe already compiled for windows? --Fredguth 18:59, 7 July 2006 (UTC)

Thumbnails[edit | edit source]

Isn't $wgUseImageResize = true; also required for thumbnails? Is ImageMagick required or can MediaWiki's internal thumbnailer also be used? 203.117.95.42 06:43, 22 Jul 2004 (UTC)

[edit | edit source]

The Logo section says to use the relative URL, however I had to use the full canonical URL... What gives?


  • <WHY> did you have to use the full URL? Maybe you were having the same problem I was... I think:
$wgLogo = "$wgStylePath/common/images/wiki.png";

Should be:

$wgLogo = "{$wgStylePath}/common/images/wiki.png"; 

and you need to define $wgStylePath not as "/var/www/html/wiki/skins/" (or whatever, that's the path from / on my machine), but as the URL path (and thanks to YOUR clue, whoever you are, I found that):

$wgStylePath = "/wiki/skins/"

This works like a charm for me, so I'm going to edit the Manual:LocalSettings.php so others with no previous knowledge of mediawiki setup will not be lead astray the way I was. Cheers!

-Tzf 02:02, 2 November 2007 (UTC)


Well, Tzf, I'm glad it works so well for you. Though I've been a wiki admin for quite a while, I never needed more than the old wikimedia interfaces before. Now my duties in developing a new wiki involve working with LocalSettings.php, and that setting sure screwed me up. I'm not touching the article because I know that I don't know enough to do it. Ever call in to tech support with a problem and hear "Well, it works all right on my machine"? -- Thnidu 19:02, 22 July 2009 (UTC)

After a couple of hours of tinkering with the LocalSettings.php file, resizing my logo.png to below 135 x 135 px, and reloading several times, I finally found out that I had done everything done correctly the second attempt. I just hadn't cleared by browser cache so it looked like I continued to fail. LFMF, and clear that cache. Greggem 00:31, 30 July 2011 (UTC)

Renaming site:Changing $wgsitename[edit | edit source]

I need to change $wgSitename var in the LocalSettings.php since is started with "MyWiki", but i created documents such as "MyWikipedia". If I change $wgSitename to "MyWikipedia", then all the articles starting with "MyWikipedia" disappear. I want to move the "MyWikipedia" to it's own name space - essentially the sitename. Help... :-) I have a bunch of documents with the namespace of "MyWikipedia:" that want to use as the site/project name. I'm using MediaWiki 1.5.5. -Mitch 21:20, 12 January 2006 (UTC)

You can move pages into another namespace. Manual:NamespaceDupes.php might help, also see Manual:Using_custom_namespaces. --Jörgi123 (talk) 15:29, 30 April 2014 (UTC)
I have a similar problem but maybe a bit trickier. My site's in German, I'd like to change the site's name to something that contains an Umlaut. Doing this in LocalSettings.php I end up with funny characters on the screen, as described elsewhere. (If anybody has a solution to this I'd be very happy.) Additionally, part of the pages disappear as Mitch describes. My approach would be to create a database dump and then reinstall the wiki with a new name, then import the dump. I havent tried it yet because I'd like to find a more elegant way to do this. Any hints? --84.151.189.28 02:40, 21 January 2006 (UTC)
Or you just fix the encoding of LocalSettings.php - that would save you some needless work and would also be an option. ;-) --Jörgi123 (talk) 15:29, 30 April 2014 (UTC)

wgSpamRegex[edit | edit source]

This page of the manual ought to have a link to Manual:$wgSpamRegex, which is yet another setting in the LocalSettings.php file. (I would have already added it myself if the page wasn't locked). --DavidCary 23:08, 15 December 2007 (UTC)

How do I get my domain name to work?[edit | edit source]

I have an add on domain set up in my cpanel to point to the wiki directory inside my root directory. What do I need to do for newusconstitutionwiki.org to open when the domain name is typed. When I type in newusconstitutionwiki.org I get the following error:

The requested URL /constitutionwiki/index.php5 was not found on this server.

That is the correct name (constitutionwiki) for the directory I have the mediawiki files in!

This is the path I see in the address bar: http://newusconstitutionwiki.org/constitutionwiki/index.php5?title=Main_Page

The index.php5 file is there so what gives?

I have done searches and can't find anything that addresses this situation.

I am totally new to mediawiki!!

How to use interwiki images?[edit | edit source]

I want to use images on commons in my site. Is this possible. If yes how I can do that? -Redgwan 08:16, 23 August 2009 (UTC)

You should use Manual:Image_Administration#Foreign_Repositories. --Arseny1992 03:24, 28 November 2009 (UTC)

The Comment #UPO[edit | edit source]

Can anybody tell my what thet Comment want's to point out? I found it in multiple locations in the LocalSettings.php for example:

$wgEnableUserEmail  = true; # UPO

I couldn't make sense of it. (and it probably is not important, since it is a comment) --153.96.161.212 16:13, 4 November 2009 (UTC)

It actually says what it means in the file: “UPO means: this is also a user preference option” --ucc 11:17, 11 November 2009 (UTC)

$wgGroupPermission BEFORE OR AFTER extension calls?[edit | edit source]

Hope I'm i the right place to ask this. Would like to know what the correct order is between $wgGroupPermission and extension require/include_once calls? Should the permission be granted before the extension is loaded? Or vice cersa?

Which of these two is correct:
$wgGroupPermissions['group' ]['function' ] = true;
require_once("$IP/extensions/Folder/File.php");
OR
require_once("$IP/extensions/Folder/File.php");
$wgGroupPermissions['group' ]['function' ] = true;

OR does it matter? I have been testing both orders and either seems to work but some extension authors insist one order while another author wants it the opposite. 'Put mine first', 'Put this last'. I just want to know how the MW core system wants. And if every author wants their stuff last what then? Confused 06:16, 11 March 2011 (UTC)

Usually the extension installation guides advice to first include the extension and then to set group rights for them. --Jörgi123 (talk) 13:45, 30 April 2014 (UTC)

Terms of Use[edit | edit source]

I try to find out since months how to add the "; additional terms may apply. See Terms of Use for details." phrase. What I have to do to get this text too? --213.47.162.108 12:15, 2 November 2011 (UTC)

Edit MediaWiki:Copyright on your wiki and add it to the existing text. Reach Out to the Truth 19:37, 3 November 2011 (UTC)
Thanks for your advice, but it doesn't work for me. MediaWiki's MediaWiki:Copyright has a different text too. --213.47.162.108 22:36, 3 November 2011 (UTC)
Yes, it has different text on this wiki. That's because Wikimedia sites override that message with a completely different message. The message isn't used on this wiki, but by default it is. If your wiki is public, can you post a link so I can take a look? Reach Out to the Truth 20:26, 4 November 2011 (UTC)
Ok, my bad. The text is changed, but I can't define the reference to $2. I have to use two links (like MediaWiki)--213.47.162.108 15:32, 5 November 2011 (UTC)
$1 is replaced by a link to $wgRightsPage or $wgRightsUrl with the text of $wgRightsText. $2 is not replaced by anything. So yes, you need to put the link in the message manually. Reach Out to the Truth 15:49, 5 November 2011 (UTC)

Problem with installer[edit | edit source]

After walking through the installation, I get the "Complete!" page, telling me that I have successfully installed mediawiki.

The installer has generated a localsettings.php file.

The download offered, and the link on the page throws this error, however:

"Internet Explorer cannot download index.php from localhost. Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later."

Restarting the installation results in same answer. Without this file I can't get into my wiki because it believes it to be unconfigured.

Suggestions?

Most probably some kind of file download problem with IE. Try with another browser. --Jörgi123 (talk) 15:12, 30 April 2014 (UTC)

Check user permissions before loading extension[edit | edit source]

Hello. I was wondering if there is a possibility to check the permissions of a wikiuser inside LocalSettings.php and depending on the outcome load an extension? Now we are using the below code, this works fine when the wikiuser uses the same laptop or computer all the time but that is often not the case.

$remhost = array("laptopname1", "computername2");
 
if (in_array($_SERVER["REMOTE_HOST"],  $remhost )) {
 
		require_once("$IP/extensions/extensionx/extensionx.php");
 
	}

If possible, we would like to check if a wikiuser is member of a group like the sysop's and only then load extensionx. If the user is not part of the sysop group the extension is not loaded. Then it does not matter on which computer or laptop the user is working. Regards, --Jongfeli (talk) 07:32, 14 August 2013 (UTC)

I would say that is not possible: At the time when LocalSettings is first read (and so when the extensions are included), a user object does not yet necessarily exist. Consequently, at that point, you cannot check permissions of a MediaWiki user. --Jörgi123 (talk) 16:19, 30 April 2014 (UTC)

Sample file[edit | edit source]

Is there an example somewhere of a working current-version LocalSettings.php? Regards, Guido den Broeder (talk) 22:19, 16 August 2014 (UTC)

The exact content of LocalSettings.php changes based on user input during installation and based on the different MediaWiki versions - offering one here does not create much benefit. --88.130.116.224 16:56, 2 September 2014 (UTC)