Manual talk:LocalSettings.php

Latex Equations
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
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)

Language
''The wgEmergencyContact variable is the e-mail address of the user to contact when shit happens. This e-mail address is used to send internal bug reports to. As an administrator, you want to include your e-mail address here.''

Is that language necessary? --Guest


 * Maybe, if it's appropriate. Shit does happen. I guess whether or not the language is appropriate depends on how shitty the situation is in which the email address is used. Maybe the use of the word will encourage admins to fill it in. GreenReaper 07:08, 26 Feb 2005 (UTC)

Pretty unprofessional if you ask me......but then, no one did, did they? -- Bob

Linking to an external file
Is it possible to Link to a file on an external device? Like file:\\\myserver.org\MyDocs\Letter.doc ?

(Newbie) 09 Jun 2005

yes -add file: protocol to the supported list in localSettings.php (the list definition may need to be copied from defaultSettings.php - never edit defaultSettings.php!) - bk

One user-db for multi mediaWiki's?
Hello, I will install multi mediaWiki's on my homepage, but i don't like that, the user must be regisrie/login of all my wiki's. How can/must be chance the LocalSettings.php to use one 'user'-DB?

I know/think must use
 * a one mySQL-IP (???.???.???.???)
 * a one mySQL-DataBase-Name (DB????)
 * a one mySQL-DataBase-Tabel for the user-name/-password ('user')
 * and for all wikis must set a prefix ('en_????', 'de_????', and so....)

Ok, but now? what must chance for all wikis? to use the 'user'-tabel in all wikis? How chance the prefix for 'user'-DB from 'en_user', 'de_user', ..... -> TO -> 'user' without a prefix for the 'user'-DB ?

Please can you write me onto my page discussion-page.

Thanks --FireDragon 21:03, 10 Jun 2005 (UTC)

OK, I have found http://meta.wikimedia.org/wiki/Single_login/IMSoP Now I have tempted to set the $wgSharedDB var in the LocalSettings.php, but I've got a mistake: ...(SQL query hidden)... Function "User::idFromName". MySQL ... Table 'db2000.de_user' doesn't exist (localhost)". Thats right, because I have rename the tabel 'de_user' to 'user'  In the DefaultSettings.php is: > $wgSharedDB = null; < and I write in the LocalSettings.php > $wgSharedDB = "user" or $wgSharedDB = array('user')  Please can anybody help me? I don't understand the var setting --FireDragon 10:46, 12 Jun 2005 (UTC)


 * Oki, I think I have found a Bug for this problem! see more on my user-page or Bug2396 at http://bugzilla.wikimedia.org/show_bug.cgi?id=2396  --FireDragon 21:05, 12 Jun 2005 (UTC)

Installation Error
I am a total newbie trying to implement my first installation of MediaWiki. When I run the installer by pointing to the config folder I almost get an installation. But, I get the following output and have no idea where to go frem here or even if I am posting this at the right place in the right way. Here is the output and I am hoping someone can help me complete this installation:


 * 1) PHP 4.3.11: ok
 * 2) Warning: PHP's register_globals option is enabled. MediaWiki will work correctly, but this setting increases your exposure to potential security vulnerabilities in PHP-based software running on your server. You should disable it if you are able.
 * 3) PHP server API is apache; ok, using pretty URLs (index.php/Page_Title)
 * 4) Have XML / Latin1-UTF-8 conversion support.
 * 5) PHP is configured with no memory_limit.
 * 6) Have zlib support; enabling output compression.
 * 7) Turck MMCache not installed, can't use object caching functions
 * 8) Found ImageMagick: /usr/bin/convert; image thumbnailing will be enabled if you enable uploads.
 * 9) Found GD graphics library built-in.
 * 10) Installation directory: /mounted-storage/home5/sub004/sc12824-RFHO/www/freeflow/FFWiki
 * 11) Script URI path: /FFWiki

Fatal error: Undefined class name 'title' in /mounted-storage/home5/sub004/sc12824-RFHO/www/freeflow/FFWiki/includes/Setup.php on line 370

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

Renaming site:Changing $wgsitename
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)
 * 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)

