Project:Support desk/Archives/Miscellaneous/002

Jump to navigation Jump to search

(RESOLVED) How can I change User Links on top?

I'd like to add a new User Link on the very right top of the page and remove some. Where can I change it? --Subfader 00:13, 13 February 2008 (UTC)

Try editing monobook.php and if necessary alter main.css on monobook. --'Truetech (Talk) Tournesol.png MediaWiki Support Team 04:02, 12 August 2008 (UTC)

(OUTDATED) How do I add more buttons on the edit page? - Does not work


i added in two different wikis the same for additional buttons in MediaWiki:Common.js, but in one the buttons do not appear. is there any variable that needs to be added to local setting to support additional buttons or what else might be the reason?

thanks in advance
kind regards
--TurboKanne 11:22, 19 February 2008 (UTC)

(OUTDATED) disabled access for spezial pages (with german umlaut) for not logged in users causes error

  • MediaWiki: 1.11.1
  • PHP: 5.2.0
  • MySQL: 5.0.26
  • URL: local testing

disabled access for most pages :

$wgGroupPermissions['*']['read'] = false;
$wgGroupPermissions['*']['edit'] = false;
$wgWhitelistRead = array("Hauptseite", "Special:Userlogin");
$wgGroupPermissions['*']['createaccount'] = false;

Error Message appears trying to access e.q "Spezial:Letzte_Änderungen" without login :

Interner Fehler

Invalid special page name ""


#0 /.../test/includes/Title.php(1305): SpecialPage::getTitleFor(false)
#1 /.../test/includes/Wiki.php(132): Title->userCanRead()
#2 /.../test/includes/Wiki.php(43): MediaWiki->preliminaryChecks(Object(Title), Object(StubObject), Object(WebRequest))
#3 /.../test/index.php(89): MediaWiki->initialize(Object(Title), Object(StubObject), Object(User), Object(WebRequest))
#4 /.../test/index.php5(1): require('/srv/www/...')
#5 {main}

I'm not a developer, but I compared the functions and found a solution : Is this a way, or can I get other problems without these lines ?

Function in Title.php : userCanRead()

I disabled all the folling lines, so it works again, like in MediaWiki 1.10

 * If it's a special page, ditch the subpage bit
 * and check again
if( $this->getNamespace() == NS_SPECIAL ) {
	$name = $this->getText();
	list( $name, /* $subpage */) = SpecialPage::resolveAliasWithSubpage( $name );
	$pure = SpecialPage::getTitleFor( $name )->getPrefixedText();
	if( in_array( $pure, $wgWhitelistRead, true ) )
		return true;
} 09:40, 24 February 2008 (UTC)

(RESOLVED) content bar

How can remove the content bar on the top of each page from the startpage or any page i dont need it? 06:10, 27 February 2008 (UTC)

What do you mean "content bar"? -PatPeter, Tournesol.pngMediaWiki Support Team 21:38, 1 March 2008 (UTC)
I guess, you mean the <div id="p-personal">…</div>? So maybe you like to add
div#p-personal { display: none; }
to your MediaWiki:Common.css. *confused* --WIKImaniac 22:45, 1 March 2008 (UTC)

(RESOLVED) Terminology - Call

Would it be correct to say that index.php "calls" the Logo image, calls the menus, etc? Smaug 22:32, 2 March 2008 (UTC)

I would say "define", and please, Smaug, use the template to post your topic. -PatPeter, Tournesol.pngMediaWiki Support Team 19:33, 3 March 2008 (UTC)
The logo image path is defined in LocalSettings.php which is included by index.php --Nad 21:40, 9 March 2008 (UTC)
Thank you. Smaug 18:25, 18 March 2008 (UTC)

(OUTDATED) Customising the Search

  • MediaWiki: 1.11.0
  • PHP: 5.2.5-0.dotdeb.2 (apache2handler)
  • MySQL: 5.0.51-2-log
  • URL: sorry, not allowed to


this is less an error report than a configuration matter which I didn't find in the "knowledge base", so to speak; I would like to know if you can customise the search in a way that it excludes all pages with a certain name in it (in this case it would be "Dienstberichte*"; having them searched, too, is an annoyance so I would like to generally exclude it somehow from the queries. Where do I have to add which line to be able to do so? 13:29, 3 March 2008 (UTC)

I take it that it isn't possible?....

(OUTDATED) Special:Allmessages won't display

  • MediaWiki: 1.11.0
  • PHP: 5.2.5
  • MySQL: 5.0.51
  • URL:

Some days ago my Special:Allmessages worked perfectly, but now i receive just an empty page. The sourcecode of the page looks ok, but between both body tags there is no data. My apache error log reports no problems.
I can still change system messages when I know their names through the url...I haven't found any other pages with this problem yet.
I'm logged in as WikiSysop and have all rights so this shouldn't be the problem...
Has anyone an idea how it came or how to solve this issue? 07:47, 5 March 2008 (UTC)

