Project:Support desk

From MediaWiki.org
Jump to: navigation, search
vde   This page is for questions relating to the MediaWiki software.

Welcome to MediaWiki.org's Support desk, the central on-wiki place to ask MediaWiki questions!

The greater purpose of this page is to make our Manual and other available help so good that you do not have to come here to ask questions, or making them easier to find.

There are other ways for of communication as well (IRC, Mailing lists etc.). Read more here.

Before you post

Post a new question

1. To help us answer your questions, please always indicate which versions you are using:

  • MediaWiki (reported by your wiki's Special:Version page)
  • PHP (likewise)
  • Database (likewise, e.g. MySQL 5.5)

2. Please include the URL of your wiki unless you absolutely can't. It's often a lot easier for us to identify the source of the problem if we can look for ourselves.

3. To start a new thread, click "Start a new discussion".

Archiving topics

Topics are automatically archived when they have been inactive for three weeks. If a question you have asked is approaching this limit and still has not been answered, please 'bump' it to prevent it being archived. However do not 'bump' for other reasons.

Start a new discussion

Contents

Thread titleRepliesLast modified
Mediawiki.org Editor feature - add on, extension? (how to?)522:52, 12 January 2013
How to insert discussion widget from Facebook or VK.com to discussion page?1622:41, 12 January 2013
[RESOLVED] Profiler.php Fatal Error Cannot redeclare wfprofilein()1019:58, 12 January 2013
Resize external image?819:27, 12 January 2013
Image Authorization not working in Mediawiki 1.20.2114:01, 12 January 2013
Install failed on CentOS 5.3 1213:49, 12 January 2013
Can I have two MediaWiki installations on one Linux machine (2 domains)?113:45, 12 January 2013
Vector - Hide Toolbox for Anonymous Users1501:38, 12 January 2013
[RESOLVED] Trouble uploading after installation1221:31, 11 January 2013
site_stats damaged or missing on slave118:02, 11 January 2013
Use the Validator extension in MediaWiki 1.191317:06, 11 January 2013
upgrading from 1.19.2 to 1.20.x Error: invalid magic word 'speciale'510:47, 11 January 2013
How can I prevent removal of certain wikitext from pages with Abuse Filter?910:46, 11 January 2013
[RESOLVED] Query for images with multiple titles doesnt work210:38, 11 January 2013
Misconfigured layout page120:13, 10 January 2013
How to control the editors in one particular organization117:20, 10 January 2013
cannot upgrade to 1.18 from 1.17 - APC issue913:54, 10 January 2013
Installed SpamBlacklist Extension, Gives me an error message and no one can edit anymore113:50, 10 January 2013
[RESOLVED] Internal Server Error (500)810:19, 10 January 2013
How to ?- Insert table in NUMBERED LIST .407:05, 10 January 2013
First page
First page
Previous page
Previous page
Last page
Last page

Mediawiki.org Editor feature - add on, extension? (how to?)

Hi all,

When we edit a page on Mediawiki.org the on-line editor has a tool bar with buttons to quickly insert wiki-text. (ex. ([]) , ({{ }}) etc.) The tool bar just bellow the (Save page) and (Show preview) buttons when you edit a post.

So how could I implement this on my Wiki? Is it an extension, a special add-on? How do you go about configuring the enduser's Editing tool?

I looked at the Special:version page but it is a little overwhellming...

Many thanks! Frank

205.237.9.12112:46, 9 January 2013

Extension:WikiEditor is what you want. It is bundled with MW 1.19 and later versions.

MarkAHershberger(talk)20:30, 9 January 2013

I have the extension:WikiEditor installed and that toolbar with those buttons doesn't show up at the bottom.

Michel-André

206.248.138.15204:11, 10 January 2013

How do you have it configured in you LocalSettings.php?

MarkAHershberger(talk)04:15, 10 January 2013
Edited by another user.
Last edit: 22:52, 12 January 2013
# WikiEditor
require_once( "$IP/extensions/WikiEditor/WikiEditor.php" );
 
// Enables use of WikiEditor by default but still allow users to disable it in preferences
$wgDefaultUserOptions['usebetatoolbar'] = 1;
$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;
 
// Displays the Preview and Changes tabs
$wgDefaultUserOptions['wikieditor-preview'] = 1;
 
// Displays the Publish and Cancel buttons on the top right side
$wgDefaultUserOptions['wikieditor-publish'] = 1;
 
// Displays a navigation column (summary) on the right side
$wgDefaultUserOptions['usenavigabletoc'] = 1;
206.248.138.15214:53, 10 January 2013

that set up works for me when I'm not logged in. Maybe you're logged in and have the toolbar disabled?

MarkAHershberger(talk)20:47, 10 January 2013
 
 
 
 
 

How to insert discussion widget from Facebook or VK.com to discussion page?

Hello all! I could not find how to do it. 1) Are there some extensions that allow to do that? 2) So I know how to insert some javascript of a widget to discussion page, but I need also to insert some javascript between <head> tags! How can I do it?

Fokebox (talk)17:17, 10 January 2013

For inserting some JS, see ResourceLoader/Migration guide (users).

If VK.com acts the same as Facebook, you could probably adapt Extension:Facebook.

MarkAHershberger(talk)17:26, 10 January 2013

How to insert JS I have done it already! I cannot adapt Facebok extension, 'cause I am not good at progamming in php ). I want to try to do it myself but I do need how to insert code between <head></head> tags in all pages of wikimedia

Fokebox (talk)18:02, 10 January 2013

You want to use something like MediaWiki:Common.js on your site.

MarkAHershberger(talk)19:38, 10 January 2013

Well I know how to insert other js script to some page! Now I need to find out how to insert some script between head tags in html in all pages, because there are some rules that are neccessary to follow, for example: Put this script tag to the <head> of your page

<script type="text/javascript" src="//vk.com/js/api/openapi.js?75"></script>

<script type="text/javascript">
  VK.init({apiId: API_ID, onlyWidgets: true});
</script>

and Put this div tag to the place, where the Comments block will be

<div id="vk_comments"></div>
<script type="text/javascript">
VK.Widgets.Comments("vk_comments", {limit: 10, width: "496", attach: "*"});
</script>

So I know how to put the second script to the page and need to know how to be with first one!

Fokebox (talk)20:04, 11 January 2013

It looks like you want to work develop your own skin. Here is a good tutorial to use.

MarkAHershberger(talk)20:20, 11 January 2013
 
 
 
 

Ciencia Al Poder already gave the solution a while ago.

mw.loader isn't relevant here since this isn't using ResourceLoader. Use jQuery.getScript with the callback it provides (since it is asynchronous).

  • Open MediaWiki:Common.css:
  • Edit
  • Select everything in the edit area
  • Replace with this:
jQuery.getScript('//vk.com/js/api/openapi.js?76', function () {
    VK.init({apiId: 3354880, onlyWidgets: true});
});
Krinkle (talk)22:41, 12 January 2013
 

[RESOLVED] Profiler.php Fatal Error Cannot redeclare wfprofilein()

