MediaWiki Servers
From MyWiki
Server List
| public anon read | kerberos authn [1] | auto account creation [2] | self account creation [3] | daily backups [4] | logon page HTTPS | all pages HTTPS | |
|---|---|---|---|---|---|---|---|
| mywiki | Y | Y | Y | N | Y | Y | N |
| security | Y | Y | Y | N | Y | Y | N |
| whoi | N | Y | Y | N | Y | Y | N |
| omf | N | Y | Y | N | Y | Y | N |
| ittf (down) | N | Y | N | N | N | Y | Y |
| myproxy-sdci (down) | N | Y | N | N | N | Y | Y |
| nwiki | N | Y | Y | N | Y | Y | Y |
| csd-wiki | N | Y | N | N | Y | Y | Y |
| lodge (down) | N | Y | N | N | Y | Y | Y |
| faa-wiki (down) | N | Y | N | N | Y | Y | Y |
| spc (down) | N | N | N | N | Y | Y | Y |
| ncdir-wiki | N | Y | N | N | Y | Y | Y |
- In addition to the normal mediawiki authentication mechanisms.
- Will Mediawiki automatically create new mediawiki accounts for successfully authenticated users (via krb)? If not, then mediawiki accounts must be manually created by an administrator (or self created).
- Are anonymous users allowed to create their own accounts on the wiki?
- In addition to the normal weekly backups.
Administration Documents
Configuration Settings
To allow file uploads of any type of file
Edit /var/www/mediawiki/LocalSettings.php and set to false
$wgStrictFileExtensions = false;
To increase the maximum upload file size
The default maximum file size that can be uploaded is 2M. The error message you will receive is "The file is bigger than the server is configured to allow". To increase this to (for example) 16M:
- Edit /etc/php.ini
post_max_size = 16M upload_max_filesize = 16M
- Edit /var/www/mediawiki/includes/SpecialImport.php
Grep for the string MAX_FILE_SIZE
<input type='hidden' name='MAX_FILE_SIZE' value='16000000' />
- Restart apache
service httpd graceful
- If you get the following error in /var/log/messages
httpd: PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 33883271 bytes) in /var/www/mediawiki-1.7.1/includes/Sanitizer.php on line 928
then edit /etc/php.ini and increase the value for memory_limit, e.g.
memory_limit = 128M
Also see http://meta.wikimedia.org/wiki/Uploading_files
To enable keyword searches for 3 letter acronyms
- Edit /etc/my.cnf
Locate section [mysqld]
ft_min_word_len = 3
- Restart MySQL
service mysqld restart
- Rebuild index table
mysql -uroot -p mysql> use wikidb; mysql> repair table searchindex quick;
Problems Rendering PNG Images
If png files don't render in wiki pages, then check the MIME type of the file by looking at the description page of the file. If it says text/plain, then try the following:
- Edit LocalSettings.php and add the following:
$wgMimeDetectorCommand = "file -bi";
- then rebuilding the images:
# cd <mediawiki_install_loc>/maintenance # php rebuildImages.php Processing image... Finished image... 3 of 4 rows updated Processing oldimage... Finished oldimage... 2 of 2 rows updated #
- Also see: [1]
Navigation Customization
New Logo
See [2]
- You need to create a logo that is 135x135 and, to look good, has a transparent backgroun.
- The ImageMagick package (mac version) is your friend:
% convert -resize 135x135 NCSA-CSD-Logo.png NCSA-CSD-Logo-small.png
- Upload the logo to the wiki using the "Upload file" option.
- Log onto the wiki system and find where the image was saved:
$ cd /var/www/mediawiki/images/ $ find . -name NCSA-CSD-Logo-small.png -print ./b/bc/NCSA-CSD-Logo-small.png
(The subdirectories seem to be consistent for a given filename.)
- Edit LocalSettings.php:
# vi /var/www/mediawiki/LocalSettings.php
- Find the line for $wgLogo and set it to the new path. ("/mediawiki" in the value is apparently short for "/var/www/mediawiki".)
$wgLogo = "/mediawiki/images/5/5a/Ncsa-srd-logo-small.png";
Removed Heading
- Removed the heading from each page:
[root@security-wiki skins]# diff -c /var/www/mediawiki/skins/MonoBook.php.orig /var/www/mediawiki/skins/MonoBook.php
*** /var/www/mediawiki/skins/MonoBook.php.orig 2007-05-22 23:15:02.000000000 -0500
--- /var/www/mediawiki/skins/MonoBook.php 2007-05-22 23:16:03.000000000 -0500
***************
*** 99,105 ****
<div id="content">
<a name="top" id="top"></a>
<?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
- <h1 class="firstHeading"><?php $this->data['displaytitle']!=""?$this->html('title'):$this->text('title') ?></h1>
<div id="bodyContent">
<h3 id="siteSub"><?php $this->msg('tagline') ?></h3>
<div id="contentSub"><?php $this->html('subtitle') ?></div>
--- 99,104 ----
Cleaned up Footer
- Cleaned up bottom of page and added UIUC copyright.
# diff -c MonoBook.php.orig MonoBook.php
*** MonoBook.php.orig 2007-05-22 23:15:02.000000000 -0500
--- MonoBook.php 2007-06-18 13:42:41.000000000 -0500
***************
*** 260,267 ****
<ul id="f-list">
<?php
$footerlinks = array(
! 'lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright',
! 'privacy', 'about', 'disclaimer', 'tagline',
);
foreach( $footerlinks as $aLink ) {
if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
--- 259,267 ----
<ul id="f-list">
<?php
$footerlinks = array(
! 'lastmod', 'viewcount',
! //'numberofwatchingusers', 'credits', 'copyright',
! //'privacy', 'about', 'disclaimer', 'tagline',
);
foreach( $footerlinks as $aLink ) {
if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
***************
*** 269,274 ****
--- 269,275 ----
<?php }
}
?>
+ <li>All rights reserved. Copyright 2007 Board of Trustees of the University of Illinois.</li>
</ul>
</div>
Removed Tabs for Anonymous Users
- Followed directions at http://www.palaeos.org/MediaWiki_Admin_Notes#How_do_I_remove_the_article.2Fedit_etc_tabs_for_users_who_are_not_logged_in.3F
# diff -c MonoBook.php.orig MonoBook.php
*** MonoBook.php.orig 2007-05-22 23:15:02.000000000 -0500
--- MonoBook.php 2007-06-20 15:05:04.000000000 -0500
--- 99,104 ----
***************
*** 119,125 ****
<h5><?php $this->msg('views') ?></h5>
<div class="pBody">
<ul>
! <?php foreach($this->data['content_actions'] as $key => $tab) { ?>
<li id="ca-<?php echo Sanitizer::escapeId($key) ?>"<?php
if($tab['class']) { ?> class="<?php echo htmlspecialchars($tab['class']) ?>"<?php }
?>><a href="<?php echo htmlspecialchars($tab['href']) ?>"><?php
--- 118,124 ----
<h5><?php $this->msg('views') ?></h5>
<div class="pBody">
<ul>
! <?php foreach($this->data['content_actions'] as $key => $tab) if($this->data['loggedin']==1) { ?>
<li id="ca-<?php echo Sanitizer::escapeId($key) ?>"<?php
if($tab['class']) { ?> class="<?php echo htmlspecialchars($tab['class']) ?>"<?php }
?>><a href="<?php echo htmlspecialchars($tab['href']) ?>"><?php
Removed Edit Links for Anonymous Users
- Followed directions at http://www.palaeos.org/MediaWiki_Admin_Notes#How_do_I_hide_the_section_edit_links_for_users_who_are_not_logged_in.3F
# diff -c MonoBook.php.orig MonoBook.php
*** MonoBook.php.orig 2007-05-22 23:15:02.000000000 -0500
--- MonoBook.php 2007-06-20 15:11:53.000000000 -0500
***************
*** 90,95 ****
--- 90,102 ----
if($this->data['trackbackhtml']) print $this->data['trackbackhtml']; ?>
<!-- Head Scripts -->
<?php $this->html('headscripts') ?>
+ <?php if(!$this->data['loggedin']) { ?>
+ <style>
+ <!--
+ .editsection { display: none; }
+ -->
+ </style>
+ <?php } ?>
</head>
<body <?php if($this->data['body_ondblclick']) { ?>ondblclick="<?php $this->text('body_ondblclick') ?>"<?php } ?>
<?php if($this->data['body_onload' ]) { ?>onload="<?php $this->text('body_onload') ?>"<?php } ?>
Removed IP from Header
- added to LocalSettings.php:
$wgShowIPinHeader = false;
Deleting a page
- Add/verify password in /var/www/mediawiki/AdminSettings.php, then:
cd /var/www/mediawiki/maintenance php nukePage.php "Name of Page" php refreshLinks.php