(RESOLVED) Special:Version does not work after upgrading from 1.6.9 to 1.11.2

  • MediaWiki: (Reported by your Wiki's Special:Version page) - which does not work: 1.11.2
  • PHP: 5.2.0-8+etch10
  • MySQL: 5.0.32-Debian_7etch5
  • URL: TechWiki

I upgraded my MediaWiki from 1.6.9 to 1.11.2 and everything seems to be working just fine except for my Special:Version page. It shows just nothing. It also did not work for the 1.6.9 to 1.11.1 upgrade which I performed with a copy of my wiki earlier due to some testing. I looked for a new option that maybe disables this page, but i found nothing alike. Since everything else seems to be working fine it is not a very big problem, but I would like to have it working. 13:47, 6 March 2008 (UTC)

Maybe you installed an extension that does not work with 1.11.2 anymore. --MF-Warburg 14:59, 9 March 2008 (UTC)
Yes, an new version of the cite extension solved this issue for me. -- 11:17, 16 March 2008 (UTC)

(RESOLVED) How to integrate media wiki log in with website?

How to integrate media wiki log in with website.? Please help ....

You mean how do you sync the MW login with non-MW login elsewhere on your site? It depends on how the rest of your website logs users in. Smaug 18:28, 18 March 2008 (UTC)

(RESOLVED) How can a SysOp edit a user profile/account?

  • MediaWiki: 1.6.8
  • PHP: 4.4.0-pl1-gentoo (apache2handler)
  • MySQL: 4.1.15-log
  • URL: mozillaZine

How can a SysOp modify an existing users profile such as registering a email address or changing the password? I know how to block a user or a range of IP users, and find a users contributions but can't find a special page that will let me do that. Do I have any options other than creating a new account for that user?

I've looked in Help:System admin and browsed our special pages. The only solutions I've found assume I have abilities that a SysOp doesn't have such as making a SQL query. i.e. all of the solutions seem to assume you're the person who installed the software.

The site admin is in the midst of moving the forum (phpBB) and wiki (MediaWiki) software to new servers and updating the forum software. Afterwards he will update the wiki software. Can you recommend any plugins that will provide some of the traditional user management capabilities that forum moderators are used to, for the wiki? We plan on eventually having all forum moderators also be knowledge base (wiki) SysOps. I'm obviously not expecting a integrated or a compatible solution, I'm just trying to find any way to do that type of account maintenance.

tanstaafl — 00:27, 9 March 2008 (UTC)

Extension:EditUser & Extension:PasswordReset. --Sayuri 11:28, 9 March 2008 (UTC)

(RESOLVED) HTML inclusion

Is it possible to include the HTML code below in a wiki page without installing Google Maps extension ?

<iframe width="300" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src=",-49.236774&spn=0.046501,0.051498&z=13&output=embed"></iframe>
<a href=",-49.236774&spn=0.046501,0.051498&z=13&source=embed" style="color:#0000FF;text-align:left">View Larger Map</a> 15:14, 13 March 2008 (UTC)

No, you will need the extension. --'Truetech (Talk) Tournesol.png MediaWiki Support Team 17:58, 10 August 2008 (UTC)

(OUTDATED) Removing retrievedfrom

How can I remove the retrievedfrom message? Because Google crawls that text and I don't want...

Lorenzone92 18:36, 14 March 2008 (UTC)

(RESOLVED) Fatal Error on 'Recent Changes'

  • MediaWiki: 1.12.0
  • PHP: 5.?
  • MySQL: 4.?
  • URL: Wyfopedia

My wiki has just stopped working. I can get ftp to it. Help! -Wyfopedia 21:23, 14 March 2008 (UTC)

Hi I have created an MediaWiki account now. IF you want to know what versions I'm on then please instruct me on how to find out. I'm worried that I have lost my database. I can see my wiki images. If I can download the database and images, I don't mind re-installing again from scratch. -Wyfopedia 21:31, 14 March 2008 (UTC)

You appear to have some problems with your rewrites. As a first measure you can set $wgUsePathInfo to false in your LocalSettings.php. Bryan Tong Minh 20:54, 15 March 2008 (UTC)
Thank you for your help Bryan Tong Minh. Wyfopedia 20:01, 21 March 2008 (UTC)

I have backed up the database and image files, and upgraded to v. 1.12.0. The site now seems to be working again. However, I have the following error on 'Recent Changes':

Fatal error: Class 'ChangesList' not found in /home/fhlinux182/w/ on line 221

-Wyfopedia 20:01, 21 March 2008 (UTC)

Try reinstalling just the specialrecentchanges file or go onto line 221 and tell me the code that there is an error on. --'Truetech (Talk) Tournesol.png MediaWiki Support Team 18:01, 10 August 2008 (UTC)

(RESOLVED) What is the variable name (Magicword?) for the current user's username?

  • MediaWiki: 1.11.1
  • PHP: 5.2.3 (apache2handler)
  • MySQL: 5.5.51a
  • URL: DishiWiki

I wish to personalize the special:newarticletext (and possibly others) to return/display the current user's username, e.g., "Greetings, Brian7632416."

What is the name of the variable for the current user's username, and how is it set forth in the newarticletext text?

Brian7632416 20:42, 15 March 2008 (UTC)

One option is Extension:Variables, but that's not the only way (and it may not be cache-friendly).
Various Uncyclopedias already do this using JavaScript. They have a template {{USERNAME}} which inserts a code into the page; a routine in the sitewide client-side JavaScript then searches for this code and substitutes the username. Very prone to use and overuse for nonsense like «*'''{{CURRENTDAY}}''' - {{USERNAME}} vandaliza este artigo e acaba sendo banido da [[Desciclopédia]] por ''Infinite''»[1] --Carlb 16:14, 18 March 2008 (UTC)
I must have overlooked Extension:Variables, so I'll go take a look. I've had really good luck with my only four extensions: RSS Reader, SGMT Mass Mailer, Breadcrumb by Category, and Google NewsBar. Thanks, Carlb. Brian7632416 05:25, 21 March 2008 (UTC)

(RESOLVED) Changing sidebar according to article-language


I'm currently translating my wiki from German to both English and Spanish. I'm happy with the solution to swap between the three languages, but as I modified the sidebar: Is there any possibility to indicate the article-language and change the sidebar accordingly? I already looked at Extension:LanguageSelector, Extension:Multilang and Extension: MultiLanguageManager but they all don't seem to tackle my problem as they assume the usage of an unchanged sidebar.

Kind regards, Timo — 11:09, 16 March 2008 (UTC)

Nobody any idea?
Timo -- 12:33, 29 March 2008 (UTC)

Hm. The example of given at Extension:MultiLanguageManager works with different languages in the sidebar (though I don't know if this is still MediaWiki). Elegant solution would be three wikis :-). What about additional sidebars added to Mediawiki:Sidebar? IMHO the most simple solution – there's just one "disadvantage": they will always show up together. -- 19:20, 10 May 2008 (UTC)

Currently in contact with the developer of the Extension:MultiLanguageManager. There might be a solution, I keep you posted.
Timo -- 06:04, 27 June 2008 (UTC)

(OUTDATED) Site visits

Hi! I'd like to show the number of (total) page views of the site.. This number is visible in the Special:Statistics page but I'd like to display it in my home page, the code would be similar to this: {{NUMBEROFTOTALVISITS}} --Lorenzone92 15:16, 16 March 2008 (UTC)

(RESOLVED) Variable/Magicword for number of articles in category?

What is the variable/magicword and syntax for returning/displaying the number of articles in a certain category?

My wiki is a recipe wiki. I would like to display on the main page the number of users (got it!) and the number of articles that are in the recipes category.

I tried experimented with


and such, [but (^look^)] it comes back as a template, and I'm trying to figure out why

Edit: Okay, I now know about the nowiki tag. Baby steps, but


denotes both a template and system variables (I think). But that's not my question, sorry to drift. —Brian7632416 01:11, 17 March 2008 (UTC)

You may want to create "recipes:" as a namespace and not a simple category; if you do so, {{PAGESINNAMESPACE:100}} (subsituting whichever namespace number you choose to use) would display the number of recipes. --Carlb 16:25, 18 March 2008 (UTC)
That's fantastic, Carlb. Then I THINK that, for pages in the Recipe namespace, I could change the tab to read "recipe" instead of "article," which would "un-confuse" my users. Thanks for the advice!Brian7632416 05:18, 21 March 2008 (UTC)
You can definately change what the tab says; I've done it on my wiki. It's one of the MediaWiki system messages (Special:Allmessages), though I forget which one exactly. But that would change the main namespace tab, which you may not even have to do. When you create a new namespace and visit a page in that namespace, where the article tab would be is a tab with the name of the newly created namespace. So you are probably covered in that regard. Smaug 22:32, 21 March 2008 (UTC)
Thanks Smaug, too. I'm trying to figure out how to make my new namespace "Recipes" searchable by default for all users, since that's what they'll come to DishiWiki for, mostly. Not finding anything, so I haven't created a new namespace "Recipes" yet. Any thoughts, anybody? -Brian7632416 00:24, 24 March 2008 (UTC)
Use $wgNamespacesToBeSearchedDefault. Smaug 02:14, 24 March 2008 (UTC)
Got it, just found it. Thanks, Smaug. Brian7632416 16:58, 25 March 2008 (UTC)

(RESOLVED) questions / mass actions

I have many questions :

  • How can I create many pages automatically ? If I can't, is there another solution ? IS there a programm for injecting pages ( created by scripting shell)
  • How can I know all the pages depending on a page ?
  • How can I delete all the page created the same day ?

Thanks — 09:36, 19 March 2008 (UTC)

Manual:FAQ#Importing from other types of files
if you look through this site or use google you will find many helpful articles like that one JohnShep 20:42, 19 March 2008 (UTC)

(RESOLVED) Subcategories with the same name

  • MediaWiki: 1.11.2
  • PHP: 5.2.5
  • MySQL: 5.0.45
  • URL: not ready

For example,I want create 3 categories:

  • Slackware
  • Ubuntu
  • openSuse

I want,that each category must have the subcategory called "Script". But the slackware's script,must be different from ubuntu's script and suse's script. It is possible?How? 19:27, 20 March 2008 (UTC)

Maybe you could just call the ubuntu subcategory "Ubuntu script" and the suse subcategory "suse script". I don't know if doing what you want to do is possible. Is this a suitable workaround? Smaug 19:39, 22 March 2008 (UTC)

Yes is a fine solution. But if I want only one category called Script foreach category(Slackware,suse,ubuntu...)it is possible?There are methods or extension that make this? thanks

The categories are identified by their names. How should it work with more categories using one and the same name? --Flominator 11:47, 8 April 2008 (UTC)

(RESOLVED) Ajax Search doesn't work since 1.12.0 upgrade

  • MediaWiki: 1.12.0
  • PHP: 5.2.5 (apache2handler)
  • MySQL: 5.0.51
  • URL: I don't have URL because it is internal

Hi all,

I've upgrade MediaWiki 1.11.2 to 1.12.0 and everything went fine until I tested the AjaxSearch. It is not working anymore. In my LocalSettings.php I have $wgAjaxSearch = true; and to be sure I added $wgUseAjax = true;. I thought the problem may have been because of the upgrade, so I did a fresh install, but this did not helped at all.

Is there something new we need to do, so that the AjaxSearch actually works? Or is there a bug. I know AjaxSearch received some bugfix since the patch 1.12.0.

Thank you for your help.

Maxime. — 14:09, 21 March 2008 (UTC)

It seems like we now need to activate the AjaxSearch in the preferences of the user in the Search tab...
Also, the new version of this Ajax search is bugged... I'll need to use the one from 1.11 + 1.12 to have a functional Search.
-- 14:57, 21 March 2008 (UTC)

(RESOLVED) Getting Rid of "Special Pages" link in Toolbox

  • MediaWiki: 1.13.0
  • PHP: 5.2.4-2ubuntu5.3
  • MySQL: 5.0.51a-3ubuntu5.1

I know that you can use MediaWiki:Sidebar to edit the portion of the sidebar above the search bar on the left hand navigation panels (assuming monobook), but what edits what appears in the "toolbox" below it?

No one system message seemed to do it, though I have seen individual messages for "toolbox" and "whatlinkshere". I looked through some of the code to try to find where the code might be calling these messages and am certain it is MonoBook.php. I don't know what to edit to acheive what I want, however.

Specifically, I wish to get rid of the "Special Pages" link in the toolbox box. How can I do this?

Thank you. Smaug 22:28, 21 March 2008 (UTC)

In /skins/MonoBook.php, find
foreach( array('contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages') as $special ) {
and replace it with
foreach( array('contributions', 'log', 'blockip', 'emailuser', 'upload') as $special ) {
Emufarmers(T|C) 01:07, 22 March 2008 (UTC)
It works. Thank you! Smaug 22:34, 22 March 2008 (UTC)

(OUTDATED) Blocking users issue

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:
    (SQL query hidden)
from within function "Block::insert". MySQL returned error "1062: Duplicate entry 'JSolomon-14-0-0' for key 2 (localhost)".

I get this error when I try to block any user in the special pages. —KDLevenham 13:17, 23 March 2008 (UTC)

(RESOLVED) MediaWiki optimization

  • MediaWiki: 1.10.0
  • PHP: 5.2.5 (apache)
  • MySQL: 4.1.22-standard-log
  • URL: Fan History Wiki

My wiki had problems with pages loading where we ended up with a few thousand articles in a category. This caused these pages either not to load or to load slowly. I queried my host about this. They said, among other things:

We tested the above mentioned URLs and managed to re-create the issue on our end. It is most likely caused by the timeout settings of our shared hosting servers, especially if the problematic pages contain lots of links with reference to your application's database.

Upon further investigation, we found out that the home page of your wiki is also loading a little bit slowly, due to the 274 links on this page. It loads for more than 2 seconds locally on the server, which it should not load for more than 1 second.

We will recommend you to contact a developer which is familiar with the source code of your application and possesses the required knowledge for optimizing it. The optimization usually involves reducing the number of links on the pages, reducing the overall size of the application's database, creating indexes for each table in the database, etc.

I switched to a VPS which makes some pages which previously wouldn't load now load. I also optimized the database on phpMyAdmin. I removed a few of the extensions which were not being used actively. But if some pages link to certain categories, like Category:People, new pages won't create and will time out. What more can be done to optimize things, fix the overly large category problem or just generally make the wiki load faster? I really want to continue to grow Fan History but this has thrown me for a loop. Is this something I can fix myself?

PurplePopple 02:29, 24 March 2008 (UTC)

Your site doesn't load for me, so I can't take a look at your categories, but we just had a similar query on the MWusers forums, and the simple answer was "caching." —Emufarmers(T|C) 05:49, 24 March 2008 (UTC)
The whole site doesn't load or just those pages? I've added the caching elements by adding $wgUseFileCache = true; and $wgFileCacheDirectory = "$IP/cache"; to the local settings but it doesn't seem to make the load any faster. I've removed a few more extensions. I've removed Google Analytics. It is still taking about 15 seconds for me to get Category:People to load and about 3 to get the main page to load. If I remove

## Shared memory settings $wgMainCacheType = CACHE_NONE; $wgMemCachedServers = array(); $wgUseFileCache = true; $wgFileCacheDirectory = "$IP/cache";

It actually seems to load a bit faster but not much. :/ (On a completely unrelated note, my host seems to have disabled image uploads... *sighs*) --PurplePopple 12:09, 24 March 2008 (UTC)

(RESOLVED) enforcing user login

  • MediaWiki: 1.11
  • PHP: 5.1.2 (apache2handler)
  • MySQL: 5.0.18

Hello to all helpers,
I want to ask you, if there is a chance to enforce an userlogin on mediawiki.
This wiki is planned to be used only from signed users.
We want to prevent anonymous users even from reading posts in the wiki.

What can I do to enforce an userlogin before entering any post?

Thanks for your help and best regards
Marco Rudzuck — 15:27, 26 March 2008 (UTC)

Manual:preventing access should help. --Flominator 11:50, 8 April 2008 (UTC)

(RESOLVED) Help/Error

This is what i get on my website.


Can somebody help me?

I will copy the text in the background for you.

, 2006 Rob Church # # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # error_reporting( E_ALL ); header( "Content-type: text/html; charset=utf-8" ); @ini_set( "display_errors", true ); # In case of errors, let output be clean. $wgRequestTime = microtime( true ); # Attempt to set up the include path, to fix problems with relative includes $IP = dirname( dirname( __FILE__ ) ); define( 'MW_INSTALL_PATH', $IP ); # Define an entry point and include some files define( "MEDIAWIKI", true ); define( "MEDIAWIKI_INSTALL", true ); // Run version checks before including other files // so people don't see a scary parse error. require_once( "$IP/" ); install_version_checks(); require_once( "$IP/includes/Defines.php" ); require_once( "$IP/includes/DefaultSettings.php" ); require_once( "$IP/includes/AutoLoader.php" ); require_once( "$IP/includes/MagicWord.php" ); require_once( "$IP/includes/Namespace.php" ); require_once( "$IP/includes/ProfilerStub.php" ); require_once( "$IP/includes/GlobalFunctions.php" ); require_once( "$IP/includes/Hooks.php" ); # If we get an exception, the user needs to know # all the details $wgShowExceptionDetails = true; ## Databases we support: $ourdb = array(); $ourdb['mysql']['fullname'] = 'MySQL'; $ourdb['mysql']['havedriver'] = 0; $ourdb['mysql']['compile'] = 'mysql'; $ourdb['mysql']['bgcolor'] = '#ffe5a7'; $ourdb['mysql']['rootuser'] = 'root'; $ourdb['postgres']['fullname'] = 'PostgreSQL'; $ourdb['postgres']['havedriver'] = 0; $ourdb['postgres']['compile'] = 'pgsql'; $ourdb['postgres']['bgcolor'] = '#aaccff'; $ourdb['postgres']['rootuser'] = 'postgres'; ?>
MediaWiki Installation
Setup has completed, your wiki is configured.

Please delete the /config directory for extra security.
" ); } if( file_exists( "./LocalSettings.php" ) ) { writeSuccessMessage(); dieout( '' ); } if( !is_writable( "." ) ) { dieout( "
Can't write config file, aborting

In order to configure the wiki you have to make the config subdirectory writable by the web server. Once configuration is done you'll move the created LocalSettings.php to the parent directory, and for added safety you can then remove the config subdirectory entirely.

To make the directory writable on a Unix/Linux system:

	cd /path/to/wiki
	chmod a+w config
Afterwards retry to start the setup.
" ); } require_once( "$IP/" ); require_once( "$IP/maintenance/" ); class ConfigData { function getEncoded( $data ) { # removing latin1 support, no need... return $data; } function getSitename() { return $this->getEncoded( $this->Sitename ); } function getSysopName() { return $this->getEncoded( $this->SysopName ); } function getSysopPass() { return $this->getEncoded( $this->SysopPass ); } function setSchema( $schema, $engine ) { $this->DBschema = $schema; if ( !preg_match( '/^\w*$/', $engine ) ){ $engine = 'InnoDB'; } switch ( $this->DBschema ) { case 'mysql5': $this->DBTableOptions = "ENGINE=$engine, DEFAULT CHARSET=utf8"; $this->DBmysql5 = 'true'; break; case 'mysql5-binary': $this->DBTableOptions = "ENGINE=$engine, DEFAULT CHARSET=binary"; $this->DBmysql5 = 'true'; break; default: $this->DBTableOptions = "TYPE=$engine"; $this->DBmysql5 = 'false'; } $this->DBengine = $engine; # Set the global for use during install global $wgDBTableOptions; $wgDBTableOptions = $this->DBTableOptions; } } ?>

    * Don't forget security updates! Keep an eye on the low-traffic release announcements mailing list.

Checking environment...

Please include all of the lines below when reporting installation problems.

      PHP " . phpversion() . " installed\n"; error_reporting( 0 ); $phpdatabases = array(); foreach (array_keys($ourdb) as $db) { $compname = $ourdb[$db]['compile']; if( extension_loaded( $compname ) || ( mw_have_dl() && dl( "{$compname}." . PHP_SHLIB_SUFFIX ) ) ) { array_push($phpdatabases, $db); $ourdb[$db]['havedriver'] = 1; } } error_reporting( E_ALL ); if (!$phpdatabases) { print "Could not find a suitable database driver!
          o "; foreach (array_keys($ourdb) AS $db) { $comp = $ourdb[$db]['compile']; $full = $ourdb[$db]['fullname']; print "For $full, compile PHP using --with-$comp, " ."or install the $ module
            \n"; } dieout( "

# " ); } print "Found database drivers for:"; $DefaultDBtype = ''; foreach (array_keys($ourdb) AS $db) { if ($ourdb[$db]['havedriver']) { if ( $DefaultDBtype == '' ) { $DefaultDBtype = $db; } print " ".$ourdb[$db]['fullname']; } } print "
# \n"; if( wfIniGetBool( "register_globals" ) ) { ?>
Warning: PHP's register_globals option is enabled. Disable it if you can.
MediaWiki will work, but your server is more exposed to PHP-based security vulnerabilities.
# Fatal: magic_quotes_runtime is active! This option corrupts data input unpredictably; you cannot install or use MediaWiki unless this option is disabled.
# Fatal: magic_quotes_sybase is active! This option corrupts data input unpredictably; you cannot install or use MediaWiki unless this option is disabled.
# Fatal: mbstring.func_overload is active! This option causes errors and may corrupt data unpredictably; you cannot install or use MediaWiki unless this option is disabled.
# Fatal: zend.ze1_compatibility_mode is active! This option causes horrible bugs with MediaWiki; you cannot install or use MediaWiki unless this option is disabled.

Cannot install MediaWiki.
" ); } if( wfIniGetBool( "safe_mode" ) ) { $conf->safeMode = true; ?>
# Warning: PHP's safe mode is active. You may have problems caused by this, particularly if using image uploads.
# safeMode = false; } $sapi = php_sapi_name(); print "PHP server API is $sapi; "; $script = defined('MW_INSTALL_PHP5_EXT') ? 'index.php5' : 'index.php'; if( $wgUsePathInfo ) { print "ok, using pretty URLs ($script/Page_Title)"; } else { print "using ugly URLs ($script?title=Page_Title)"; } print "
# \n"; $conf->xml = function_exists( "utf8_encode" ); if( $conf->xml ) { print "Have XML / Latin1-UTF-8 conversion support.
# \n"; } else { dieout( "PHP's XML module is missing; the wiki requires functions in this module and won't work in this configuration. If you're running Mandrake, install the php-xml package." ); } # Check for session support if( !function_exists( 'session_name' ) ) dieout( "PHP's session module is missing. MediaWiki requires session support in order to function." ); # session.save_path doesn't *have* to be set, but if it is, and it's # not valid/writable/etc. then it can cause problems $sessionSavePath = mw_get_session_save_path(); $ssp = htmlspecialchars( $sessionSavePath ); # Warn the user if it's not set, but let them proceed if( !$sessionSavePath ) { print "Warning: A value for session.save_path has not been set in PHP.ini. If the default value causes problems with saving session data, set it to a valid path which is read/write/execute for the user your web server is running under.
# "; } elseif ( is_dir( $sessionSavePath ) && is_writable( $sessionSavePath ) ) { # All good? Let the user know print "Session save path ({$ssp}) appears to be valid.
# "; } else { # Something not right? Warn the user, but let them proceed print "Warning: Your session.save_path value ({$ssp}) appears to be invalid or is not writable. PHP needs to be able to save data to this location for correct session operation.
# "; } # Check for PCRE support if( !function_exists( 'preg_match' ) ) dieout( "The PCRE support module appears to be missing. MediaWiki requires the Perl-compatible regular expression functions." ); $memlimit = ini_get( "memory_limit" ); $conf->raiseMemory = false; if( empty( $memlimit ) || $memlimit == -1 ) { print "PHP is configured with no memory_limit.
# \n"; } else { print "PHP's memory_limit is " . htmlspecialchars( $memlimit ) . ". "; $n = intval( $memlimit ); if( preg_match( '/^([0-9]+)[Mm]$/', trim( $memlimit ), $m ) ) { $n = intval( $m[1] * (1024*1024) ); } if( $n < 20*1024*1024 ) { print "Attempting to raise limit to 20M... "; if( false === ini_set( "memory_limit", "20M" ) ) { print "failed.
" . htmlspecialchars( $memlimit ) . " seems too low, installation may fail!"; } else { $conf->raiseMemory = true; print "ok."; } } print "
# \n"; } $conf->turck = function_exists( 'mmcache_get' ); if ( $conf->turck ) { print "Turck MMCache installed
# \n"; } $conf->xcache = function_exists( 'xcache_get' ); if( $conf->xcache ) print "XCache installed
# "; $conf->apc = function_exists('apc_fetch'); if ($conf->apc ) { print "APC installed
# "; } $conf->eaccel = function_exists( 'eaccelerator_get' ); if ( $conf->eaccel ) { $conf->turck = 'eaccelerator'; print "eAccelerator installed
# \n"; } $conf->dba = function_exists( 'dba_open' ); if( !( $conf->turck || $conf->eaccel || $conf->apc || $conf->xcache ) ) { echo( 'Couldn\'t find Turck MMCache, eAccelerator, APC or XCache; cannot use these for object caching.
# ' ); } $conf->diff3 = false; $diff3locations = array_merge( array( "/usr/bin", "/usr/local/bin", "/opt/csw/bin", "/usr/gnu/bin", "/usr/sfw/bin" ), explode( PATH_SEPARATOR, getenv( "PATH" ) ) ); $diff3names = array( "gdiff3", "diff3", "diff3.exe" ); $diff3versioninfo = array( '$1 --version 2>&1', 'diff3 (GNU diffutils)' ); foreach ($diff3locations as $loc) { $exe = locate_executable($loc, $diff3names, $diff3versioninfo); if ($exe !== false) { $conf->diff3 = $exe; break; } } if ($conf->diff3) print "Found GNU diff3: $conf->diff3.
# "; else print "GNU diff3 not found.
# "; $conf->ImageMagick = false; $imcheck = array( "/usr/bin", "/opt/csw/bin", "/usr/local/bin", "/sw/bin", "/opt/local/bin" ); foreach( $imcheck as $dir ) { $im = "$dir/convert"; if( @file_exists( $im ) ) { print "Found ImageMagick: $im; image thumbnailing will be enabled if you enable uploads.
# \n"; $conf->ImageMagick = $im; break; } } $conf->HaveGD = function_exists( "imagejpeg" ); if( $conf->HaveGD ) { print "Found GD graphics library built-in"; if( !$conf->ImageMagick ) { print ", image thumbnailing will be enabled if you enable uploads"; } print ".
# \n"; } else { if( !$conf->ImageMagick ) { print "Couldn't find GD library or ImageMagick; image thumbnailing disabled.
# \n"; } } $conf->IP = dirname( dirname( __FILE__ ) ); print "Installation directory: " . htmlspecialchars( $conf->IP ) . "
# \n"; // PHP_SELF isn't available sometimes, such as when PHP is CGI but // cgi.fix_pathinfo is disabled. In that case, fall back to SCRIPT_NAME // to get the path to the current script... hopefully it's reliable. SIGH $path = ($_SERVER["PHP_SELF"] === '') ? $_SERVER["SCRIPT_NAME"] : $_SERVER["PHP_SELF"]; $conf->ScriptPath = preg_replace( '{^(.*)/config.*$}', '$1', $path ); print "Script URI path: " . htmlspecialchars( $conf->ScriptPath ) . "
# \n"; // We may be installing from *.php5 extension file, if so, print message $conf->ScriptExtension = '.php'; if (defined('MW_INSTALL_PHP5_EXT')) { $conf->ScriptExtension = '.php5'; print "Installing MediaWiki with php5 file extensions
# \n"; } else { print "Installing MediaWiki with php file extensions
# \n"; } print "Environment checked. You can install MediaWiki.
# \n"; $conf->posted = ($_SERVER["REQUEST_METHOD"] == "POST"); $conf->Sitename = ucfirst( importPost( "Sitename", "" ) ); $defaultEmail = empty( $_SERVER["SERVER_ADMIN"] ) ? 'root@localhost' : $_SERVER["SERVER_ADMIN"]; $conf->EmergencyContact = importPost( "EmergencyContact", $defaultEmail ); $conf->DBtype = importPost( "DBtype", $DefaultDBtype ); ?> DBserver = importPost( "DBserver", "localhost" ); $conf->DBname = importPost( "DBname", "wikidb" ); $conf->DBuser = importPost( "DBuser", "wikiuser" ); $conf->DBpassword = importPost( "DBpassword" ); $conf->DBpassword2 = importPost( "DBpassword2" ); $conf->SysopName = importPost( "SysopName", "WikiSysop" ); $conf->SysopPass = importPost( "SysopPass" ); $conf->SysopPass2 = importPost( "SysopPass2" ); $conf->RootUser = importPost( "RootUser", "root" ); $conf->RootPW = importPost( "RootPW", "" ); $useRoot = importCheck( 'useroot', false ); $conf->LanguageCode = importPost( "LanguageCode", "en" ); ## MySQL specific: $conf->DBprefix = importPost( "DBprefix" ); $conf->setSchema( importPost( "DBschema", "mysql4" ), importPost( "DBengine", "InnoDB" ) ); ## Postgres specific: $conf->DBport = importPost( "DBport", "5432" ); $conf->DBmwschema = importPost( "DBmwschema", "mediawiki" ); $conf->DBts2schema = importPost( "DBts2schema", "public" ); /* Check for validity */ $errs = array(); if( preg_match( '/^$|^mediawiki$|#/i', $conf->Sitename ) ) { $errs["Sitename"] = "Must not be blank or \"MediaWiki\" and may not contain \"#\""; } if( $conf->DBuser == "" ) { $errs["DBuser"] = "Must not be blank"; } if( ($conf->DBtype == 'mysql') && (strlen($conf->DBuser) > 16) ) { $errs["DBuser"] = "Username too long"; } if( $conf->DBpassword == "" && $conf->DBtype != "postgres" ) { $errs["DBpassword"] = "Must not be blank"; } if( $conf->DBpassword != $conf->DBpassword2 ) { $errs["DBpassword2"] = "Passwords don't match!"; } if( !preg_match( '/^[A-Za-z_0-9]*$/', $conf->DBprefix ) ) { $errs["DBprefix"] = "Invalid table prefix"; } error_reporting( E_ALL ); /** * Initialise $wgLang and $wgContLang to something so we can * call case-folding methods. Per Brion, this is English for * now, although we could be clever and initialise to the * user-selected language. */ $wgContLang = Language::factory( 'en' ); $wgLang = $wgContLang; /** * We're messing about with users, so we need a stub * authentication plugin... */ $wgAuth = new AuthPlugin(); /** * Validate the initial administrator account; username, * password checks, etc. */ if( $conf->SysopName ) { # Check that the user can be created $u = User::newFromName( $conf->SysopName ); if( is_a($u, 'User') ) { // please do not use instanceof, it breaks PHP4 # Various password checks if( $conf->SysopPass != '' ) { if( $conf->SysopPass == $conf->SysopPass2 ) { if( !$u->isValidPassword( $conf->SysopPass ) ) { $errs['SysopPass'] = "Bad password"; } } else { $errs['SysopPass2'] = "Passwords don't match"; } } else { $errs['SysopPass'] = "Cannot be blank"; } unset( $u ); } else { $errs['SysopName'] = "Bad username"; } } $conf->License = importRequest( "License", "none" ); if( $conf->License == "gfdl" ) { $conf->RightsUrl = ""; $conf->RightsText = "GNU Free Documentation License 1.2"; $conf->RightsCode = "gfdl"; $conf->RightsIcon = '${wgScriptPath}/skins/common/images/gnu-fdl.png'; } elseif( $conf->License == "none" ) { $conf->RightsUrl = $conf->RightsText = $conf->RightsCode = $conf->RightsIcon = ""; } else { $conf->RightsUrl = importRequest( "RightsUrl", "" ); $conf->RightsText = importRequest( "RightsText", "" ); $conf->RightsCode = importRequest( "RightsCode", "" ); $conf->RightsIcon = importRequest( "RightsIcon", "" ); } $conf->Shm = importRequest( "Shm", "none" ); $conf->MCServers = importRequest( "MCServers" ); /* Test memcached servers */ if ( $conf->Shm == 'memcached' && $conf->MCServers ) { $conf->MCServerArray = array_map( 'trim', explode( ',', $conf->MCServers ) ); foreach ( $conf->MCServerArray as $server ) { $error = testMemcachedServer( $server ); if ( $error ) { $errs["MCServers"] = $error; break; } } } else if ( $conf->Shm == 'memcached' ) { $errs["MCServers"] = "Please specify at least one server if you wish to use memcached"; } /* default values for installation */ $conf->Email = importRequest("Email", "email_enabled"); $conf->Emailuser = importRequest("Emailuser", "emailuser_enabled"); $conf->Enotif = importRequest("Enotif", "enotif_allpages"); $conf->Eauthent = importRequest("Eauthent", "eauthent_enabled"); if( $conf->posted && ( 0 == count( $errs ) ) ) { do { /* So we can 'continue' to end prematurely */ $conf->Root = ($conf->RootPW != ""); /* Load up the settings and get installin' */ $local = writeLocalSettings( $conf ); echo "\n"; echo "

Generating configuration file...
\n"; echo "
\n"; $wgCommandLineMode = false; chdir( ".." ); $ok = eval( $local ); if( $ok === false ) { dieout( "Errors in generated configuration; " . "most likely due to a bug in the installer... " . "Config file was: " . "

" .
				htmlspecialchars( $local ) .

# " . "" ); } $conf->DBtypename = ''; foreach (array_keys($ourdb) as $db) { if ($conf->DBtype === $db) $conf->DBtypename = $ourdb[$db]['fullname']; } if ( ! strlen($conf->DBtype)) { $errs["DBpicktype"] = "Please choose a database type"; continue; } if (! $conf->DBtypename) { $errs["DBtype"] = "Unknown database type '$conf->DBtype'"; continue; } print "Database type: {$conf->DBtypename}
# \n"; $dbclass = 'Database'.ucfirst($conf->DBtype); $wgDBtype = $conf->DBtype; $wgDBadminuser = "root"; $wgDBadminpassword = $conf->RootPW; ## Mysql specific: $wgDBprefix = $conf->DBprefix; ## Postgres specific: $wgDBport = $conf->DBport; $wgDBmwschema = $conf->DBmwschema; $wgDBts2schema = $conf->DBts2schema; $wgCommandLineMode = true; if (! defined ( 'STDERR' ) ) define( 'STDERR', fopen("php://stderr", "wb")); $wgUseDatabaseMessages = false; /* FIXME: For database failure */ require_once( "$IP/includes/Setup.php" ); chdir( "config" ); $wgTitle = Title::newFromText( "Installation script" ); error_reporting( E_ALL ); print "Loading class: $dbclass"; $dbc = new $dbclass; if( $conf->DBtype == 'mysql' ) { $mysqlOldClient = version_compare( mysql_get_client_info(), "4.1.0", "lt" ); if( $mysqlOldClient ) { print "
# PHP is linked with old MySQL client libraries. If you are using a MySQL 4.1 server and have problems connecting to the database, see for help.
# \n"; } $ok = true; # Let's be optimistic # Decide if we're going to use the superuser or the regular database user $conf->Root = $useRoot; if( $conf->Root ) { $db_user = $conf->RootUser; $db_pass = $conf->RootPW; } else { $db_user = $wgDBuser; $db_pass = $wgDBpassword; } # Attempt to connect echo( "Attempting to connect to database server as $db_user..." ); $wgDatabase = Database::newFromParams( $wgDBserver, $db_user, $db_pass, '', 1 ); # Check the connection and respond to errors if( $wgDatabase->isOpen() ) { # Seems OK $ok = true; $wgDBadminuser = $db_user; $wgDBadminpassword = $db_pass; echo( "success.
# \n" ); $wgDatabase->ignoreErrors( true ); $myver = $wgDatabase->getServerVersion(); } else { # There were errors, report them and back out $ok = false; $errno = mysql_errno(); $errtx = htmlspecialchars( mysql_error() ); switch( $errno ) { case 1045: case 2000: echo( "failed due to authentication errors. Check passwords." ); if( $conf->Root ) { # The superuser details are wrong $errs["RootUser"] = "Check username"; $errs["RootPW"] = "and password"; } else { # The regular user details are wrong $errs["DBuser"] = "Check username"; $errs["DBpassword"] = "and password"; } break; case 2002: case 2003: default: # General connection problem echo( "failed with error [$errno] $errtx.\n" ); $errs["DBserver"] = "Connection failed"; break; } # switch } #conn. att. if( !$ok ) { continue; } } else /* not mysql */ { error_reporting( E_ALL ); $wgSuperUser = ''; ## Possible connect as a superuser if( $useRoot ) { $wgDBsuperuser = $conf->RootUser; echo( "Attempting to connect to database \"postgres\" as superuser \"$wgDBsuperuser\"..." ); $wgDatabase = $dbc->newFromParams($wgDBserver, $wgDBsuperuser, $conf->RootPW, "postgres", 1); if (!$wgDatabase->isOpen()) { print " error: " . $wgDatabase->lastError() . "
# \n"; $errs["DBserver"] = "Could not connect to database as superuser"; $errs["RootUser"] = "Check username"; $errs["RootPW"] = "and password"; continue; } $wgDatabase->initial_setup($conf->RootPW, 'postgres'); } echo( "Attempting to connect to database \"$wgDBname\" as \"$wgDBuser\"..." ); $wgDatabase = $dbc->newFromParams($wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, 1); if (!$wgDatabase->isOpen()) { print " error: " . $wgDatabase->lastError() . "
# \n"; } else { $myver = $wgDatabase->getServerVersion(); } $wgDatabase->initial_setup('', $wgDBname); } if ( !$wgDatabase->isOpen() ) { $errs["DBserver"] = "Couldn't connect to database"; continue; } print "Connected to $myver"; if ($conf->DBtype == 'mysql') { if( version_compare( $myver, "4.0.14" ) < 0 ) { dieout( " -- mysql 4.0.14 or later required. Aborting." ); } $mysqlNewAuth = version_compare( $myver, "4.1.0", "ge" ); if( $mysqlNewAuth && $mysqlOldClient ) { print "; You are using MySQL 4.1 server, but PHP is linked to old client libraries; if you have trouble with authentication, see for help."; } if( $wgDBmysql5 ) { if( $mysqlNewAuth ) { print "; enabling MySQL 4.1/5.0 charset mode"; } else { print "; MySQL 4.1/5.0 charset mode enabled, but older version detected; will likely fail."; } } print "
# \n"; @$sel = $wgDatabase->selectDB( $wgDBname ); if( $sel ) { print "Database " . htmlspecialchars( $wgDBname ) . " exists
\n"; } else { $err = mysql_errno(); $databaseSafe = htmlspecialchars( $wgDBname ); if( $err == 1102 /* Invalid database name */ ) { print "

    * {$databaseSafe} is not a valid database name.

"; continue; } elseif( $err != 1049 /* Database doesn't exist */ ) { print "

    * Error selecting database {$databaseSafe}: {$err} "; print htmlspecialchars( mysql_error() ) . "

# "; continue; } print "Attempting to create database...
# "; $res = $wgDatabase->query( "CREATE DATABASE `$wgDBname`" ); if( !$res ) { print "Couldn't create database " . htmlspecialchars( $wgDBname ) . "; try with root access or check your username/pass.
# \n"; $errs["RootPW"] = "<- Enter"; continue; } print "Created database " . htmlspecialchars( $wgDBname ) . "
# \n"; } $wgDatabase->selectDB( $wgDBname ); } else if ($conf->DBtype == 'postgres') { if( version_compare( $myver, "PostgreSQL 8.0" ) < 0 ) { dieout( " Postgres 8.0 or later is required. Aborting." ); } } if( $wgDatabase->tableExists( "cur" ) || $wgDatabase->tableExists( "revision" ) ) { print "There are already MediaWiki tables in this database. Checking if updates are needed...
# \n"; if ( $conf->DBtype == 'mysql') { # Determine existing default character set if ( $wgDatabase->tableExists( "revision" ) ) { $revision = $wgDatabase->escapeLike( $conf->DBprefix . 'revision' ); $res = $wgDatabase->query( "SHOW TABLE STATUS LIKE '$revision'" ); $row = $wgDatabase->fetchObject( $res ); if ( !$row ) { echo "SHOW TABLE STATUS query failed!
# \n"; $existingSchema = false; $existingEngine = false; } else { if ( preg_match( '/^latin1/', $row->Collation ) ) { $existingSchema = 'mysql4'; } elseif ( preg_match( '/^utf8/', $row->Collation ) ) { $existingSchema = 'mysql5'; } elseif ( preg_match( '/^binary/', $row->Collation ) ) { $existingSchema = 'mysql5-binary'; } else { $existingSchema = false; echo "Warning: Unrecognised existing collation
# \n"; } if ( isset( $row->Engine ) ) { $existingEngine = $row->Engine; } else { $existingEngine = $row->Type; } } if ( $existingSchema && $existingSchema != $conf->DBschema ) { print "Warning: you requested the {$conf->DBschema} schema, " . "but the existing database has the $existingSchema schema. This upgrade script ". "can't convert it, so it will remain $existingSchema.
# \n"; $conf->setSchema( $existingSchema, $conf->DBengine ); } if ( $existingEngine && $existingEngine != $conf->DBengine ) { print "Warning: you requested the {$conf->DBengine} storage " . "engine, but the existing database uses the $existingEngine engine. This upgrade " . "script can't convert it, so it will remain $existingEngine.
# \n"; $conf->setSchema( $conf->DBschema, $existingEngine ); } } # Create user if required if ( $conf->Root ) { $conn = $dbc->newFromParams( $wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, 1 ); if ( $conn->isOpen() ) { print "DB user account ok
# \n"; $conn->close(); } else { print "Granting user permissions..."; if( $mysqlOldClient && $mysqlNewAuth ) { print " If the next step fails, see for help."; } print "
\n"; dbsource( "../maintenance/users.sql", $wgDatabase ); } } } print "

			chdir( ".." );
			chdir( "config" );
			print "

\n"; print "

    * Finished update checks.
    * \n"; } else { # Determine available storage engines if possible if ( $conf->DBtype == 'mysql' && version_compare( $myver, "4.1.2", "ge" ) ) { $res = $wgDatabase->query( 'SHOW ENGINES' ); $found = false; while ( $row = $wgDatabase->fetchObject( $res ) ) { if ( $row->Engine == $conf->DBengine ) { $found = true; break; } } $wgDatabase->freeResult( $res ); if ( !$found && $conf->DBengine != 'MyISAM' ) { echo "Warning: {$conf->DBengine} storage engine not available, " . "using MyISAM instead
    * \n"; $conf->setSchema( $conf->DBschema, 'MyISAM' ); } } # FIXME: Check for errors print "Creating tables..."; if ($conf->DBtype == 'mysql') { dbsource( "../maintenance/tables.sql", $wgDatabase ); dbsource( "../maintenance/interwiki.sql", $wgDatabase ); } else if ($conf->DBtype == 'postgres') { $wgDatabase->setup_database(); } else { $errs["DBtype"] = "Do not know how to handle database type '$conf->DBtype'"; continue; } print " done.
    * \n"; print "Initializing statistics...
    * \n"; $wgDatabase->insert( 'site_stats', array ( 'ss_row_id' => 1, 'ss_total_views' => 0, 'ss_total_edits' => 1, # Main page first edit 'ss_good_articles' => 0, # Main page is not a good article - no internal link 'ss_total_pages' => 1, # Main page 'ss_users' => $conf->SysopName ? 1 : 0, # Sysop account, if created 'ss_admins' => $conf->SysopName ? 1 : 0, # Sysop account, if created 'ss_images' => 0 ) ); # Set up the "regular user" account *if we can, and if we need to* if( $conf->Root and $conf->DBtype == 'mysql') { # See if we need to $wgDatabase2 = $dbc->newFromParams( $wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, 1 ); if( $wgDatabase2->isOpen() ) { # Nope, just close the test connection and continue $wgDatabase2->close(); echo( "User $wgDBuser exists. Skipping grants.
    * \n" ); } else { # Yes, so run the grants echo( "Granting user permissions to $wgDBuser on $wgDBname..." ); dbsource( "../maintenance/users.sql", $wgDatabase ); echo( "success.
    * \n" ); } } if( $conf->SysopName ) { $u = User::newFromName( $conf->getSysopName() ); if ( !$u ) { print "Warning: Skipped sysop account creation - invalid username!
    * \n"; } else if ( 0 == $u->idForName() ) { $u->addToDatabase(); $u->setPassword( $conf->getSysopPass() ); $u->saveSettings(); $u->addGroup( "sysop" ); $u->addGroup( "bureaucrat" ); print "Created sysop account " . htmlspecialchars( $conf->SysopName ) . ".
    * \n"; } else { print "Could not create user - already exists!
    * \n"; } } else { print "Skipped sysop account creation, no name given.
    * \n"; } $titleobj = Title::newFromText( wfMsgNoDB( "mainpage" ) ); $article = new Article( $titleobj ); $newid = $article->insertOn( $wgDatabase ); $revision = new Revision( array( 'page' => $newid, 'text' => wfMsg( 'mainpagetext' ) . "\n\n" . wfMsgNoTrans( 'mainpagedocfooter' ), 'comment' => '', 'user' => 0, 'user_text' => 'MediaWiki default', ) ); $revid = $revision->insertOn( $wgDatabase ); $article->updateRevisionOn( $wgDatabase, $revision ); } /* Write out the config file now that all is well */ print "\n"; print "

      Creating LocalSettings.php...
      \n\n"; $localSettings = "<" . "?php$endl$local"; // Fix up a common line-ending problem (due to CVS on Windows) $localSettings = str_replace( "\r\n", "\n", $localSettings ); $f = fopen( "LocalSettings.php", 'xt' ); if( $f == false ) { dieout( "

      Couldn't write out LocalSettings.php. Check that the directory permissions are correct and that there isn't already a file of that name here...
      \n" . "

      Here's the file that would have been written, try to paste it into place manually:
      \n" . "

      \n" . htmlspecialchars( $localSettings ) . "

      \n" ); } if(fwrite( $f, $localSettings ) ) { fclose( $f ); print "

\n"; writeSuccessMessage(); } else { fclose( $f ); die("

An error occured while writing the config/LocalSettings.php file. Check user rights and disk space then try again.
\n"); print "\n"; } } while( false ); } ?> posted ) { echo "

Something's not quite right yet; make sure everything below is filled out correctly.
\n"; } ?>
Site config

Preferably a short word without punctuation, i.e. "Wikipedia".
Will appear as the namespace name for "meta" pages, and throughout the interface.

Displayed to users in some error messages, used as the return address for password reminders, and used as the default sender address of e-mail notifications.

Select the language for your wiki's interface. Some localizations aren't fully complete. Unicode (UTF-8) is used for all localizations.

    * ScriptPath}/config/$script?License=cc&RightsUrl=[license_url]&RightsText=[license_name]&RightsCode=[license_code]&RightsIcon=[license_button]" ); $icon = urlencode( "$wgServer$wgUploadPath/wiki.png" ); $ccApp = htmlspecialchars( "$partner&exit_url=$exit&partner_icon_url=$icon" ); print "choose"; ?> License == "cc" ) { ?>
          o RightsIcon ) . "\" alt='(Creative Commons icon)' />", "hidden" ); ?>
          o RightsText ), "hidden" ); ?>
          o RightsCode ), "hidden" ); ?>
          o RightsUrl ) . "\">" . htmlspecialchars( $conf->RightsUrl ) . "", "hidden" ); ?>