Basic question *HOW* to edit!?
It's assumed here, in the documentation of LocalSettings.php, that the readers knows where this file is.

It would be kinda helpful if the documentation told me that.

You might thing that "gee, if you need to edit LocalSettings then surely you know where it was installed". But that is not the case. In my case (just as one example) I have had a mediawiki installed for me on a hosted server.

Now the first thing I want to do is change $wgLogo. It's proving hard to do...


 * How to change $wgLogo:
 * you have to edit the file LocalSettings.php which will be in the main directory of you wiki-installation
 * always good to do: copy the original LocalSettings.php to LocalSettings.php.backup (just in case)
 * change the value of $wgLogo
 * activate the changes (just hitting the refresh-button doesn't help always. Probably depending on the browser settings...)
 * hit the refresh-button in you browser. You might also have to delete the cache to make the changes visible!

I have a question: I'm on my wiki. How can i reach the file and what i need to do to edit it? -20eric06


 * LocalSettings.php is not editable from the wiki (probably because this would create massive security risks). To edit this kind of file, you need a way to edit files on your server's file system. Evidently, the authors of the LocalSettings.php help assume the reader is the same person who installed MediaWiki on a given server. If you have the skills to get through Help:Installation, then you have the skills to edit any of the setup files such as LocalSettings.php. Obviously this assumption fails for the potentially large class of MediaWiki sysops who hired a Web hosting service to install MediaWiki for them. If you hired someone else to install MediaWiki for you, then you are left with no obvious way to get at LocalSettings.php, that is if you rely on the MediaWiki documentation as your only information source.
 * The situation is not entirely hopeless, because every Web hosting service must provide some way for the customer to change files on the server. To find out the method(s) you can use, contact your Web hosting service or look on their Web site for documentation. The details will vary from one service to another, but every hosting service customer needs to change files on the server, somehow, so any competent service will tell you how they let you do this. Here are some methods your service might use:
 * Web content management system
 * Unix shell login, via telnet, ssh, etc., and then you use a text editor running on the server (such as the newbie-hostile vi or emacs) to edit files there. This method might be common for servers running a LAMP software bundle.
 * The service might let you download files via ftp (or rsync, FileZilla, etc.), edit them locally with some editor such as Notepad, and upload them back to the server.
 * The service might charge you a fee and edit files on their server for you.
 * Note: something like my explanation above probably belongs in a help page here aimed at MediaWiki sysops who had a Web hosting service install MediaWiki for them. &mdash; Teratornis 17:39, 7 September 2006 (UTC)


 * If you hire a Web hosting service to install MediaWiki for you, you might benefit from also installing MediaWiki on your own Windows computer, so you can experiment with customizing it. It would probably be cheaper to prototype with your own MediaWiki install, where you won't be getting billed by the hour; then when you know exactly what to change, you can contact your Web hosting service to see about making the same changes on their server. If you learn what is going on behind the wiki interface, things like LocalSettings.php will make more sense. Teratornis 20:27, 7 September 2006 (UTC)

help
How can i get to "My LocalSettings.php"?--w:User:the editor1

Location and rights
I have two LocalSettings.php -files, one located at ./ and another at ./includes/. Which one's the one to edit? Furthermore, what rights should the file have? At the moment, no changes I make result in any changes. The mode is at 660 (I don't have the rights to change the mode). Thanks for any answers 193.229.103.232 09:25, 16 May 2006 (UTC)