I just upgraded the files from 1.17.0 to 1.18.0 and after doing so:

Fatal error: Cannot redeclare wfprofilein() (previously declared in /homepages/2/d276811108/htdocs/w/includes/profiler/Profiler.php:14) in /homepages/2/d276811108/htdocs/w/includes/Profiler.php on line 19

I tried the upgrade on my test install it worked fine. I have no idea what is wrong.

Also PHP is version 5.2.17 (cgi)and MySQL is version 5.0.91-log.

Calebrw04:53, 3 December 2011

Have you checked your extensions to see if they're updated? I believe Cite and a few others must be downloaded from the REL1_18 area as the trunk is now working on MW1.19. I seem to recall running into that error on an upgrade and it having to do with Cite or another common extension.

Varnent06:06, 3 December 2011
 

I've also just upgraded from 1.17.0 to 1.18.0 and have the same problem (on a diff line 24 not 19), I tried disabling all extensions but no luck

Fatal error: Cannot redeclare wfProfileIn() (previously declared in /includes/profiler/Profiler.php:14) in /includes/ProfilerStub.php on line 24

Unibond13:33, 3 December 2011
 
I'm seeing wfProfileIn errors after upgrading.
Try creating a file at includes/ProfilerStub.php with the following line:
<?php require_once( "$IP/includes/profiler/ProfilerStub.php" );

(From: MediaWiki_roadmap/1.18/FAQ)

wargo13:44, 3 December 2011

I found a file in the mediawiki root folder called StartProfiler.php and deleted it, so far so good, all seems to be working :-)

Unibond13:49, 3 December 2011

I'd be careful deleting core files rather than tracking down the core problem. If for no other reason than whatever is causing the error probably isn't working now anyway and is likely to unnecessarily drain your resources. A good strategy is to disable your extensions one by one (or groups at a time if you have a lot) to locate the source of the problem. Then try downloading the release branch version of that extension, and if still no luck, the trunk release. While some developers only use the trunk release directory, others are already using it to test MW1.19, which is causing problems on MW1.18 installs using SVN to pull from the trunk.

Varnent19:36, 3 December 2011

StartProfiler.php isn't a core file, it is created by the sysadmin if it is needed. A StartProfiler.sample is included, which can be copied to StartProfiler.php. Due to changes in 1.18, a StartProfiler.php from a previous version will be incompatible. StartProfiler.sample was updated, but StartProfiler.php couldn't be updated because it doesn't exist in the distribution.

StartProfiler.php is the core problem. Deleting it gets rid of that problem.

Reach Out to the Truth22:50, 3 December 2011

Thanks for this fix. I completely forgot about that. I had it enabled while trying to fix another problem. Eitherway, it's time to update my extensions.

Calebrw07:37, 4 December 2011
 
 
 
 
 

Resize external image?

How can i resize external images? Anyone could help me???

Nva199109:31, 4 December 2011

Depending on what you mean by external images - you might be able to use the usual resize settings associated with the image tag or the standard html reset for the HTML img tag. Do you have external images enabled on the wiki you'd like to do this for? Is it another website under your control? If not, you may want to consider downloading the image from their site and uploading it to your wiki to prevent an image error if they happen to delete or move it on their server.

Varnent10:52, 5 December 2011

for example, i want to display a picture in wikipedia.org as thumb, 250px. Could you tell me the code? Thanks

Nva199112:36, 5 December 2011

Here is the code you'd use for that: [[File:ImageName.jpg|thumb|250px]]

You may also find this page helpful: w:en:Wikipedia:Picture_tutorial

Varnent19:52, 5 December 2011
 
 

To use images from Wikipedia on your wiki, you'll first have to configure $wgForeignFileRepos. Then you can use wikitext to embed them in pages and change their size as Varnent points out.

Reach Out to the Truth20:32, 5 December 2011

If the file(s) you'd like to display from Wikipedia were uploaded to Wikimedia Commons, you can use this setting to do the file repo configuration for you: $wgUseInstantCommons

Varnent22:31, 5 December 2011
 

Has anyone actually pulled their head out of their ass and explained why <img> just can't be used normally like in HTML?

137.118.185.24120:01, 11 January 2013

Some PHP servers have blocked use of HTML markup like <img> for security reason, and the main purpose of a wiki is to use wiki markup, not HTML's.

LIMAFOX76 (talk)20:54, 11 January 2013
 

It can be used, enabling $wgAllowImageTag.

Note that this would allow any arbitrary URL used as an image, so it can be used to load any remote URL to track your visitor's IP address or serve an exploit image.

Ciencia Al Poder (talk)19:27, 12 January 2013
 
 

Image Authorization not working in Mediawiki 1.20.2

Edited by another user.
Last edit: 14:01, 12 January 2013

I have the latest version of Mediawiki (1.20.2) installed on a bluehost shared server. I did what was given at Manual:Image_Authorization#Apache_Instructions_without_PATH_INFO_with_mod_rewrite:

1. Downloaded this file [1] and put it in public_html/w/images folder.
2. Added the line "Deny from All" to the .htaccess file that came with installation in the folder public_html/w/images.
3. Added $wgUploadPath = "/wiki/cgi_img_auth.php"; in public_html/w/LocalSettings.php. Also tried the line $wgUploadPath = "cgi_img_auth.php" as suggested by someone on the discussion page.
4. Added following lines in public_html/w/images/.htaccess:

RewriteEngine on
RewriteRule ^/wiki/images(.*)$ /wiki/cgi_img_auth.php/$1 [R]
RewriteRule ^wiki/cgi_img_auth.php/(.*) wiki/cgi_img_auth.php?path=/$1
<Directory [server home path]/public_html/w/images>
Options -Indexes
</Directory>


Public listing of images directory is gone (throws 500 server error when w/images is accessed directly through browser) but all the images on all the pages are broken. Uploading works fine; it does upload the images into images directory though. Tried adding the above lines in public_html/.htaccess too, but that breaks the whole thing - throws an internal server error when I try to access any page. Are there any simple/standard/clearer steps or an extension to achieve this?

Pardhu (talk)04:17, 12 January 2013