A notice, icon, and machine-readable copyright metadata will be displayed for the license you pick.

An admin can lock/delete pages, block users from editing, and do other maintenance tasks.
A new account will be added only when creating a new wiki database.

The password cannot be the same as the username.
Object caching:

    * turck ) { echo ""; aField( $conf, "Shm", "Turck MMCache", "radio", "turck" ); echo "
    * "; } if( $conf->xcache ) { echo( '' ); aField( $conf, 'Shm', 'XCache', 'radio', 'xcache' ); echo( '
    * ' ); } if ( $conf->apc ) { echo ""; aField( $conf, "Shm", "APC", "radio", "apc" ); echo "
    * "; } if ( $conf->eaccel ) { echo ""; aField( $conf, "Shm", "eAccelerator", "radio", "eaccel" ); echo "
    * "; } if ( $conf->dba ) { echo ""; aField( $conf, "Shm", "DBA (not recommended)", "radio", "dba" ); echo "
    * "; } ?>

An object caching system such as memcached will provide a significant performance boost, but needs to be installed. Provide the server addresses and ports in a comma-separated list.

MediaWiki can also detect and support eAccelerator, Turck MMCache, APC, and XCache, but these should not be used if the wiki will be running on multiple application servers.

DBA (Berkeley-style DB) is generally slower than using no cache at all, and is only recommended for testing.
E-mail, e-mail notification and authentication setup
E-mail features (global):


Use this to disable all e-mail functions (password reminders, user-to-user e-mail, and e-mail notifications) if sending mail doesn't work on your server.
User-to-user e-mail:


The user-to-user e-mail feature (Special:Emailuser) lets the wiki act as a relay to allow users to exchange e-mail without publicly advertising their e-mail address.
E-mail notification about changes:


For this feature to work, an e-mail address must be present for the user account, and the notification options in the user's preferences must be enabled. Also note the authentication option below. When testing the feature, keep in mind that your own changes will never trigger notifications to be sent to yourself.

There are additional options for fine tuning in /includes/DefaultSettings.php; copy these to your LocalSettings.php and edit them there to change them.
E-mail address authentication:


If this option is enabled, users have to confirm their e-mail address using a magic link sent to them whenever they set or change it, and only authenticated e-mail addresses can receive mails from other users and/or change notification mails. Setting this option is recommended for public wikis because of potential abuse of the e-mail features above.
Database config
Database type: $errs[DBpicktype]\n"; ?>

If your database server isn't on your web server, enter the name or IP address here.

If you only have a single user account and database available, enter those here. If you have database root access (see below) you can specify new accounts/databases to be created. This account will not be created if it pre-exists. If this is the case, ensure that it has SELECT, INSERT, UPDATE, and DELETE permissions on the MediaWiki database.
Superuser account: checked="checked" />  Use superuser account

If the database user specified above does not exist, or does not have access to create the database (if needed) or tables within it, please check the box and provide details of a superuser account, such as root, which does.

If you need to share one database between multiple wikis, or between MediaWiki and another web application, you may choose to add a prefix to all the table names to avoid conflicts.

Avoid exotic characters; something like mw_ is good.
Storage Engine
Select one:


InnoDB is best for public web installations, since it has good concurrency support. MyISAM may be faster in single-user installations. MyISAM databases tend to get corrupted more often than InnoDB databases.
Database character set
Select one:


EXPERIMENTAL: You can enable explicit Unicode charset support for MySQL 4.1 and 5.0 servers. This is not well tested and may cause things to break. If upgrading an older installation, leave in backwards-compatible mode.

The username specified above (at "DB username") will have its search path set to the above schemas, so it is recommended that you create a new user. The above schemas are generally correct: only change them if you are sure you need to.

Installation successful!

To complete the installation, please do the following:

   1. Download config/LocalSettings.php with your FTP client or file manager
   2. Upload it to the parent directory
   3. Delete config/LocalSettings.php
   4. Start using your wiki! 

If you are in a shared hosting environment, do not just move LocalSettings.php remotely. LocalSettings.php is currently owned by the user your webserver is running under, which means that anyone on the same server can read your database password! Downloading it and uploading it again will hopefully change the ownership to a user ID specific to you.
EOT; } else { echo <<

Installation successful! Move the config/LocalSettings.php file to the parent directory, then follow this link to your wiki.

You should change file permissions for LocalSettings.php as required to prevent other users on the server reading passwords and altering configuration data.
# EOT; } } function escapePhpString( $string ) { if ( is_array( $string ) || is_object( $string ) ) { return false; } return strtr( $string, array( "\n" => "\\n", "\r" => "\\r", "\t" => "\\t", "\\" => "\\\\", "\$" => "\\\$", "\"" => "\\\"" )); } function writeLocalSettings( $conf ) { $conf->PasswordSender = $conf->EmergencyContact; $magic = ($conf->ImageMagick ? "" : "# "); $convert = ($conf->ImageMagick ? $conf->ImageMagick : "/usr/bin/convert" ); $rights = ($conf->RightsUrl) ? "" : "# "; $hashedUploads = $conf->safeMode ? '' : '# '; switch ( $conf->Shm ) { case 'memcached': $cacheType = 'CACHE_MEMCACHED'; $mcservers = var_export( $conf->MCServerArray, true ); break; case 'turck': case 'xcache': case 'apc': case 'eaccel': $cacheType = 'CACHE_ACCEL'; $mcservers = 'array()'; break; case 'dba': $cacheType = 'CACHE_DBA'; $mcservers = 'array()'; break; default: $cacheType = 'CACHE_NONE'; $mcservers = 'array()'; } if ( $conf->Email == 'email_enabled' ) { $enableemail = 'true'; $enableuseremail = ( $conf->Emailuser == 'emailuser_enabled' ) ? 'true' : 'false' ; $eauthent = ( $conf->Eauthent == 'eauthent_enabled' ) ? 'true' : 'false' ; switch ( $conf->Enotif ) { case 'enotif_usertalk': $enotifusertalk = 'true'; $enotifwatchlist = 'false'; break; case 'enotif_allpages': $enotifusertalk = 'true'; $enotifwatchlist = 'true'; break; default: $enotifusertalk = 'false'; $enotifwatchlist = 'false'; } } else { $enableuseremail = 'false'; $enableemail = 'false'; $eauthent = 'false'; $enotifusertalk = 'false'; $enotifwatchlist = 'false'; } $file = @fopen( "/dev/urandom", "r" ); if ( $file ) { $secretKey = bin2hex( fread( $file, 32 ) ); fclose( $file ); } else { $secretKey = ""; for ( $i=0; $i<8; $i++ ) { $secretKey .= dechex(mt_rand(0, 0x7fffffff)); } print "Warning: \$wgSecretKey key is insecure, generated with mt_rand(). Consider changing it manually.
# \n"; } # Add slashes to strings for double quoting $slconf = array_map( "escapePhpString", get_object_vars( $conf ) ); if( $conf->License == 'gfdl' ) { # Needs literal string interpolation for the current style path $slconf['RightsIcon'] = $conf->RightsIcon; } $localsettings = " # This file was automatically generated by the MediaWiki installer. # If you make manual changes, please keep track in case you need to # recreate them later. # # See includes/DefaultSettings.php for all configurable settings # and their default values, but don't forget to make changes in _this_ # file, not there. # If you customize your file layout, set \$IP to the directory that contains # the other MediaWiki files. It will be used as a base to locate files. if( defined( 'MW_INSTALL_PATH' ) ) { \$IP = MW_INSTALL_PATH; } else { \$IP = dirname( __FILE__ ); } \$path = array( \$IP, \"\$IP/includes\", \"\$IP/languages\" ); set_include_path( implode( PATH_SEPARATOR, \$path ) . PATH_SEPARATOR . get_include_path() ); require_once( \"\$IP/includes/DefaultSettings.php\" ); # If PHP's memory limit is very low, some operations may fail. " . ($conf->raiseMemory ? '' : '# ' ) . "ini_set( 'memory_limit', '20M' );" . " if ( \$wgCommandLineMode ) { if ( isset( \$_SERVER ) && array_key_exists( 'REQUEST_METHOD', \$_SERVER ) ) { die( \"This script must be run from the command line\\n\" ); } } ## Uncomment this to disable output compression # \$wgDisableOutputCompression = true; \$wgSitename = \"{$slconf['Sitename']}\"; ## The URL base path to the directory containing the wiki; ## defaults for all runtime URL paths are based off of this. \$wgScriptPath = \"{$slconf['ScriptPath']}\"; \$wgScriptExtension = \"{$slconf['ScriptExtension']}\"; ## For more information on customizing the URLs please see: ## \$wgEnableEmail = $enableemail; \$wgEnableUserEmail = $enableuseremail; \$wgEmergencyContact = \"{$slconf['EmergencyContact']}\"; \$wgPasswordSender = \"{$slconf['PasswordSender']}\"; ## For a detailed description of the following switches see ## ## and ## There are many more options for fine tuning available see ## /includes/DefaultSettings.php ## UPO means: this is also a user preference option \$wgEnotifUserTalk = $enotifusertalk; # UPO \$wgEnotifWatchlist = $enotifwatchlist; # UPO \$wgEmailAuthentication = $eauthent; \$wgDBtype = \"{$slconf['DBtype']}\"; \$wgDBserver = \"{$slconf['DBserver']}\"; \$wgDBname = \"{$slconf['DBname']}\"; \$wgDBuser = \"{$slconf['DBuser']}\"; \$wgDBpassword = \"{$slconf['DBpassword']}\"; # MySQL specific settings \$wgDBprefix = \"{$slconf['DBprefix']}\"; # MySQL table options to use during installation or update \$wgDBTableOptions = \"{$slconf['DBTableOptions']}\"; # Experimental charset support for MySQL 4.1/5.0. \$wgDBmysql5 = {$conf->DBmysql5}; # Postgres specific settings \$wgDBport = \"{$slconf['DBport']}\"; \$wgDBmwschema = \"{$slconf['DBmwschema']}\"; \$wgDBts2schema = \"{$slconf['DBts2schema']}\"; ## Shared memory settings \$wgMainCacheType = $cacheType; \$wgMemCachedServers = $mcservers; ## To enable image uploads, make sure the 'images' directory ## is writable, then set this to true: \$wgEnableUploads = false; {$magic}\$wgUseImageMagick = true; {$magic}\$wgImageMagickConvertCommand = \"{$convert}\"; ## If you want to use image uploads under safe mode, ## create the directories images/archive, images/thumb and ## images/temp, and make them all writable. Then uncomment ## this, if it's not already uncommented: {$hashedUploads}\$wgHashedUploadDirectory = false; ## If you have the appropriate support software installed ## you can enable inline LaTeX equations: \$wgUseTeX = false; \$wgLocalInterwiki = \$wgSitename; \$wgLanguageCode = \"{$slconf['LanguageCode']}\"; \$wgProxyKey = \"$secretKey\"; ## Default skin: you can change the default skin. Use the internal symbolic ## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook': \$wgDefaultSkin = 'monobook'; ## 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. {$rights}\$wgEnableCreativeCommonsRdf = true; \$wgRightsPage = \"\"; # Set to the title of a wiki page that describes your license/copyright \$wgRightsUrl = \"{$slconf['RightsUrl']}\"; \$wgRightsText = \"{$slconf['RightsText']}\"; \$wgRightsIcon = \"{$slconf['RightsIcon']}\"; # \$wgRightsCode = \"{$slconf['RightsCode']}\"; # Not yet used \$wgDiff3 = \"{$slconf['diff3']}\"; # When you make changes to this configuration file, this will make # sure that cached pages are cleared. \$wgCacheEpoch = max( \$wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) ); "; ## End of setting the $localsettings string // Keep things in Unix line endings internally; // the system will write out as local text type. return str_replace( "\r\n", "\n", $localsettings ); } function dieout( $text ) { die( $text . "\n\n\n" ); } function importVar( &$var, $name, $default = "" ) { if( isset( $var[$name] ) ) { $retval = $var[$name]; if ( get_magic_quotes_gpc() ) { $retval = stripslashes( $retval ); } } else { $retval = $default; } return $retval; } function importPost( $name, $default = "" ) { return importVar( $_POST, $name, $default ); } function importCheck( $name ) { return isset( $_POST[$name] ); } function importRequest( $name, $default = "" ) { return importVar( $_REQUEST, $name, $default ); } $radioCount = 0; function aField( &$conf, $field, $text, $type = "text", $value = "", $onclick = '' ) { global $radioCount; if( $type != "" ) { $xtype = "type=\"$type\""; } else { $xtype = ""; } $id = $field; $nolabel = ($type == "radio") || ($type == "hidden"); if ($type == 'radio') $id .= $radioCount++; if( $nolabel ) { echo "\t\t"; } else { echo "\t\t$text\n"; } if( $type == "radio" && $value == $conf->$field ) { $checked = "checked='checked'"; } else { $checked = ""; } echo "\t\t$field ); } echo "\" />\n"; if( $nolabel ) { echo " $text\n"; } global $errs; if(isset($errs[$field])) echo "" . $errs[$field] . "\n"; } function getLanguageList() { global $wgLanguageNames, $IP; if( !isset( $wgLanguageNames ) ) { require_once( "$IP/languages/Names.php" ); } $codes = array(); $d = opendir( "../languages/messages" ); /* In case we are called from the root directory */ if (!$d) $d = opendir( "languages/messages"); while( false !== ($f = readdir( $d ) ) ) { $m = array(); if( preg_match( '/Messages([A-Z][a-z_]+)\.php$/', $f, $m ) ) { $code = str_replace( '_', '-', strtolower( $m[1] ) ); if( isset( $wgLanguageNames[$code] ) ) { $name = $code . ' - ' . $wgLanguageNames[$code]; } else { $name = $code; } $codes[$code] = $name; } } closedir( $d ); ksort( $codes ); return $codes; } #Check for location of an executable # @param string $loc single location to check # @param array $names filenames to check for. # @param mixed $versioninfo array of details to use when checking version, use false for no version checking function locate_executable($loc, $names, $versioninfo = false) { if (!is_array($names)) $names = array($names); foreach ($names as $name) { $command = "$loc".DIRECTORY_SEPARATOR."$name"; if (@file_exists($command)) { if (!$versioninfo) return $command; $file = str_replace('$1', $command, $versioninfo[0]); if (strstr(`$file`, $versioninfo[1]) !== false) return $command; } } return false; } # Test a memcached server function testMemcachedServer( $server ) { $hostport = explode(":", $server); $errstr = false; $fp = false; if ( !function_exists( 'fsockopen' ) ) { $errstr = "Can't connect to memcached, fsockopen() not present"; } if ( !$errstr && count( $hostport ) != 2 ) { $errstr = 'Please specify host and port'; } if ( !$errstr ) { list( $host, $port ) = $hostport; $errno = 0; $fsockerr = ''; $fp = @fsockopen( $host, $port, $errno, $fsockerr, 1.0 ); if ( $fp === false ) { $errstr = "Cannot connect to memcached on $host:$port : $fsockerr"; } } if ( !$errstr ) { $command = "version\r\n"; $bytes = fwrite( $fp, $command ); if ( $bytes != strlen( $command ) ) { $errstr = "Cannot write to memcached socket on $host:$port"; } } if ( !$errstr ) { $expected = "VERSION "; $response = fread( $fp, strlen( $expected ) ); if ( $response != $expected ) { $errstr = "Didn't get correct memcached response from $host:$port"; } } if ( $fp ) { fclose( $fp ); } if ( !$errstr ) { echo "Connected to memcached on $host:$port successfully"; } return $errstr; } function database_picker($conf) { global $ourdb; print "\n"; foreach(array_keys($ourdb) as $db) { if ($ourdb[$db]['havedriver']) { print "
# "; aField( $conf, "DBtype", $ourdb[$db]['fullname'], 'radio', $db, 'onclick'); print "
\n"; } } print "\n"; } function database_switcher($db) { global $ourdb; $color = $ourdb[$db]['bgcolor']; $full = $ourdb[$db]['fullname']; print "
# $full specific options\n"; } function printListItem( $item ) { print "$item
"; } ?>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. or read it online

    * MediaWiki home
    * Readme
    * Release notes
    * Documentation
    * User's Guide
    * FAQ

MediaWiki is Copyright © 2001-2008 by Magnus Manske, Brion Vibber, Lee Daniel Crocker, Tim Starling, Erik Möller, Gabriel Wicke and others.

Thank you! – i123Pie biocontribs 20:01, 24 March 2008 (UTC) -- 20:24, 24 March 2008 (UTC)

Either you copied something really strange or your server doesn't execute .php files. --Flominator 17:12, 14 April 2008 (UTC)

(RESOLVED) Help deleting pages

I took a wiki class a while ago and we created some test pages in class. I found them when I did a circuit search on validation. How can I delete these?

user: jchackba — 19:29, 25 March 2008 (UTC)

Log in as a user with the 'delete' privilege (such as administrator) and press the delete tab (up on the level of the edit tab). Smaug 20:54, 25 March 2008 (UTC)

(RESOLVED) Mediawiki Programmierer gesucht / Mediawiki programmersearch

  • MediaWiki: newest
  • PHP: 5.X
  • MySQL: 5.X
  • URL: local

English: We look for a German-language Mediawikiprogrammer how makes the Plugin working on our Mediawiki installation User:Barrylb/Custom article editing form with fields

German: Wir suchen einen deutschsprachigen Mediawikiprogrammierer der uns das Plugin User:Barrylb/Custom article editing form with fields zum Laufen bringt.

Kontakt: 07:16, 26 March 2008 (UTC)

Tested with this one and it worked. --Flominator 17:05, 14 April 2008 (UTC)

(RESOLVED) "This page has been accessed X times"


Can anyone tell me exactly what the counters at the bottom of the page measure? And also on the statistics page, where it lists "total pageviews", what exactly does that include? For instance, would it include PDFs stored in external file folders? All namespace pageviews? Other pages on a part of the server that hosts the wiki, but not the wiki itself? What about cache and repeated pageviews? If someone accessed a page 10 times a day, it only counts 1? If they keep accessing, when does it reset to count again, once a day? I ask these questions (a) because I want to know, and (b) because I track visitor stats using other tools such as Google Analytics and others, and occasionally I see some very strange behavior with the Mediawiki counters which are not always or usually reflected by the other tools, so should I take the Mediawiki counters to be the most accurate? One discrepancy e.g. occurred when there was a temporary jump about 10- to 20-fold in total pageviews and pageviews of most specific pages, for a period of about 24-36 hours, but this wasn't picked up by Google Analytics or the others. I have been assuming it was some kind of slashdot effect from a link on some external site, but I don't have software set up that tells me the referring URLs (yet), so I can't know that. Thanks! 19:04, 28 March 2008 (UTC)

I would recommend you disable the counter and rely on other tools (Google Analytics, AWStats, whatever), if only for performance reasons. (That's not really a direct answer, I know, but it's the best I've got.) —Emufarmers(T|C) 18:27, 29 March 2008 (UTC)
On a side note, which of the alternative tools do you reccomend/use, Emufarmers? Smaug 01:40, 2 April 2008 (UTC)
I use Analytics, although statistics from server logs are going to be more accurate, strictly speaking, since they include users or robots with JavaScript turned off. Stats have mostly been more like interesting diversions than useful metrics for the relatively small sites I've run; with such sites the SearchLog extension could help me make sure people find what they search for (if I consulted it more often). —Emufarmers(T|C) 01:59, 3 April 2008 (UTC)
Thanks for the input, Emufarmers. The reason I ask also is that the "counters" from the MediaWiki software give me numbers that are an order of magnitude different from what I get from both Google Analytics and StatCounter, the 2 tools I use. For example, both Google Analytics and StatCounter show me getting roughly 200-250 unique visitors and about 400-500 pageviews per day. Yet the MediaWiki "counter" is showing I'm getting 5,000-10,000 total pageviews per day?? Besides the anomalous "jump" I described above, the MediaWiki counter tends to have risen (relative to itself) more consistently over time then the Analytics or StatCounter (although those have risen as well). The only conclusion I can come to to resolve the discrepancy is that they're using drastically different definitions of what a "pageview" is. I have been able to find out what definition Analytics and StatCounter use, but not MediaWiki, so that's why I ask. If the MediaWiki counter stats trends over time are reliable, then I'd like to keep tracking it for a while, even if it disagrees with the other 2. Thanks. 21:15, 5 April 2008 (UTC)
Views from search engine bots might explain the discrepancy: Bots don't usually have JavaScript, so Analytics will miss them (and it might do some automatic filtering of known bots anyway). MediaWiki's built-in counter probably can't discriminate much. If you install software that analyzes your server's logs, you should be able to see what's really going on. —Emufarmers(T|C) 21:36, 5 April 2008 (UTC)

(RESOLVED) Internal error

  • MediaWiki: 1.12.0rc1
  • PHP: 5.0.5 (cgi)
  • MySQL: 4.1.11-Debian_4sarge7-log
  • URL: [2]
  • when the page has just one section

it can be edited with this urls:

if i try any invalid section number, i get {{MediaWiki:Nosuchsectiontext}} message.

  • when the page has more than one section,

this url work correctly:

but when i use this url i take a internal error:

i also take this error when i use any other valid or invalid section number, such as 1, 5, 137 etc...

The error:
internal error:
Invalid h node passed to PPNode_DOM::splitHeading
0 /home/www/cli-ir/includes/Parser.php(4605): PPNode_DOM->splitHeading()
1 /home/www/cli-ir/includes/Parser.php(4675): Parser->extractSections('<div style="dir...', '55', 'get', false)
2 /home/www/cli-ir/includes/EditPage.php(193): Parser->getSection('<div style="dir...', '55', false)
3 /home/www/cli-ir/includes/EditPage.php(982): EditPage->getContent(false)
4 /home/www/cli-ir/includes/EditPage.php(473): EditPage->initialiseForm()
5 /home/www/cli-ir/includes/EditPage.php(323): EditPage->edit()
6 /home/www/cli-ir/includes/Wiki.php(444): EditPage->submit()
7 /home/www/cli-ir/includes/Wiki.php(48): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
8 /home/www/cli-ir/index.php(90): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest))
9 {main}

