Project:Support desk/Sections/System

__NEWSECTIONLINK__

= MediaWiki System Support =

Resolved: 404 when using short url

 * MediaWiki: 1.11.0
 * PHP: 5.2.5 (cgi-fcgi)
 * MySQL: 5.0.67.d7-ourdelta-log
 * URL: www.jainkosh.org

Hello, I have been trying to use short url for my wiki by following instructions at http://www.mediawiki.org/wiki/Manual:Short_URL/wiki/Page_title_--_no_root_access but could not achieve the results. My server is Apache and my wiki is saved at htdocs\Mediawiki. I have tried saving the .htaccess file in htdocs\Mediawiki, htdocs\, htdocs\sample_html, htdocs\Mediawiki\sample_html, but it didn't work. Whenever I tried to go to www.jainkosh.org/wiki/Main_Page, it throws error 404, page not found. This is what I have put in my .htaccess file:

RewriteEngine On RewriteRule ^wiki/(.*)$ /Mediawiki/index.php?title=$1 [PT,L,QSA] RewriteRule ^wiki/*$ /Mediawiki/index.php [L,QSA] RewriteRule ^/*$ /Mediawiki/index.php [L,QSA]

Can you please help me in getting this working?

Thanks a lot, Vikas

I tried the same settings on Godaddy.com server and it worked fine there. Somehow on my localhost it didn't work and was giving 404. Works great on the godaddy server.

Shortcuts definition such as WP => wikipedia. (not about interwiki)

 * MediaWiki version: 1.13.4

Hello. Where are mediawiki shortcuts define ?
 * 1) NOT in MediaWiki:Searchaliases. (this page is for MWsearch extension)
 * 2) NOT in interLinks, (this is for inter-wiki links ; not for internal shortcut.)

For example in en:wikipedia: where is it defined that [[WP:xxx ]] =>  [[Wikipedia:xxx ]] so that for example WP:About will not be a red link if Wikipedia:About exists. ? —almaghi 09:06, 4 June 2009 (UTC)
 * 1) REDIRECTxxx ? Greudin 09:57, 4 June 2009 (UTC)


 * They are set as namespace aliases. See Manual:$wgNamespaceAliases. Happy ‑ melon 15:09, 4 June 2009 (UTC)
 * Thx Happy-melon, didnt notice. Greudin 18:28, 4 June 2009 (UTC)
 * OK, thank you very much for helping. It was written on manual:Namespace but I needed to read it twice before viewing it... --almaghi 13:40, 9 June 2009 (UTC)

What is category id?

 * MediaWiki version:
 * PHP version:
 * MySQL version:
 * URL:

What is a category id? Is it an integer generated based on the category name?

—158.130.93.78 18:17, 16 June 2009 (UTC)


 * Every page, piece of text, user, event, revision, or other object is identified within the software not by its name, which can have many wierd-and-wonderful properties (and often doesn't make sense: what is the 'name' of a log event?), but by a number or 'id' which is assigned when the object is stored in the database. So every time a user saves an edit, a new revision is created (with an associated revision id), which links to the user themselves (identified by a user id), to the text of the revision (identified by a text id), which page the revision was made to (identified by a page id), and various other properties.
 * Categories are, as you note, identified by a category id. The category is the actual place where category links lead to, and the page on which the category listing is displayed.  That page may or may not exist: if it does, there will be an associated page with a separate page id that contains the introductory text, but nonexistent categories can still have a category id.  Thus any category that has a page categorised into it (or which has had members in the past) has an associated category id.  Hope this clarifies. Happy ‑ melon 12:44, 17 June 2009 (UTC)

Same article in all pages articles

 * MediaWiki version: 1.12
 * PHP version: PHP 5.2.6-1+lenny3 with Suhosin-Patch 0.9.6.2 (cli)
 * MySQL version: Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (i486) using readline 5.2
 * URL: (Local Intranet)

I have installed mediawiki on debian lenny for my local intranet from apt-get install mediawiki mediawiki-math mediawiki-extensions and configured it, and work fine, them downloaded eswiki20090609-pages-articles.tar.gz and from command line run java -jar mwdumper.jar --format=sql:1.5 eswiki20090609-pages-articles.tar.gz | mysql -u root -p wikidb and all article are on my wikidb, them run RebuildTextindex.php, My problem is when i go to see any article or random page, in all page article in the top of the page are the same article (Carlos Iglecias) under the article that i desire to see, and when i loggin as wikisysop i see another article in the same place of all pages. I have make this many times, another way was downloading mediatikiXX.tar.gz uncompressing on my website directory and follows the install procedure, but the problem continues, i will make this with enwiki to see whats happens because i believe the problem is on the eswiki20090609-pages-articles.tar.gz, have downloaded another's pages-articles but the problem continue


 * To clarify: you go to any page on the wiki, and you see the same title for all articles ("Carlos Iglecias"), but the correct article text? When logged in, you see a different title, but still the correct texts?  Happy ‑ melon 14:28, 17 June 2009 (UTC)


 * Yes when i go to any page i see not only the same title for all aticles, including login form, search, all, i see the title and the text of that article (Carlos Iglecias) and under the correct text of article or login form, special page.., and when i logged as wikisysop i see different title but still the correct text, somes times  happens when i clic in a link this go to a page that no correspond to the link, for example, link in Mexico and go to mexico article page but i see tow articles in one, under the title Mexico i see the table with data(population, area ect..) of this country thas  correct but more under i see an article named  Street Fighter and at the end i see the other part of mexico article. in the mediawiki-l email list i read this problem is fix after run rebuildall.php script, by now i'm dumpling eswiki-pages-articles to another database with mediawiki-1.15 the proces no has finished, the first problem not show by now, but somes times happens to me the second problem , i'm waiting finished to see whats happend.

How to assign group to mass number of users?

 * MediaWiki version: 1.13.4
 * PHP version:
 * MySQL version:
 * URL:

How to assign group to mass number of users? Is there a script? Is there another way of doing it one-user-after-one-user? —almaghi 10:27, 18 June 2009 (UTC)
 * Is this something you need to do on a regular basis, or as a one-off fix? Happy ‑ melon 10:40, 18 June 2009 (UTC)
 * It is a one-off fix. (but I wish to capitalize about it to share ability of doing it, I think it would be useful to other users). --almaghi 12:48, 18 June 2009 (UTC)
 * Then I guess you want a maintenance script (if it can be done by a sysadmin) or a bot script if it has to be done by the users. I don't think such a script exists ATM; perhaps you should try writing one! Happy ‑ melon 12:56, 18 June 2009 (UTC)

a link to Special:UserRights/{username} in tollbox for bureaucrat
Hello. I'd like to add on UserPage a link in toolbox for Bureaucrat so that they can easily check or change userRights; how should I do?
 * Use an existing Extension:CustomSidebar?
 * write a javascript?
 * write an extension?
 * ...other ideas?

—almaghi 10:37, 18 June 2009 (UTC)


 * The simplest is probably JavaScript; just wrap an addPortletLink call in a check against the wgUserGroups array. Happy ‑ melon 10:40, 18 June 2009 (UTC)
 * Ok I try this, with examples from w:WP:WikiProject User scripts/Scripts/Compact Navigationw:WP:WikiProject_User_scripts/Scripts/User_tabs. If I manage to do it, I will put it on Javascript mediawiki manual.--almaghi 13:00, 18 June 2009 (UTC)

Should this script work or is there any error?

a 7lines Javascript working on Wikipedia but not on my wiki
I've tested this script in my monobook.js on wikipedia, it is working. But on my wiki it doesn't work. It is strange because javascript work on my wiki, for example HotCat.js and SubPages.js are well working. What could be wrong?

My wiki:
 * MediaWiki : 1.13.4
 * PHP :	5.1.6 (apache2handler)
 * MySQL :	5.0.22 --almaghi 14:32, 18 June 2009 (UTC)
 * edit: I put the script as a gadget and it does work as expected. Previously I added it to Special:MyPage/monobook.js and then it doesn't work? Any idea of what's wrong?? I missed something...--almaghi 14:56, 18 June 2009 (UTC)
 * Personal CSS and JS have to be enabled on wikis: see Manual:$wgAllowUserJs. Happy ‑ melon 15:28, 18 June 2009 (UTC)
 * Yeah OK... Thanks for this.
 * There's a strange stuff on my wiki: when I set it to true my wiki gets broken and serve a blank page. Yet another good idea to help me? ;) --almaghi 15:50, 18 June 2009 (UTC)

configuring $wgForeignFileRepos

 * MediaWiki version: 1.15.0
 * PHP version: 5.2.6-1+lenny3 with Suhosin-Patch 0.9.6.2 (cli)
 * MySQL version: 14.12 Distrib 5.0.51a, for debian-linux-gnu (i486) using readline 5.2
 * URL: (local Intranet)

Hello all i'm trying set $wgForeignFileRepos to see remotes images on my local wikipedia adding the follows lines to my LocalSettings.php: To CURL request:

$wgHTTPTimeout = 3000; $wgHTTPProxy = "http://myProxyIp:Port";

$wgForeignFileRepos[] = array(  'class'                   => 'ForeignAPIRepo',   'name'                    => 'shared',   'apibase'                 => 'http://commons.wikimedia.org/w/api.php',   'fetchDescription'        => false,    'descriptionCacheExpiry'  => 43200,    'apiThumbCacheExpiry'     => 43200, );;

but i don't see images in articles only show me an empty box in the  place of image and the rigth description, in debug log i see:


 * Http::request: GET http://commons.wikimedia.org/w/api.php?titles=Image%3ACommons-logo.svg&iiprop=timestamp%7Cuser%7Ccomment%7Curl%7Csize%7Csha1%7Cmetadata%7Cmime&prop=imageinfo&format=json&action=query

FileCache MISS for Commons-logo.svg Http::request: GET http://commons.wikimedia.org/w/api.php?titles=Image%3ACommons-logo.svg&iiprop=url&iiurlwidth=15&iiurlheight=-1&prop=imageinfo&format=json&action=query ForeignAPIRepo::getThumbUrl got remote thumb http://upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Commons-logo.svg/15px-Commons-logo.svg.png ForeignAPIRepo::getThumbUrlFromCache could not write to thumb path Http::request: GET http://commons.wikimedia.org/w/api.php?titles=Image%3AWikibooks-logo.svg&iiprop=timestamp%7Cuser%7Ccomment%7Curl%7Csize%7Csha1%7Cmetadata%7Cmime&prop=imageinfo&format=json&action=query FileCache MISS for Wikibooks-logo.svg Http::request: GET http://commons.wikimedia.org/w/api.php?titles=Image%3AWikibooks-logo.svg&iiprop=url&iiurlwidth=15&iiurlheight=-1&prop=imageinfo&format=json&action=query ForeignAPIRepo::getThumbUrl got remote thumb http://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Wikibooks-logo.svg/15px-Wikibooks-logo.svg.png ForeignAPIRepo::getThumbUrlFromCache could not write to thumb path)

I have enable uploads to my local wiki and the permissions over image directory are 777 by now my math formula are working fine. in images/tumb are many folders with image names but empty. whats more i need to complet this please?

--Enriluis 20:28, 19 June 2009 (UTC) —Enriluis 20:28, 19 June 2009 (UTC)

getThumbUrlFromCache could not write to thumb path
configuring $wgForeignFileRepos * MediaWiki version: 1.15.0 * PHP version: 5.2.6-1+lenny3 with Suhosin-Patch 0.9.6.2 (cli) * MySQL version: 14.12 Distrib 5.0.51a, for debian-linux-gnu (i486) using readline 5.2 * URL: (local Intranet)

Hello all i'm trying set $wgForeignFileRepos to see remotes images on my local wikipedia adding the follows lines to my LocalSettings.php: To CURL request:

$wgHTTPTimeout = 3000; $wgHTTPProxy = "http://myProxyIp:Port";

$wgForeignFileRepos[] = array(

'class'                  => 'ForeignAPIRepo', 'name'                   => 'shared', 'apibase'                => 'http://commons.wikimedia.org/w/api.php', 'fetchDescription'       => false, 'descriptionCacheExpiry' => 43200, 'apiThumbCacheExpiry'    => 43200,

);;

but i don't see images in articles only show me an empty box in the place of image and the rigth description, in debug log i see:

Http::request: GET http://commons.wikimedia.org/w/api.php?titles=Image% 3ACommons-logo.svg&iiprop=timestamp%7Cuser%7Ccomment%7Curl% 7Csize%7Csha1%7Cmetadata% 7Cmime&prop=imageinfo&format=json&action=query

FileCache MISS for Commons-logo.svg Http::request: GET http://commons.wikimedia.org/w/api.php?titles=Image% 3ACommons-logo.svg&iiprop=url&iiurlwidth=15&iiurlheight=-1&prop=imageinfo&format=json&action=query ForeignAPIRepo::getThumbUrl got remote thumb http://upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Commons-logo.svg/15px-Commons-logo.svg.png ForeignAPIRepo::getThumbUrlFromCache could not write to thumb path Http::request: GET http://commons.wikimedia.org/w/api.php?titles=Image%3AWikibooks-logo.svg&iiprop=timestamp%7Cuser%7Ccomment%7Curl%7Csize%7Csha1%7Cmetadata%7Cmime&prop=imageinfo&format=json&action=query FileCache MISS for Wikibooks-logo.svg Http::request: GET http://commons.wikimedia.org/w/api.php?titles=Image%3AWikibooks-logo.svg&iiprop=url&iiurlwidth=15&iiurlheight=-1&prop=imageinfo&format=json&action=query ForeignAPIRepo::getThumbUrl got remote thumb http://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Wikibooks-logo.svg/15px-Wikibooks-logo.svg.png ForeignAPIRepo::getThumbUrlFromCache could not write to thumb path)

I have enable uploads to my local wiki and the permissions over image directory are 777 by now my math formula are working fine. in images/tumb are many folders with image names but empty. whats more i need to complet this please? --Enriluis 20:54, 19 June 2009 (UTC)

Troubleshooting

 * MW: 1.13.4

As I set this global parameter, my wiki gets broken, rendering a blank page. Any idea? --almaghi 14:13, 22 June 2009 (UTC)

Exporting a portal in mediawiki

 * MediaWiki version: 1.15.0
 * PHP version: 5.1.6
 * MySQL version: 5.0.45
 * URL: Not accessable

I have to take over the maintenance of a wiki powered by mediawiki. At the same time I have to move it to another server. The wiki contains two portals. At the new location it would be better to have two wikis instead of having two portals in one wiki. Is it possible to export the portals of the current wiki separately and to import them on the new server as two wikis?

—194.237.142.20 08:20, 24 June 2009 (UTC)

Google indexes page links with redirect=no

 * MediaWiki version: 1.12.0
 * PHP version: 5.1.6 (apache2handler)
 * MySQL version: 5.0.271.12.0
 * URL: http://www.cookipedia.co.uk/
 * The code for this wiki has been hacked around a bit but nothing (AFAIK) that would cause this behaviour.

Google indexes pages on this wiki that include "redirect=no" in the link so when the pages are followed from a search engine, the visitor sees a blank redirect page and is not redirected to the correct page.

As Google has already indexed 1000's of pages like this, ideally I would like to hack the core so "redirect=no" is ignored *unless* the referrer is from this wiki. A starting point for hackery would be gratefully recieved.

Example link —CookipediaChef 13:45, 7 July 2009 (UTC)


 * MediaWiki 	1.15.0
 * PHP 	5.1.6 (apache2handler)
 * MySQL 	5.0.45
 * URL: INTERNAL

When searching for a word MakeShare, I created a page, it looks great.

when I searched/go makeshare it wanted me to create another page. Is it possible to make case sensitive words not matter? So when I search makeshre, it directs me to the page with MakeShare?

Removing extra line on article save

 * MediaWiki version: 1.16.0
 * PHP version:
 * MySQL version:
 * URL:

Does anyone know if there is a way to avoid MediaWiki automatically inserting an extra line at the end of an article upon saving? Specifically, I am trying to figure out a way to remove the "     " that is being spawned onto a page which includes a template which contains no actual text, only a category.

—Bsmithme 03:32, 11 July 2009 (UTC)

Radius authentication not working after upgrading
Hello,
 * MediaWiki version: 1.15.0
 * PHP version: 5.0.4
 * MySQL version: 4.1.12
 * URL:

I've created a test environment which is a copy of our production environment. The starting point is mediawiki 1.4.5, same versions of php and mysql. I did an inplace upgrade of mediawiki per the online upgrade instructions. All in all, everything worked pretty smoothly. I had to upgrade libxm2 to 2.6, but outside of that, the only thing that appears to no longer function is our custom authentication.

In the old world, we had things setup to authenticate users against our radius server. This no longer appears to work. To do this in version 1.4.5 we made changes to

LocalSettings.php by adding the following at the end:

$wgRemotePasswordCheck = true; $wgRemotePasswordServer = "localhost"; $wgRemotePasswordPort = 80;

User.php by commenting out the existing checkPassword function and adding: function checkPassword( $password ) {			global $wgRemotePasswordCheck, $wgRemotePasswordServer, $wgRemotePasswordPort; $this->loadFromDatabase; $ep = $this->encryptPassword( $password );

if ( $wgRemotePasswordCheck ) { $lower = strtolower( $this->mName ); $credentials = $lower. ":" . $password; $out = "GET /security/index.htm HTTP/1.1\r\n"; $out .= "Host: $wgRemotePasswordServer\r\n"; $out .= "Authorization: Basic " .base64_encode($credentials). "\r\n\r\n"; $fp = fsockopen( $wgRemotePasswordServer, $wgRemotePasswordPort, $errno, $errstr, 30 ); if( !$fp ) { echo "$errstr ($errno) "; } else { fwrite( $fp, $out ); $test = fgets( $fp, 128); fclose( $fp ); }			  if( 0 == strcmp( $test, "HTTP/1.1 200 OK\r\n" ) ) { {					return true; }				}			}		}

AuthPlugin.php

change autocreate and UserExists to true

SpecialUserLogin.php comment out the processLogin if (0 == $u->getID block and add:

If (0 == $u->getID ) {			$u = & $this->init_user ($u);                  /* and add this line */ }

Can someone clue me in on what has changed? (Looks like SpecialUserLogin.php isn't used anymore).

Does someone have the procedure for enabling radius authentication in version 1.15.0? Any help would be appreciated.

Thanks, -Erik erik.watts@ecitele.com

—63.94.127.33 16:55, 13 July 2009 (UTC)