WTF
How do I edit LocalSettings.php? My Wiki's adress is http://smashbros.elwiki.com/ (there's no "wiki" in articles, so an article would be at smashbros.elwiki.com/Main_Page). The question is: where is that file? --Smiddle 213.64.166.76
 * You should ask ElWiki themselves. There's an e-mail address on their front page, elwiki AT Zone-MR DOT NET; alternatively there may be some kind of support tool when you're logged into the site. I don't know, I'm afraid; I'm not registered on that site. RichF 16:34, 21 August 2006 (UTC)
 * I tried to enter smashbros.elwiki.com/LocalSettings.php, and I get the following message:
 * "This file is part of MediaWiki and is not a valid entry point"
 * I try to edit it, smashbros.elwiki.com/LocalSettings.php&action=edit, and I'm only editing a regular article called LocalSettings.php.
 * Edit: I tried /includes/LocalSettings.php, and it redirects me to an article called 403.shtml. I can just say one thing: I'M A NOOB --Smiddle 19:43, 1 September 2006 (UTC)
 * LocalSettings.php is a file on the filesystem that you need to edit. It's not a wiki article, or something you can edit through the wiki site itself. You need to be able to modify the file on the server itself. I don't know if ElWiki allow you to edit LocalSettings.php, and if they do, I don't know how. You will need to e-mail the people who run the site. Sorry. RichF 19:49, 1 September 2006 (UTC)
 * oh snap. I'll try that then. --Smiddle 19:52, 2 September 2006 (UTC)

Where is this file?
I believe that if I find the LocalSettings.php file, I can translate all of the namespaces (currently in English) into my language wikipedia.

Unfortunately, no matter what I try, I cannot seem to locate this file.

I notice that many other people have asked this same question, but I have not found any answer.


 * See my comments above in Basic question *HOW* to edit!?. It sounds like you don't have access to the file system on the server that hosts your MediaWiki software. If you did, and if your server runs a Unix-like OS (which I believe is true for all the language Wikipedias), you could probably find your LocalSettings.php with a  command like this:
 * If you need to prototype some complicated MediaWiki setup, you may be better off installing your own MediaWiki to practice with, and then when you know exactly what you want to change, contact your Web hosting service (which in this case sounds like it would be the system administrators for your language Wikipedia, that is, the people who have file system access to the servers rather than merely administrator access through the wiki interface). &mdash; Teratornis 03:42, 8 September 2006 (UTC)
 * If you need to prototype some complicated MediaWiki setup, you may be better off installing your own MediaWiki to practice with, and then when you know exactly what you want to change, contact your Web hosting service (which in this case sounds like it would be the system administrators for your language Wikipedia, that is, the people who have file system access to the servers rather than merely administrator access through the wiki interface). &mdash; Teratornis 03:42, 8 September 2006 (UTC)

What do I have to do? The rest of the interface is mostly translated, only the namespaces are still in English. Thanks for anyone who can help. Codex Sinaiticus 07:10, 27 August 2006 (UTC)


 * Translated text, including namespace names, can be found in the  files. Usually, if Wikipedia has been translated into a particular language, the namespaces will have been done at the same time. Which language are you translating into? RichF 22:06, 29 August 2006 (UTC)


 * I am the one who did the interface translation into Amharic myself, by modifying the Mediawiki files on that wikipedia over the past year as admin. But there is no way I can change the namespaces myself, that I know of.
 * Not via the wiki interface. You, or the people who run the server(s) that host the wikipedia you are describing, have to edit the LocalSettings.php file via the server's file system. Teratornis 03:42, 8 September 2006 (UTC)
 * On a related note, on the preferences, "amharic" (am) shows up as a choice for the interface only on the Amharic wikipedia.. It would be amazingly cool if this choice could be added with all the other languages for the other wikipedias, so that the Amharic interface I have designed could be used with any language wikipedia. Most of the small languages that are already available for interface on all the wikipedias in the preference section, are not even translated at all yet, and end up being English by default. Can you put a "bug" in some developer's ear about that?  Thanks Codex Sinaiticus 15:30, 31 August 2006 (UTC)
 * Below is an excerpt from, which is the French translation. This part of the file is providing French text for the namespaces. I haven't done a translation myself, but looking at this file, it does seem to be possible, and editing the   file seems to be the way to do it. RichF 19:52, 1 September 2006 (UTC)

/* private */ $wgNamespaceNamesFr = array(       NS_MEDIA                        => "Media",        NS_SPECIAL                      => "Special",        NS_MAIN                         => "",        NS_TALK                         => "Discuter",        NS_USER                         => "Utilisateur", ...several more lines like these...        NS_HELP_TALK            => "Discussion_Aide",        NS_CATEGORY                     => "Catégorie",        NS_CATEGORY_TALK        => "Discussion_Catégorie" ) + $wgNamespaceNamesEn;