sepehrnoush 19:02, 29 March 2008 (UTC)

Try this link. I had the same problem and it worked. --Baumanns 17:04, 9 April 2008 (UTC)
Thanks. It worked for me too. :) —sepehrnoush 13:09, 11 April 2008 (UTC)

(RESOLVED) Need help migrating an existing Wiki to a new network domain

Our company recently revamped our internal network, changing IP addressing scheme as well as initializing a new internal network specifically meant to be used by our System Test team. The Wiki itself is hosted on a Windows XP machine running XAMPP (machine hostname "systemtest"). Anyway, I'd like to migrate the System Test Wiki from the old domain (hosted at to the new domain ( Currently, the main Wiki page is viewable (, but clicking any of the other page links in there results in a 404 Not Found error. This is because the hyperlinks are apparently hard coded to point to the old domain instead of the new one. Unfortunately, it doesn't just seem to be a matter of changing a bunch of html files; I searched in C:\Program Files\xampp for all instances of "" and it seems as if the web pages are stored in a database or some binary format (the search hits were on files ending in extension .MYD and .MYI).

Can you please help me to migrate our Wiki?

Thanks in advance,

- Jeffrey Wright - System Test Engineering Manager - Aztek Networks, Inc. - — 17:21, 31 March 2008 (UTC)