With the RewriteRules you have there, each call to wiki/images/* will be redirected to your cgi_img_auth.php script. Normally, without this script, you can just access the image files with your webbrowser. Now you say they are "broken". What exactly do you get, when you try to open an image file with your webbrowser? Any output in the webbrowser? An error in the PHP error log?

88.130.110.24313:56, 12 January 2013
 

Install failed on CentOS 5.3

Hi, Just tried to install latest MediaWiki on my CenOS but failed in the first step after I chose language (English). The page I get after I choose language just shows some icons and emtpy disfunctional links, it's totaly messed up. What to do?

Here is a screenshot: http://www.2shared.com/photo/Z1mzj_gY/MediaWikiFail.html

78.0.236.8417:54, 12 July 2012

Wow that is a fail...

Do you have php warnings enabled? perhaps some warning was emitted that would help use debug the problem.

Posting the html source of that page might be useful in debugging (or might not, I'm not really sure).

Bawolff (talk)13:18, 13 July 2012

I have exactly this problem. I have tried the hack of Installer.php as suggested by an article in this discussion group but to no avail.

Is this something to do with it?

"If you are installing MediaWiki on CentOS 5.6, use the php53 package instead of php. The php package contains PHP 5.1.x, which is not compatible with the latest version of MediaWiki."

I do not know what the php53 package is.

82.20.220.21217:41, 13 July 2012

I have successfully got round this problem by using version 1.15.1 of MediaWiki.

82.20.220.21217:08, 14 July 2012

I have updated my php to 5.3.3 but it didn't help.

89.164.121.218:28, 16 July 2012
Edited by another user.
Last edit: 13:15, 17 July 2012

Here is error log:

[Mon Jul 16 20:20:59 2012] [error] [client 89.164.121.2] PHP Warning:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: support for \\P, \\p, and \\X has not been compiled at offset 192 in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1483, referer: https://www.xxx.com/wiki/
[Mon Jul 16 20:20:59 2012] [error] [client 89.164.121.2] PHP Warning:  array_shift() [<a href='function.array-shift'>function.array-shift</a>]: The argument should be an array in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1484, referer: https://www.xxx.com/wiki/
[Mon Jul 16 20:20:59 2012] [error] [client 89.164.121.2] PHP Warning:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: support for \\P, \\p, and \\X has not been compiled at offset 192 in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1483, referer: https://www.xxx.com/wiki/
[Mon Jul 16 20:20:59 2012] [error] [client 89.164.121.2] PHP Warning:  array_shift() [<a href='function.array-shift'>function.array-shift</a>]: The argument should be an array in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1484, referer: https://www.xxx.com/wiki/
[Mon Jul 16 20:21:00 2012] [error] [client 89.164.121.2] PHP Warning:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: support for \\P, \\p, and \\X has not been compiled at offset 192 in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1483, referer: https://www.xxx.com/wiki/
[Mon Jul 16 20:21:00 2012] [error] [client 89.164.121.2] PHP Warning:  array_shift() [<a href='function.array-shift'>function.array-shift</a>]: The argument should be an array in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1484, referer: https://www.xxx.com/wiki/
[Mon Jul 16 20:21:07 2012] [error] [client 89.164.121.2] PHP Warning:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: support for \\P, \\p, and \\X has not been compiled at offset 192 in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1483, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:07 2012] [error] [client 89.164.121.2] PHP Warning:  array_shift() [<a href='function.array-shift'>function.array-shift</a>]: The argument should be an array in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1484, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:08 2012] [error] [client 89.164.121.2] PHP Warning:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: support for \\P, \\p, and \\X has not been compiled at offset 192 in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1483, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:08 2012] [error] [client 89.164.121.2] PHP Warning:  array_shift() [<a href='function.array-shift'>function.array-shift</a>]: The argument should be an array in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1484, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:08 2012] [error] [client 89.164.121.2] PHP Warning:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: support for \\P, \\p, and \\X has not been compiled at offset 192 in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1483, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:08 2012] [error] [client 89.164.121.2] PHP Warning:  array_shift() [<a href='function.array-shift'>function.array-shift</a>]: The argument should be an array in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1484, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:08 2012] [error] [client 89.164.121.2] PHP Warning:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: support for \\P, \\p, and \\X has not been compiled at offset 192 in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1483, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:08 2012] [error] [client 89.164.121.2] PHP Warning:  array_shift() [<a href='function.array-shift'>function.array-shift</a>]: The argument should be an array in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1484, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:08 2012] [error] [client 89.164.121.2] PHP Warning:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: support for \\P, \\p, and \\X has not been compiled at offset 192 in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1483, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:08 2012] [error] [client 89.164.121.2] PHP Warning:  array_shift() [<a href='function.array-shift'>function.array-shift</a>]: The argument should be an array in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1484, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:08 2012] [error] [client 89.164.121.2] PHP Warning:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: support for \\P, \\p, and \\X has not been compiled at offset 192 in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1483, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:08 2012] [error] [client 89.164.121.2] PHP Warning:  array_shift() [<a href='function.array-shift'>function.array-shift</a>]: The argument should be an array in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1484, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:08 2012] [error] [client 89.164.121.2] PHP Warning:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: support for \\P, \\p, and \\X has not been compiled at offset 192 in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1483, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:08 2012] [error] [client 89.164.121.2] PHP Warning:  array_shift() [<a href='function.array-shift'>function.array-shift</a>]: The argument should be an array in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1484, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:08 2012] [error] [client 89.164.121.2] PHP Warning:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: support for \\P, \\p, and \\X has not been compiled at offset 192 in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1483, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:08 2012] [error] [client 89.164.121.2] PHP Warning:  array_shift() [<a href='function.array-shift'>function.array-shift</a>]: The argument should be an array in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1484, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:09 2012] [error] [client 89.164.121.2] PHP Warning:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: support for \\P, \\p, and \\X has not been compiled at offset 192 in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1483, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:09 2012] [error] [client 89.164.121.2] PHP Warning:  array_shift() [<a href='function.array-shift'>function.array-shift</a>]: The argument should be an array in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1484, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:09 2012] [error] [client 89.164.121.2] PHP Warning:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: support for \\P, \\p, and \\X has not been compiled at offset 192 in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1483, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:09 2012] [error] [client 89.164.121.2] PHP Warning:  array_shift() [<a href='function.array-shift'>function.array-shift</a>]: The argument should be an array in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1484, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:09 2012] [error] [client 89.164.121.2] PHP Warning:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: support for \\P, \\p, and \\X has not been compiled at offset 192 in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1483, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:09 2012] [error] [client 89.164.121.2] PHP Warning:  array_shift() [<a href='function.array-shift'>function.array-shift</a>]: The argument should be an array in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1484, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:09 2012] [error] [client 89.164.121.2] PHP Warning:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: support for \\P, \\p, and \\X has not been compiled at offset 192 in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1483, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:09 2012] [error] [client 89.164.121.2] PHP Warning:  array_shift() [<a href='function.array-shift'>function.array-shift</a>]: The argument should be an array in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1484, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:09 2012] [error] [client 89.164.121.2] PHP Warning:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: support for \\P, \\p, and \\X has not been compiled at offset 192 in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1483, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:09 2012] [error] [client 89.164.121.2] PHP Warning:  array_shift() [<a href='function.array-shift'>function.array-shift</a>]: The argument should be an array in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1484, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:09 2012] [error] [client 89.164.121.2] PHP Warning:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: support for \\P, \\p, and \\X has not been compiled at offset 192 in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1483, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:09 2012] [error] [client 89.164.121.2] PHP Warning:  array_shift() [<a href='function.array-shift'>function.array-shift</a>]: The argument should be an array in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1484, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:09 2012] [error] [client 89.164.121.2] PHP Warning:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: support for \\P, \\p, and \\X has not been compiled at offset 192 in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1483, referer: https://www.xxx.com/wiki/mw-config/index.php
[Mon Jul 16 20:21:09 2012] [error] [client 89.164.121.2] PHP Warning:  array_shift() [<a href='function.array-shift'>function.array-shift</a>]: The argument should be an array in /var/www/vhosts/xxx.com/httpsdocs/wiki/includes/parser/Parser.php on line 1484, referer: https://www.xxx.com/wiki/mw-config/index.php

Does that help?

89.164.121.218:33, 16 July 2012
 
 
 
 

Anything new on this? Can I update to 1.20 version of mediawiki maybe? I'm still on 1.16 because of this error.

89.164.196.21212:46, 12 January 2013

You could try updating, but I don't think that this would help you. This is no bug in MediaWiki, but a sub-optimal configuration on your machine. I don't think that this would have been "fixed" in newer versions of MediaWiki.

You could try recompiling PHP or to take another PHP package so that PCRE has full unicode support. Maybe your webhost also offers a newer PHP version, which has complete PCRE unicode support.

88.130.110.24313:49, 12 January 2013
 
 

Can I have two MediaWiki installations on one Linux machine (2 domains)?

Hi, I have a Linux machine with 2 domain names runing. I already installed MediaWiki on one domain, now I want to install it on another domain.

Is this safe?

I need to have two completely separate wikis because the purpose is totaly different.

Thanks.

Danijel (talk)13:01, 12 January 2013

Yes, that is possible.

If you are using Apache, you should set up two different Vhosts to handle the two domains. They can point to two different directories on the machine so that the files are completely separated. For the databases just set up two different databases on the same MySQL server and give each MediaWiki installation only access to that one database with its own data in it.

Apart from that you can use different users/groups on a file system level to restrict the linux user of the one wiki to access the files of the other wiki and vice versa. You can also modify the MySQL rights of the MySQL users: They surely should not be allowed to change "the other" DB. But additionally you can also disallow certain operations inside the DB like DROP, TRUNCATE and the like to improve security.

Also see Manual:Security.

88.130.110.24313:45, 12 January 2013
 

Vector - Hide Toolbox for Anonymous Users

On the Vector skin I would like to hide the Toolbox for Anonymous users. How can I do that? Also is there any way to decide which links appear in the Toolbox as for exmaple I don't need the print link to show.

Holygamer15:32, 15 February 2012

Thread:Project:Support_desk/How_to_hide_portions_of_text_from_site_visitors

Subfader (talk)11:09, 16 February 2012

Thanks but that doesn't stop the Toolbox links appearing in the source code. Those links are hurtful to Search Engine Optimization. I would like to completely remove the Toolbox for users not logged in.

Holygamer (talk)11:55, 16 February 2012

Hack the skin if hiding via CSS is not enough.

Subfader (talk)17:40, 16 February 2012

Any idea how? I found a tip on how to to that for the Monobook skin but that method doesn't work for Vector.

Holygamer (talk)17:43, 16 February 2012

skins/Vector.php: I guess it's added via

private function renderPortals( $portals ) {
...
                if ( !isset( $portals['TOOLBOX'] ) ) {
                        $portals['TOOLBOX'] = true;
                }

Try

private function renderPortals( $portals ) {
global $wgUser;
...
                if ( !isset( $portals['TOOLBOX'] ) && $wgUser->isAllowed('move') ) {
                        $portals['TOOLBOX'] = true;
                }

Adjust 'move' to the userright which loggedin users are allowed to and anons not.

Subfader (talk)20:18, 16 February 2012
 
 
 
 
 

[RESOLVED] Trouble uploading after installation

After installing to the latest version of mediawiki, I am unable to upload text files, and get the following messege: Could not open lock file for "mwstore://local-backend/local-public/d/dc"

How can I fix this?

173.85.173.4201:20, 14 May 2012

I fixed it. chmod 777 images directory.

173.85.173.4202:23, 14 May 2012
Edited by another user.
Last edit: 15:40, 21 July 2012

Hi,

I've got the same problem but it is not fixed by chmod 777 images.

Ive just upgraded to 1.19 and

  1. I cannot upload image files - getting the message Could not create directory "mwstore://local-backend/local-public/archive/d/d8".
    • I have made the mediawiki/images directory and all sub-directories writeable
    • I had added $wgFileExtensions = {'gif', 'png'); to LocalSettings.php
    • I have tried incuding $wgUploadPath = '/mediawiki/images'; to LocalSetting.php
  2. Current images files stored in the wiki
    1. are displayed correctly using [[Image:pic.gif]],
    2. but not if resized e.g. [[Image:pic.gif|640px]]

Amy suggestions appreciated

Kirby

86.184.214.10120:22, 26 May 2012

le dossier mediawiki et tout son contenu devrait apartenir au même usager que celui utilisé par le service Apache... Dans mon cas, www-data... Alors j'ai fait "chown -R www-data: mediawiki" pour régler mon problème.

70.81.74.13215:02, 8 July 2012

... En passant, je ne pense pas que ce soit une bonne idée de tout le mettre en 777, ça peut causer une brèche de sécurité.

70.81.74.13215:03, 8 July 2012

My french is rusty, but I think that I agree with you.

Setting 777 permissions is really a bad idea.

On my system, I had this problem too. I got here by googling the error message.

I fixed the problem by setting the image directory's owner to apache. And since nothing but a readme was in that directory, I didn't even need a recursive chown.

 chown apache. /var/www/mediawiki119/images

That was the path on my CentOS 6.3 system.

I wonder if there is an even less crude solution.

There is. Read Manual:Configuring file uploads

DHR (talk)07:31, 4 November 2012
 
 

check your "$wgFileExtensions = {'gif', 'png');" entry

you need to create an array, something like this:

$wgFileExtensions = array('gif','png');

2001:480:10:160:0:0:0:312121:47, 7 August 2012
 

For me chmoding uploads, uploads/*, uploads/*/* uploads/*/*/* to 777 helped (but please check with someone mor wiki-security aware that this doesn't imply any threats). For you it may be images, images/*, ... as it seems our wiki has some special settings.

89.103.184.11217:20, 21 June 2012

Making things 777 means any user can write to the directory, which means if anyone somehow gets access to your server (aka security vulnrability in something else), or if there are other users of your server, they can write stuff to the images directory. A better approach is to make the images folder either owned by the apache user, or in the apache's user's group, and only let the apache user have said permissions.

Bawolff (talk)12:15, 9 July 2012
 
 

Mi sukcesis per

# chown apache -R /path/to/your/wiki/
# chgrp apache -R /path/to/your/wiki/
AceroChevalosta (talk)06:05, 14 November 2012
 

site_stats damaged or missing on slave

Edited by another user.
Last edit: 18:02, 11 January 2013

Hi everyone,

some month ago I've updated our company wiki from 1.15.4 to 1.18.2. I added some Extensions (LDAP_Auth, other Extensions, etc...) and did some minor system modifications like adding an additional <div> tag to the Table of Contents.

The wiki is running on a CentOS Linux machine (Apache, MySQL db).

About one month ago I checked the "Special:Statistics" page as I always did in the morning and there it was:

Active Users: -1


I know that the default value for ss_active_users in the site_stats table is -1 but the value displayed in the database was 66. I checked this value via api and Special:ActiveUsers. I added $wgDebugDumpSql = true; $wgShowDebug = true; to the LocalSettings.php and reloaded the Special:Statistics page.


Here the output:

SiteStats::loadAndLazyInit: reading site_stats from slave 

Query 17 (slave): SELECT /* SiteStats::doLoad ... */ * FROM `wiki_site_stats` LIMIT 1 
SiteStats::loadAndLazyInit: site_stats damaged or missing on slave 

Query 18 (slave): SELECT /* SiteStats::doLoad ... */ * FROM `wiki_site_stats` LIMIT 1 
SiteStats::loadAndLazyInit: initializing damaged or missing site_stats 

Query 19 (slave): SELECT /* SiteStatsInit::edits ... */ COUNT(*) FROM `wiki_revision` LIMIT 1 

Query 20 (slave): SELECT /* SiteStatsInit::edits ... */ COUNT(*) FROM `wiki_archive` LIMIT 1 

Query 21 (slave): SELECT /* SiteStatsInit::articles ... */ COUNT(DISTINCT page_id) FROM `wiki_page`,`wiki_pagelinks` WHERE page_namespace = '0' AND page_is_redirect = '0' AND (pl_from=page_id) LIMIT 1 

Query 22 (slave): SELECT /* SiteStatsInit::pages ... */ COUNT(*) FROM `wiki_page` LIMIT 1 

Query 23 (slave): SELECT /* SiteStatsInit::users ... */ COUNT(*) FROM `wiki_user` LIMIT 1 

Query 24 (slave): SELECT /* SiteStatsInit::files ... */ COUNT(*) FROM `wiki_image` LIMIT 1 

Query 25 (slave): SELECT /* SiteStatsInit::views ... */ SUM(page_counter) FROM `wiki_page` LIMIT 1 
DatabaseBase::query: Writes done: DELETE FROM `wiki_site_stats` WHERE ss_row_id = '1' 

Query 26 (slave): DELETE /* SiteStatsInit::refresh ... */ FROM `wiki_site_stats` WHERE ss_row_id = '1' 

Query 27 (slave): INSERT /* SiteStatsInit::refresh ... */ INTO `wiki_site_stats` (ss_total_edits,ss_good_articles,ss_total_pages,ss_users,ss_images,ss_row_id,ss_total_views) VALUES ('v1','v2','v3','v4','v5','v6','v7') 

Query 28 (slave): SELECT /* SiteStats::doLoad ... */ * FROM `wiki_site_stats` LIMIT 1 
SiteStats::loadAndLazyInit: site_stats persistently nonsensical o_O 

Query 29 (slave): SELECT /* LCStore_DB::get ... */ lc_value FROM `wiki_l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'messages:statistics-header-views' LIMIT 1 

Query 30 (slave): SELECT /* LCStore_DB::get ... */ lc_value FROM `wiki_l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'linkPrefixExtension' LIMIT 1 

Query 31 (slave): SELECT /* LCStore_DB::get ... */ lc_value FROM `wiki_l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'messages:statistics-views-total' LIMIT 1 

Query 32 (slave): SELECT /* LCStore_DB::get ... */ lc_value FROM `wiki_l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'separatorTransformTable' LIMIT 1 

Query 33 (slave): SELECT /* LCStore_DB::get ... */ lc_value FROM `wiki_l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'digitTransformTable' LIMIT 1 

Query 34 (slave): SELECT /* LCStore_DB::get ... */ lc_value FROM `wiki_l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'messages:statistics-views-total-desc' LIMIT 1 

Query 35 (slave): SELECT /* LCStore_DB::get ... */ lc_value FROM `wiki_l10n_cache` WHERE lc_lang = 'en' AND lc_key = 'messages:statistics-views-peredit' LIMIT 1 
LoadBalancer::getConnection: using server localhost for group SpecialStatistics 

Query 36 (slave): SELECT /* SiteStatsUpdate::cacheUpdate ... */ COUNT( DISTINCT rc_user_text ) FROM `wiki_recentchanges` WHERE (rc_user != 0) AND rc_bot = '0' AND (rc_log_type != 'newusers' OR rc_log_type IS NULL) AND (rc_timestamp >= '20121212143454') LIMIT 1

Query 37 (slave): UPDATE /* SiteStatsUpdate::cacheUpdate ... */ `wiki_site_stats` SET ss_active_users = '66' WHERE ss_row_id = '1' 

There you can see "site_stats damaged or missing on slave" and other debug messages from SiteStats.php. How is it possible that the correct value of 66 is not displayed on the Special:Statistics page?

For testing I've set up a clean 1.18.2 installation with the current database and I got the same problem. So I think it is a database problem but I don't know if that's right.

Regards,

schrotteh

Schrotteh (talk)15:48, 11 January 2013

The stats are checked before displaying and the checks would fail if any of these conditions are met [1]:

  1. ss_total_pages < ss_good_articles
  2. ss_total_edits < ss_total_pages
  3. Any of the fields is less than 0 or greater than 2000000000

I highly doubt the third one would would apply, since it's doing a count() and it would never return -1. And the upper limit shouldn't be reached (since even en.wp hasn't reached it yet)

The first one also shouldn't be the problem, since as how are constructed both queries, ss_good_articles would contain always less rows or the same as ss_total_pages.

The problematic one should be ss_total_edits < ss_total_pages, if there are inconsistencies like entries in the page table with no corresponding entries on the revision table. If that's the case, have you used any experimental extension to mass-delete pages or something like that?

Ciencia Al Poder (talk)17:39, 11 January 2013
 

Use the Validator extension in MediaWiki 1.19

Edited by author.
Last edit: 15:38, 9 January 2013

As initially reported on Bugzilla (bug 43067), Fabrice LÉCAUDÉ would like to run the Validator extension on the following configuration:

  • MediaWiki 1.19.2/3
  • PHP 5.2.17
  • SemanticMediaWiki 1.8.0

MediaWiki 1.19 is our LTS version, and so still supported. For SemanticMediaWiki and LTS support issues, see this thread.

[edit] Solution offered in the bug

Upgrade PHP to 5.3.

The bug indicates this is not a factor under control.

You really should consider to move to a hosting company offering you the choice of the PHP version or consider to move to a VPS / dedicated server.

[edit] New solutions offered

First, consider if it's opportune to upgrade SemanticMediaWiki to 1.9, this version is still compatible with MediaWiki 1.19.

Then, to fix your bug, upgrade Validator to 0.5.1 or Git version. As noted in the bug reports, this instruction doesn't exist anymore in the code.

Dereckson (talk)14:53, 9 January 2013

Actually, I did upgrade to the last SMW version on MediaWiki 1.19.2. Semantic MediaWiki 1.8.0 (latest SMW version) requires Validator 0.5 minimun to work. I have no issue with the Semantic MediaWiki 1.7.1 (previous version)/Validator 0.4.13 duet (see here for the wiki and here for the version page). For the server, I have advanced hosting (I can install whatever MW version and/or extension I want) but I do not control PHP and MySQL. The main avantage is that's free. The main issue is that noboby seems to answer our requests since the wiki farm has been bought by a biggest company.

LIMAFOX76 (talk)15:20, 9 January 2013

And as SemanticMediaWiki 1.9 requires PHP 5.3, this wouldn't be a real solution either.

You so have three solutions:

  • someone accepts to create a patch resolving a bug not anymore in the Validator extension code;
  • make your provider aware MediaWiki current development use PHP 5.3 and not PHP 5.2;
  • move to another provider.
Dereckson (talk)15:37, 9 January 2013

I would prefer the second choice so I could upgrade to MW 1.20.x, but for now, there is no answer yet.

LIMAFOX76 (talk)15:41, 9 January 2013

It seems like a quicker fix would be to make the code compatible with php 5.2. I haven't looked at it and don't know if that is possible, though.

MarkAHershberger(talk)17:42, 9 January 2013

The issue is that the compat function is broken. Would be awesome if someone fixed that

Jeroen De Dauw (talk)21:30, 9 January 2013
 

Today I installed the following:

  • PHP 5.2.9 (part of Fedora 9)
  • MediaWiki 1.19.3 (downloaded today)
  • SMW 1.8 (downloaded today)
  • Validator 0.5.1 (part of SMW download today)

But I'm not seeing the problem.

This seems to indicate that Validator 0.5.1 works where Validator 0.5 doesn't. Is that right?

Note that I just installed it and initialized the SMW tables. Maybe there is something wikitext I need to see the problem?

MarkAHershberger(talk)22:15, 10 January 2013

Indeed, you need datas inside the tables. I give you all the processes I did before giving up and coming back to Validator 0.4.13 and SMW 1.7.1.

  1. I upgraded Validator up to 0.5.0 and SMW 1.8.0 and I already had this issue on the main page.
  2. I ran the two scripts on the SMWAdmin special page, nothing better.
  3. I came back on SMW1.7.1 with Validator 0.5.0, nothing better.
  4. I installed Validator 0.5.1 and SMW 1.8.0, deleted all the SMW tables, and restarted the two scripts, nothing better.
  5. I ran the update.php maintenance script to accelerate the process and made again the previous point. Even in the line event process, I can see the same error message several times and quite often.
  6. Then, I came back to the previous version (Validator 0.4.13 and SMW 1.7.1), ran once again the scripts (with the update.php maintenance script) and all came back to normal.

I created a test wiki where I put a duplicate of the same database with Validator 0.5.1 and SMW 1.8.0.1 in order to fix the issue.
I forgot to tell one thing, there is no cache on this wiki.

LIMAFOX76 (talk)07:43, 11 January 2013
 
 
 
 
 

upgrading from 1.19.2 to 1.20.x Error: invalid magic word 'speciale'

Redhat Enterprise 6.3 PHP 5.3.3 MYSQL Ver 14.14 Distrib 5.1.66

I can update from 1.19.2 to 1.19.3 just fine. But when I attempt to update to 1.20.0/1/2 I get this same error when I try to load a page:

Error: invalid magic word 'speciale'

Backtrace:

  1. 0 /var/www/html/web/wikitest/includes/MagicWord.php(236): MagicWord->load('speciale')
  2. 1 /var/www/html/web/wikitest/includes/parser/Parser.php(4765): MagicWord::get('speciale')
  3. 2 /var/www/html/web/wikitest/includes/parser/CoreParserFunctions.php(74): Parser->setFunctionHook('speciale', Array)
  4. 3 /var/www/html/web/wikitest/includes/parser/Parser.php(253): CoreParserFunctions::register(Object(Parser))
  5. 4 [internal function]: Parser->firstCallInit()
  6. 5 /var/www/html/web/wikitest/includes/StubObject.php(79): call_user_func_array(Array, Array)
  7. 6 /var/www/html/web/wikitest/includes/StubObject.php(99): StubObject->_call('firstCallInit', Array)
  8. 7 /var/www/html/web/wikitest/includes/cache/MessageCache.php(829): StubObject->__call('firstCallInit', Array)
  9. 8 /var/www/html/web/wikitest/includes/cache/MessageCache.php(829): StubObject->firstCallInit()
  10. 9 /var/www/html/web/wikitest/includes/cache/MessageCache.php(807): MessageCache->getParser()
  11. 10 /var/www/html/web/wikitest/includes/Message.php(618): MessageCache->transform('$1 - {{SITENAME...', true, Object(Language), Object(Title))
  12. 11 /var/www/html/web/wikitest/includes/Message.php(436): Message->transformText('$1 - {{SITENAME...')
  13. 12 /var/www/html/web/wikitest/includes/Message.php(476): Message->toString()
  14. 13 /var/www/html/web/wikitest/includes/OutputPage.php(790): Message->text()
  15. 14 /var/www/html/web/wikitest/includes/OutputPage.php(833): OutputPage->setHTMLTitle(Object(Message))
  16. 15 /var/www/html/web/wikitest/includes/Article.php(485): OutputPage->setPageTitle('Home')
  17. 16 /var/www/html/web/wikitest/includes/actions/ViewAction.php(37): Article->view()
  18. 17 /var/www/html/web/wikitest/includes/Wiki.php(427): ViewAction->show()
  19. 18 /var/www/html/web/wikitest/includes/Wiki.php(304): MediaWiki->performAction(Object(Article))
  20. 19 /var/www/html/web/wikitest/includes/Wiki.php(536): MediaWiki->performRequest()
  21. 20 /var/www/html/web/wikitest/includes/Wiki.php(446): MediaWiki->main()
  22. 21 /var/www/html/web/wikitest/index.php(59): MediaWiki->run()
  23. 22 {main}

This is a clean installation with no extensions and the default vector skin. I overwrite my old files like so: tar xvzf mediawiki-1.20.2.tar.gz -C /path/to/your/wiki/ --strip-components=1

Then run "php update.php" in the maintenance directory. Then when I go to the home page (or any page) I get the above error. I can overwrite the files back to 1.19.3 and then run update.php and it will go back to working again, but any 1.20.x version will not work.

Bc619 (talk)19:54, 10 January 2013

This looks similar: https://bugzilla.wikimedia.org/show_bug.cgi?id=32762

MarkAHershberger(talk)20:06, 10 January 2013

I actually read that before I posted. There's no solution presented there.

Bc619 (talk)21:05, 10 January 2013

In this file wiki-folder/languages/messages/MessagesEn.php the line exists in the magic words array:

'speciale' => array( 0, 'speciale' ),

So I'm not sure why this error (Error: invalid magic word 'speciale') even comes up.

Bc619 (talk)21:27, 10 January 2013

I finally figured out the solution. Since the files in the /languages/messages folder are cached, I tried running /maintenance/rebuildLocalisationCache.php. Upon running this, I noticed that it rebuilt all the languages except for 'en'!!!!??? (I guess maybe because that was my default language so it felt it didn't need to be rebuilt???) But in 1.20, I believe this line was added to MessagesEn.php: "'speciale' => array( 0, 'speciale' )," and since 'en' was not getting rebuilt, the wiki was never seeing the new value 'speciale'. So I ran rebuildLocalisationCache.php again but this time with the --force parameter to force a rebuild off all languages:

php rebuildLocalisationCache.php --force

The above command took a while to complete but...Now my website works after updating!!!!

Bc619 (talk)22:05, 10 January 2013

I don't know if gerrit:43280 is a fix for this.

Ciencia Al Poder (talk)10:47, 11 January 2013
 
 
 
 
 

How can I prevent removal of certain wikitext from pages with Abuse Filter?

I would like to create a filter that will prevent removal of {{commentbox}}, {{gwipdisclaimer}}, and possibly [[Category:Fanfiction]] and [[Category:Data]]. Those templates provide a comment box for users and readers to provide commentary on articles and also includes the trademark/copyright information about the content of the article.

Also, do you know how I can prevent adding email addresses to articles, user pages, or talk pages? I saw there was a filter on Wikipedia but it was private so I couldn't import it.

I thought there was an extension that allowed you to protect a given section from editing. I can't find it now, but even if I could, I would still have to warn you that MW isn't really meant to do that.

MarkAHershberger(talk)20:25, 9 January 2013

You mean is not supposed to be protecting sections? I could just uninstall it since it hasn't really been used for anything other than one time when a troll kept blanking his talk page and I didn't feel it was necessary at that point to block him. Protect Section is useless for the purpose I described since it requires someone with the protect section right to place it, and so it can't be preloaded on article creation, otherwise no one can save new articles. We'd have to have someone add the tags to every new article. That isn't doable because I restricted it to sysadmins since there's no way of tracking it and it could easily be overused. I might just go ahead and uninstall it.

 

I was looking through some of the filters on other wikis, and I haven't learned enough from it to write filters. Are there any good guides? There was a filter I saw to prevent posting email addresses, which could be useful for preventing meatpuppetry and other coordinated forms of misuse and harassment. It was set as private though.

ఠ_ఠ Inquisitor Sasha Ehrenstein des Sturmkrieg Sector (Talk) (Contr)01:10, 11 January 2013

You'll need to know a bit about regular expressions to create good filters like for email addresses. How much do you think you know?

Jasper Deng (talk)01:55, 11 January 2013

I don't really know that much. I know how to use * to show that there might be more additional letters at the beginning or end, and that parts can be substituted as in (t|g)old for gold or told. I remember that Wikipedia or Wikibooks has a useful article on them. Is there anything specific for Abuse Filter, since I'm not sure on the terms to add to in for instructions.

ఠ_ఠ Inquisitor Sasha Ehrenstein des Sturmkrieg Sector (Talk) (Contr)02:06, 11 January 2013

You can always use the regex tester site to test things you come up with. There are links to documentation there, also.

MarkAHershberger(talk)02:09, 11 January 2013

Thanks. That will be useful. Is there anything that explains how to enter the instructions into abuse filter? I mean for instructing it to do various actions, in addition to knowing what to look for.

ఠ_ఠ Inquisitor Sasha Ehrenstein des Sturmkrieg Sector (Talk) (Contr)03:28, 11 January 2013
 
 
 
 
 

[RESOLVED] Query for images with multiple titles doesnt work

When i ask Wiki Api to provide images for each title it just returns images for 1st specified title.

eg http://en.wikipedia.org/w/api.php?format=json&action=query&titles=Id%20Software%7CDoom%203%7CWolfenstein%203D%7CQuake%20II%7CJohn%20D.%20Carmack%7CJohn%20Romero%7CDoom%20(video%20game)%7CQuake%20(video%20game)%7CCommander%20Keen%7CRage%20(video%20game)&prop=info%7Cimages

returns info for each page but images only for 1st. Why?

213.137.240.14715:40, 7 January 2013

You need to use the continue information to get more. See this result which I got by adding "&imcontinue=15526|Doom_ingame_1.png" to your query string.

I found the imcontinue part by looking at the query-continue section from your result.

You can also get more results per query by adding changing the imlimit parameter. your query with imlimit=500.

MarkAHershberger(talk)15:50, 7 January 2013

Great! Thanks you a lot!

Not intuitive thing for me ) I thought imlimit related to each title.

213.137.240.14718:07, 10 January 2013
 
 

Misconfigured layout page

Hi!

I nee help to solve this problem. I installed the lastest version of mediawiki and when i go to index page, the layout images and css is not showing correct.

See the wiki: http://help.rezendesistemas.com.br/

elvanineto (talk)19:58, 10 January 2013

Check your error log. load.php (which is responsible for CSS/JS) is returning server errors.

MarkAHershberger(talk)20:13, 10 January 2013
 

How to control the editors in one particular organization

Hello,

I need create one new portal, but it cannot be editable by readers, only by internal team of my organization.

How can I control or limit the editions possibilities in a particular wikimedia installation?

Thanks for your helping.

201.49.164.12317:16, 10 January 2013

See Manual:Preventing_access for more information.

MarkAHershberger(talk)17:20, 10 January 2013
 

cannot upgrade to 1.18 from 1.17 - APC issue

Yesterday I tried to upgrade from 1.17 to 1.18. It wasn't 100% clear how to do this given that there was a warning not to install 1.18 over previous installs, so I downloaded 1.18, unpacked it to a new folder, deleted my old 1.17 (backing the folder up first) and copying all of 1.18 over to the wiki directory. Running the upgrade script got me this error:

CACHE_ACCEL requested but no suitable object cache is present. You may want to install APC.

Backtrace:

  1. 0 [internal function]: ObjectCache::newAccelerator(Array)
  2. 1 /home/liquidfr/public_html/lf_wiki/includes/objectcache/ObjectCache.php(62): call_user_func('ObjectCache::ne...', Array)
  3. 2 /home/liquidfr/public_html/lf_wiki/includes/objectcache/ObjectCache.php(50): ObjectCache::newFromParams(Array)
  4. 3 /home/liquidfr/public_html/lf_wiki/includes/objectcache/ObjectCache.php(23): ObjectCache::newFromId(3)
  5. 4 /home/liquidfr/public_html/lf_wiki/includes/GlobalFunctions.php(3600): ObjectCache::getInstance(3)
  6. 5 /home/liquidfr/public_html/lf_wiki/includes/Setup.php(402): wfGetMainCache()
  7. 6 /home/liquidfr/public_html/lf_wiki/includes/WebStart.php(157): require_once('/home/liquidfr/...')
  8. 7 /home/liquidfr/public_html/lf_wiki/index.php(53): require('/home/liquidfr/...')
  9. 8 {main}

I tried installing APC but as it turns out my VPS runs on something called suPHP and I need to change the handler, which I don't know enough about to be comfortable with. Can someone help me out here? Thanks!

Liquid.fractal15:25, 14 December 2011

Also seen when upgrading from mediawiki 1.17 to 1.18

With settings :

$wgMainCacheType = CACHE_ACCEL; $wgMemCachedServers = array();

188.126.75.12022:39, 14 December 2011

Actually, my thanks to whoever replied to my post; I switched $wgMainCacheType to CACHE_ANYTHING and the upgrade worked fine.

Liquid.fractal23:38, 14 December 2011

I had the same issue, and used the above fix and I was able to upgrade. However, once I restore the setting to $wgMainCacheType to CACHE_ACCEL, the problem comes back. Does setting $wgMainCacheType to CACHE_ANYTHING stop mediawiki from using the PHP accelerator? I have XCache 1.3.1 installed.

Jedicraft17:32, 15 December 2011

Yes, $wgMainCacheType = CACHE_ACCEL; means use either APC, XCache or WinCache. If you don't actually have such a program installed, MediaWiki will error if you try to force it to use such a program. CACHE_ANYTHING means mediawiki will auto-detect what type of cache you have. If all else fails, it will cache things in the db (which might actually be slower then not caching stuff at all. The default config is to have $wgMainCacheType set to CACHE_NONE, but the parser cache and message cache [which cache expensive things] to use CACHE_ANYTHING)

Bawolff21:35, 19 December 2011

CACHE_ACCEL is documented as working with eAccelerator. However, I am getting this same error with eAccelerator installed, when this setup worked perfectly in 1.17.1. Was eAccelerator support dropped in 1.18? Maiden taiwan 14:32, 19 January 2012 (UTC)

Maiden taiwan14:32, 19 January 2012
 
 
 
 

try installing php-apc and restarting Apache. In Fedora, the package name is php-pecl-apc.

173.77.16.9415:04, 9 April 2012
 

I have the same problem but APC is running! In apc_cache_info() i can see some files from other scripts. Why does Mediawiki doesnt find APC?

89.14.214.5913:04, 10 January 2013

Please, do not ask new questions in old threads. Create a new thread and:

  • Provide the MediaWiki version you're using.
  • Paste the stack trace of the error (with $wgShowExceptionDetails enabled).
Ciencia Al Poder (talk)13:54, 10 January 2013
 
 

Installed SpamBlacklist Extension, Gives me an error message and no one can edit anymore

I installed Extension:SpamBlacklist because we were getting an overwhelming amount of spam, and the spam has stopped... only because no one can edit anymore. The edit window opens fine, but every time I press submit I get an error message reading:

Warning: require(/home/fh14/public_html/chibisandate/__DIR__/SpamBlacklistHooks.php) [function.require]: failed to open stream: No such file or directory in /home/fh14/public_html/chibisandate/includes/AutoLoader.php on line 1007

Fatal error: require() [function.require]: Failed opening required '/home/fh14/public_html/chibisandate/__DIR__/SpamBlacklistHooks.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/fh14/public_html/chibisandate/includes/AutoLoader.php on line 1007

FH14 (talk)07:51, 10 January 2013

That extension uses the __DIR__ constant, added in PHP 5.3.0. Your PHP version is older and doesn't support it.

You can try replacing __DIR__ by dirname(__FILE__) in the code (other incompatibility problems may arise), or upgrade your PHP to 5.3.0 or newer.

Ciencia Al Poder (talk)10:30, 10 January 2013
 

[RESOLVED] Internal Server Error (500)

System Details: Running on: Apache/2.2.14 System info: (Ubuntu) Powered by: PHP/5.3.2-1ubuntu4 MySQL: 5.1.41-3ubuntu12.10 Mediawiki: 1.10.1

I've had the mediawiki running fine for a number of years along side my vBulletin Forum. I upgraded the forum software on the weekend, which resides in a separate directory on the server to the Wiki. Since then the wiki has not worked. I get an internal server error. I've checked the message logs and a few other logs but I cannot seem to find what the error is. I've even uploaded the software again, but still to no avail. I've been looking all day for an answer. :(

Any help or advice would be greatly appreciated.

http://www.redandwhiteonline.com/wiki/index.php?title=Main_Page

ScottMH (talk)09:32, 16 December 2012

See Blank page. Without the error message there's nothing much we can do.

Ciencia Al Poder (talk)12:04, 16 December 2012

Thanks. I have put some debug stuff in my Local_setting.php from some other pages I've read here. But to no avail.

I will see tonight if this was one of them.

One thing I did find that I was curious about is the collation of the data structures. They are Latin1_bin which shows all the data as hexadecimal. Is this correct for the version I'm using?

ScottMH (talk)20:59, 16 December 2012
 

I replaced the wiki index.php file with one that just displays the phpinfo(), and I still got the 500 error I put the same index.php file into another directory and the phpinfo showed up. I then renamed the wiki directory and the phpinfo showed up. I restored the wiki index.php into the renamed wiki folder and I still got the 500 error.

Permissions on the 2 directories are identical(755).

There must be something else that is blocking getting to the index.php in that directory. ?

ScottMH (talk)01:21, 18 December 2012

See the error logs of the web service (Apache, Nginx...). It should state what the error is.

Ciencia Al Poder (talk)10:13, 18 December 2012

I can't find any errors in the apache log related.

Is it worth trying to upgrade it to the latest version? I just don't want to lose all the data I have in there.

ScottMH (talk)05:43, 28 December 2012

For the error logs, read this.

Since your PHP version is 5.3.2, yes, it's recommended to upgrade, since 1.10 won't work on that version of PHP, being most likely the cause of the error.

Ciencia Al Poder (talk)10:16, 28 December 2012
 
 
 
 
 

How to ?- Insert table in NUMBERED LIST .

Problem:

   Unable to create a numbered list(CONTINUNG) when adding a table in one of the steps.
   Unable to figure the line break that compels a new numbered list to start.
       How do I fix this?

[edit] EXAMPLE


  1. Instruction 1
  2. Instruction 2
    Example.jpg
  3. Instruction 3
    1. Sub-list
      1. sub-list
    2. Sub-list
  4. Instruction 4
    • category 2
  5. Instruction 5
Example Example Example
  1. Instruction 6 - I am trying to make this list item continue from the list above. i.e 6 instead of starting a new list at 1 again.

Aum120:40, 8 November 2011

I have the same problem

Ada.Grobbelaar10:23, 9 November 2011

I figured one solution. Adding ComplexList extension <cl></cl> tag. This can be found at Extension:ComplexList

It works perfectly fine. It's pretty cool and simple- it lets you define your list with much ease(alpha, roman, numeric, etc)

Aum121:24, 10 November 2011

Thanks a million!

Ada Grobbelaar05:47, 11 November 2011
 
 

I figured out the easiest way might be hard-code the html code by using <ol>...</ol> and <li>...</li>. I know it is dirty but it works if you do not want to install additional extension.

  1. category 2
  2. Instruction 5
    Example Example Example
  3. Instruction 6 - I am trying to make this list item continue from the list above. i.e 6 instead of starting a new list at 1 again.
203.70.194.10407:05, 10 January 2013
 
First page
First page
Previous page
Previous page
Last page
Last page