!!!H E L P!!!

Is it me or is this question simply *not* getting answered? Or maybe I'm in the Twilight Zone!!! I'm running *my own* MediaWiki install on *my own* Linux box and have access to everthing; everything, that is, EXCEPT 'LocalSettings.php'!!! Why? Because I can't find it either!!! I installed MediaWiki into username/public_html/wiki like a good boy. This is the 'main directory' referred to above. And it's *not* there!!! Did the find / -iname 'LocalSettings.php' -print thing too. Negatory maximus... Can someone please tell me where this @!#$ file is? I'm not too proud for a 'LocalSettings.php For Dummies'!!!


 * The LocalSettings.php file is created by the installer. Run the installer: visit your wiki with your browser (at http://localhost/wiki or whatever) and follow the instructions. When you are through, the last step is to move the freshly generated LocalSSettings.php to the right location, to make it go live. You can edit it before or after moving, as you like. -- Duesentrieb ⇌ 22:14, 9 May 2007 (UTC)

rebuildMessages.php
Is there a possibility to use rebuildMessages.php with the browser? Changing messages was easier before... --Edi Goetschel 22:33, 11 November 2006 (UTC)


 * If done it with a re-installation of the Wiki... a bit clunky. --Edi Goetschel 22:52, 11 November 2006 (UTC)

Enabling subpages
This article isn't very specific about what should userd change in order to enable the subpages.

Should I copy paste the syntax $wgNamespacesWithSubpages[NS_MAIN] = 1; into LocalSettings.php? --T-man 21:03, 15 November 2006 (UTC) $wgNamespacesWithSubpages[NS_MAIN] = true; &mdash; MrDolomite | Talk 21:16, 15 November 2006 (UTC)
 * Yes, that's the right way, T-man. See Sub-page for the list of namespace name abbreviations to use when adding lines similar to the one below in your   file.

Enabling subpages for all namespaces
Is this correct: $wgNamespacesWithSubpages = array_fill(0, 200, true);
 * 1) Enable subpages in all namespaces

I can't enable image uploads!!
I'm a total newbie at MediaWiki, and I want to allow me and my users to upload images. But it seems like I messed up my installation. I tried editing localsettings.php, but the following shows up:

To enable image uploads, make sure the 'images' directory ## is writable, then set this to true: $wgEnableUploads = true;Error, Setup.php must be included from the file scope, after DefaultSettings.php

Please help me with this...

Shuld I save Localsetting.php as utf8 encoding ?
If I want to use some ExtraNamespaces in Chinese, I have to save Localsetting.php with utf8 encoding. But sometimes some error will occur, for example, the setting in common.css page will be desable and some functions will become unstable.

When I save it with other encoding, like big5 encoding, the ExtraNamespaces in Chinese will be unable.

Now, I save Localsetting.php in English and insert a line like followed: require_once( "$IP/extensions/ExtraNamespace.php" ); The ExtraNamespace.php is a utf8 encoding file and the content of the file is the setting involved with ExtraNamespaces. Then all problems I've met will be solved.

Can I do it by this way? or I should not use any ExtraNamespaces in Chinese. But I've tried to set all ExtraNamespaces in English and change the file .\languages\messages\MessagesZh_tw.php, but I always failed. Perhaps I don't know how to edit the MessagesZh_tw.php. any ideas? --Roc michael 16:12, 13 July 2007 (UTC)
 * Mediawiki 1.9.2 and 1.9.3 in Chinese interface
 * OS windows server 2003
 * The AppServ Open Project - 2.5.7 for Windows
 * Apache Web Server Version 2.2.3
 * PHP Script Language Version 5.1.6
 * MySQL Database Version 5.0.24a
 * phpMyAdmin Database Manager Version 2.9.0.2

DON'T USE NOTEPAD TO EDIT LOCALSETTINGS!!!

$wgNamespacesWithSubpages[NS_MAIN] = 1;
With mediawiki-1.9.3 it is :

Questions. Please message me on my userpage if you have the answers
PatPeter 21:17, 9 October 2007 (UTC)
 * 1) My first question was answered in the question directly above.
 * 2) I am short on time just ignore this until I come back.