Tried changing the path at LocalSettings.php? --Flominator 11:52, 8 April 2008 (UTC)

(RESOLVED) How to limit permissions of guests in DefaultSetting.php?

  • MediaWiki: 1.11.1
  • PHP: 5.2.5
  • MySQL: 5.0.45

I know how to that I can set limit permission of guest in DefaultSetting.php.
But if i give their consent to the reading, they can watch all pages.
I don't want it.
for example, if the guest click the 'Special Pages', they have to see the same page that they click the 'Upload file'.
How can I set limit permission of guest in detail.

Probitas 09:22, 1 April 2008 (UTC)

Does Manual:User_rights help you? Also, edit LocalSettings.php, not DefaultSettings.php. Smaug 20:46, 1 April 2008 (UTC)

(RESOLVED) Desperately need help on AE wiki!

I am a user on the Activating Evolution site. We desperately need some help.

There appears to be NO administrator or sysops. We are being over run with spammers. So far, I myself have cleaned well over 1500 pages that were spammed. It is a daily (if not hourly) problem, with no way to either block these yahoos or ban them.

All of the main pages are changed daily, and there are several of us that are trying to keep on top of all the cleanup, but as soon as we clean up a page, it gets spammed again. We have set up a Catagory for spammers, and don't know how to stop them with no admin or sysop on board.

Here is a link to the main page:

You can check out the special page for Recent Changes and see what we are going thru. Please fee free to check out my user page (Sheba98) and see how many "contributions" I've made since February. Another good one to check is Psych-Gen. And Wireless.

Is there ANY way you all can help? We have emailed NBC with absolutely no response. We are at wit's end, and hate to see the site go to trash.

Any assistance you could provide would be greatly appreciated!

Sheba98 00:08, 2 April 2008 (UTC)

Well....the bottom line is that you cannot do things admins or sysops can do without being an admin or sysop yourself. Smaug 01:38, 2 April 2008 (UTC)
I am very much aware of that. The supposed Admin of the site does not even have a valid email address. We have no admin or sysop or bureaucrat. Nada. Zilch. Nothing. I just hate to see the site go down hill, and am asking for help to point me in the right direction as to who to contact to get help. Sheba98 01:43, 2 April 2008 (UTC)
Nothing can be done then. Unless you can telepathiclly tell the owner of the site to get some wiki admins.-- 03:46, 2 April 2008 (UTC)
I threw an AVB on your site - (User:Avb) for the time being. Should take care of that spam while you guys are tracking down the real admins. Tim Laqua talk 18:10, 6 April 2008 (UTC)
You could try doing a WHOIS query on the site, and contact the registered owner (since it's an "official" link from the NBC site, you may get a response there). Dansiman (talk) 06:45, 22 April 2008 (UTC)

(RESOLVED) Offensive signature and SQL help

  • MediaWiki: 1.13alpha
  • PHP: latest version
  • MySQL:
  • URL:

How do I edit the signatures in old revisions?? A user had particularly offensive signatures, and we need to keep his old edits, per GFDL. I renamed the user via the database, since Renameuser wasn't installed at the time, but all his old edits show with the offensive old signature. I went to the text table in phpmyAdmin but couldn't find it... anyone know how to fix this so I can edit the old revision?? any MySQL commands? —G Bowker 09:09, 2 April 2008 (UTC)

  • I also need to be able to edit the old revisions as well, via the database. Any advice appreciated, thanks! --G Bowker 09:12, 2 April 2008 (UTC)
For now, edit the page normally to get rid of it. Then there is either an extension or built-in function that allows for the deletion of revisions. If you search around for it you'll find it, Wikipedia makes use of it for similar purposes as yours. Smaug 21:59, 2 April 2008 (UTC)
  • Thanks. Tried the oversight extension.... but it doesn't remove block logs or isn't able to edit offensive old signatures. --G Bowker 12:06, 7 April 2008 (UTC)
Why do you need to remove block logs? Signatures aren't displayed in the logs, are they? And what do you mean isn't able to edit old signatures? (I've also never used the extension.) Smaug Tournesol.png 20:27, 7 April 2008 (UTC)

(OUTDATED) Watchlist->Not logged in->Logon

Hey. Suppose I have my Watchlist page opened and leave the computer for about an hour. The browser cookie gets expired and I now need to logon again. So if I click onto Watchlist link or hit Refresh I get to the page saying that I need to logon to see my watchlist. But to actually logon I have to click on the link and this gets me to the logon page. That's one extra click. If MediaWiki wants me to logon once again it should show me the page with the text above and already containing controls for entering and submitting my username/password.

Will you please modify this behaviour? Alkonaft 11:19, 3 April 2008 (UTC)

(RESOLVED) Viewing a list of entries?

Is it possible to see a list of all pages , maybe in alphabetical order? — 13:27, 4 April 2008 (UTC) David Doria

Special:Allpages. Smaug 19:55, 4 April 2008 (UTC)

(RESOLVED) user login error

  • MediaWiki 1.12.0
  • PHP 5.2.5 (cgi-fcgi)
  • MySQL 5.0.24-community-nt
  • URL: Datesweiser
  • OS: Windows server 2003, standard
  • webserver : IIS
  • Using broswer: IE7
  • note: link only works externaly of our network with a VPN connection.

Trying to login, after placing user namer and password into I am taken to page: With the error:

Login error:Datesweiser uses cookies to log in users. You have cookies disabled. Please enable them and try again.

However, the cookies are enabled in IE7 and have tried on multiple computers. Login works fine in firefox. This wiki is installed on a local server, not sure if that would affect cookies. I need IE to work because of links to local files. If I comment out <!--$wgDisableCookieCheck--> in the defaultsettings.php it alows me in, only to ask me to login again if any link is clicked on.

Matt 18:14, 7 April 2008 (UTC)

see link for answer Manual_talk:$wgCookiePath

(RESOLVED) Call "members": ammount of pages in category

Special:Mostlinkedcategories calls the number of members in a category. Can that number be called on each category as well? Cos you don't see how many members it are when it's more than 200 and the navigation (previous 200) (next 200) pops up. It's pretty annoying imo. I'm on MW 1.12.0 --Subfader 06:38, 4 April 2008 (UTC)

Heard it will be in MW 1.13 --Subfader 10:00, 8 April 2008 (UTC)

(RESOLVED) wgTitle

There's not much information about it. I use encodeURIComponent(wgTitle) in a javascript in Common.js to create a link to google the article name. Now my articles all have a date in front, e.g. "2008-03-21 - Text". Is there a way to only include the text but not the date? Maybe exclude numbers and special characters from wgTitle? Thanks! --Subfader 20:33, 5 April 2008 (UTC)

Used javascript replace() --Subfader 10:01, 8 April 2008 (UTC)

(RESOLVED) Licensing Per Page

  • MediaWiki: 1.12.0
  • PHP: 5.2.2 (apache2handler)
  • MySQL: 5.0.45-community
  • URL:

Is their an extension or modification that is made that can allow licensing to be done on a page by page basis. ie When a new page is started the author can choose the license or licenses he/she wants to use. They can change the licenses from any new revision if 1) they are the only author or 2) all the authors agree to change the licensing effective from a new revision. The license(s) for the revision you are viewing would be shown by icons off to the right of the page. Subpages would be licensed the same automatically as the root page.-- 23:08, 1 April 2008 (UTC)

So does a modification like this exist? If not could someone make your price.-- 16:45, 8 April 2008 (UTC)
I don't think so. But you can create license templates and show the users how to insert them. --Flominator 09:36, 9 April 2008 (UTC)
Good idea. I reccomend using a single template where a parameter determines what license is shown. I think there would be less chance of a singele page being double-licensed that way.
Then again, the fault in using a template is that any user can come along and change it. I know some MW members have made extensions that give extra rights to the creator of a page, so although it might be difficult to do it seems like it would be possible. But for now you may want to use a work around, like having a site-wide or namespace-wide license.
That gives me an idea. Would it work for the license of a page to be determined by namespace? You could have "PublicDomain:yowassup" and "CopyLeft:apage". Smaug Tournesol.png 19:37, 9 April 2008 (UTC)
Namespace based licensing isn't exactly what I was hoping for but seems like a good workaround.-- 00:39, 27 April 2008 (UTC)

(RESOLVED) The logs look wrong

I preferred it when the logs were in the old format of:

10 Jan 2008 22:54 Admin blocked User1 with an expiry time of infinite (test)

rather than the current design seen here:

Where do I report this bug?? Thanks, AP aka —Kelsington 17:59, 8 April 2008 (UTC)

That's pretty much the format logs are in now (though I could be missing something obvious). Could you be specific about exactly what you're referring to? —Emufarmers(T|C) 01:12, 9 April 2008 (UTC)
  • It was being discussed on Wikipedia (the English one) but someone on SVN has reverted them back, which was probably a good move. The new-look logs in that revision probably weren't good. Thanks, AP aka --Kelsington 16:07, 9 April 2008 (UTC)

(RESOLVED) Mailto Links

  • MediaWiki: 1.11.1
  • PHP: 5.2.5 (apache2handler)
  • MySQL: 5.0.45-community-nt

Mailto links do not parse - inputting the wikitext


spits out this in plain text on the wiki page


same with


also just spits out plain text.

This happens even if I disable all extensions. I did have the FCKeditor installed and running, and i'm not sure if it would have borked something. That's about all I can think of.

Killinggameshow 21:46, 9 April 2008 (UTC)

Do normal external links work? Smaug Tournesol.png 22:09, 9 April 2008 (UTC)

(RESOLVED) Edited Sidebar not displaying in 1.9.3

  • MediaWiki: 1.9.3
  • PHP: 5.2.4 (apache)
  • MySQL: 5.0.51a


I edited the sidebar page to:

  • navigation
    • Blackboard
    • CourseCompass
    • Hard Media
    • Pegasus

saved changes, emptied cache and refreshed but sidebar doesn't update Other changes (Icon, permissions etc) have worked for me.

Added to LocalSettings.php:

## When you make changes to this configuration file, this will make
## sure that cached pages are cleared.
$configdate = gmdate( 'YmdHis', @filemtime( __FILE__ ) );
$wgCacheEpoch = max( $wgCacheEpoch, $configdate );
$wgStyleVersion   = '42x';

I'm at a loss at this stage

Did you change MediaWiki:Sidebar or something else? --Flominator 17:07, 14 April 2008 (UTC)
Solved. Discovered I wasn't using pipes and wasn't editing MediaWiki:Sidebar just Sidebar.

(RESOLVED) SVN download

  • MediaWiki: as used on Wikimedia sites
  • PHP:
  • MySQL:
  • URL:

I downloaded the latest version from SVN, (which is r33047) - how would I go back to the previous revision in SVN using the SVN client I have - TortoiseSVN?? Thanks, AP aka -Kelsington 13:34, 13 April 2008 (UTC)

In the contextual menu of TortoiseSVN (right click and then TortoiseSVN) you have a option called "Update to revision...". When you click there, select "Revision" radio button (i.e. not "HEAD"), put the revision you want to have and click OK. iAlex 13:45, 13 April 2008 (UTC)
  • Anyone know where a list of all the revisions of MediaWiki are in SVN?? That way I can revert back-and-forward if I need to... I'm currently testing it on a XAMPP server at the moment. Thanks, AP aka --Kelsington 19:52, 13 April 2008 (UTC)

(OUTDATED) Error message

What does this error message mean? I cant find the meaning anywhere?

Fatal error: Class 'DOMDocument' not found in /home/psycho/public_html/mediawiki/includes/Preprocessor_DOM.php on line 566 05:05, 17 April 2008 (UTC)

(RESOLVED) Preventing access to blocked users

  • MediaWiki: 1.6-1.12

Any ideas how to disable blocked users from logging in or reading? Please reply at Manual_talk:Preventing_access#Keeping_blocked_users_from_reading. Thanks. —Flominator 06:24, 15 April 2008 (UTC)

Resolved by changing address and password --Flominator 09:09, 18 May 2008 (UTC)

(RESOLVED) Adding Custom Tags

  • MediaWiki: 1.12.0
  • PHP: 5.2.5 (apache2handler)
  • MySQL: 5.0.45-community-log
  • URL: Wiki of Iyeru

I want to know how to make a custom tag like <autocolumn> or <userboxsamples> like on the wiki. I also would rather have answers sent in e-mail, because I will never check back here. Please e-mail me with answers at iyeru42 [/a/t/], I'm serious too.

Right now, instead of HRwiki's userbox samples, I'm using this right now, which is broken and very bulky.

I repeat again: I WILL NOT check back here. IT IS recommended you e-mail via the address above. — 18:25, 15 April 2008 (UTC)

(RESOLVED) Snippet or piece of code, that show the content of each article

  • MediaWiki: 1.11.0
  • PHP: 5.0
  • MySQL: 4.1.10

my questions are

which is the snippet or piece of code, that show the content of each article?

and which is the snippet or piece of code, that save this content in the database?


-- 21:30, 17 April 2008 (UTC)

w:en:Wikipedia:Transclusion might help you. Smaug Tournesol.png 20:16, 18 April 2008 (UTC)

(RESOLVED) Change skin in installation that has skins tab disabled?

  • MediaWiki: 1.12.0
  • PHP: 5.1.6 (apache2handler)
  • MySQL: 5.0.27
  • URL: AbiliWiki

The creators of AbiliWiki have configured their MediaWiki installation to hide the Skins tab in Special:Preferences. I know you can manually apply a skin to an individual page with the URL, as in , but is there any way to permanently apply a skin to my preferences when they are hidden this way, either through URL syntax as above, or through a form submission? I'd be willing to create an HTML document on my hard drive with a simple form that will send the appropriate data to AbiliWiki's server when I click submit. I know this is kind of an advanced technical question but I sure hope there's someone who can answer it.

P.S. Please notify me at Wikipedia:User:Dansiman when this question is answered or if you need additional information. Thanks, 06:31, 22 April 2008 (UTC)

Well, I received an email from a fellow AbiliWikian that helped me workaround the problem. I am sharing it here in case anyone else has this issue with their own wiki in the future.

Go to the Preferences page, and save the source code, editing to add this near the top:
<base href="">
and then this in the form:
<input type='text' name='wpSkin' value="monobook" />
then submit. 01:04, 25 April 2008 (UTC)

(OUTDATED) Embedding an Excel File as OLE into a Wiki page

  • MediaWiki 1.12.0
  • PHP 5.2.5 (apache2handler)
  • MySQL 5.0.41

I would like to embed an Excel File which is sitting on our File Server directly into a Wiki page as an OLE object. Is this possible? — 12:53, 23 April 2008 (UTC)

(OUTDATED) [file:// does not work

  • MediaWiki: 1.12.0
  • PHP: 5.2.5
  • MySQL: 5.0.51a


I just successfully migrated my Wiki to a new server. Everything works, except the external links. I have several places where I use [file://server/directory/file] to open directly a PDF file. It still works fine on my old server, but not on the new one. It is just getting displayed as text. Is there a special setting i have to activate? 13:03, 25 April 2008 (UTC)