Project:Support desk

Jump to: navigation, search

About this board

vde   Welcome to's Support desk, where you can ask MediaWiki questions!

There are also other places where to askCommunication: IRCCommunication#Chat, mailing listsMailing lists, Q&A etc.

Before you post

Post a new question

  1. To help us answer your questions, please always indicate which versions you are using (reported by your wiki's Special:Version page):
    • MediaWiki
    • PHP
    • Database
  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 topic".
Language: English  español
By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL

DBQueryError when I try to search for anything on test Wiki

DK PWCS (talkcontribs)

I have set up a test Wiki with several pages but every time I use the search function I get

Database Error

A database query error has occurred. This may indicate a bug in the software. [ff557850846b7910a1eed4c3] 2016-12-08 00:50:41: Fatal exception of type "DBQueryError"

What have I done wrong?

Jackmcbarn (talkcontribs)

More information is needed to determine the problem. Please follow the instructions at Manual:How to debug to get this information.

DK PWCS (talkcontribs)


I've added this to index.php and LocalSettings.php but get nothing extra: error_reporting( -1 ); ini_set( 'display_startup_errors', 1 ); ini_set( 'display_errors', 1 );

DK PWCS (talkcontribs)


I've added this to index.php and LocalSettings.php but get nothing extra: error_reporting( -1 ); ini_set( 'display_startup_errors', 1 ); ini_set( 'display_errors', 1 );

Jackmcbarn (talkcontribs)

That's only the beginning. Do the rest of what the page says. (talkcontribs)

Parse error: syntax error, unexpected '.168' (T_DNUMBER) in C:\xampp\htdocs\wiki\LocalSettings.php on line 70

Jackmcbarn (talkcontribs)

You made a typo in your LocalSettings.php file. If you can't find it yourself, post the file somewhere (removing sensitive stuff first) and I'll point it out.

DK PWCS (talkcontribs)

Thanks Jack. The previous post was not from me. Someone replied in the wrong post.

I managed to fix this issue by upgrading MYSQL...I am however now having an issue with getting the Search function to find text included in the pages rather than just the page names.

Any ideas?

Error: 1 cannot start a transaction within a transaction

Dbeidle (talkcontribs)

Since I updated to mediawiki-1.28.0 from mediawiki-1.26.2 yesterday, I've been getting the following error, usually when I save or preview an edited page, and occasionally when I access a page:

Original exception: [a53679567296387f8f2003e6] /~dabeidle/mediawiki-1.28.0/index.php?title=Main_Page&action=submit DBQueryError from line 1054 of /Users/dabeidle/Sites/mediawiki-1.28.0/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? Query: BEGIN Function: Database::query (MessageCache::loadFromDB(en)-big) Error: 1 cannot start a transaction within a transaction

If I resubmit the edit page, the changes are saved (usually after the 3rd attempt). On a query, reloading the page works.

One change I made from the previous version was to change the database ownership from _www:_www to my account, with corresponding changes in http.conf. This is a local, private wiki running on macOS Sierra 10.12.1, PHP 5.6.25, SQLite as a personal knowledge base so access from the Internet is not possible.

The questions I have are: "Did I encounter a regression that I need to log as a bug?" in which case I can provide more detail, or "Did I miss something (probably simple) in the upgrade or configuration?"

I followed the upgrade procedure on <>, including upgrading the SQLite3 database.

Dbeidle (talkcontribs)

I've added the following to my LocalSettings.php file in order to produce more info:

$wgShowExceptionDetails = true;
$wgDebugLogFile = "/tmp/wiki.log";
$wgDebugToolbar = true;
$wgShowDebug = true;
$wgShowSQLErrors = true;
$wgDebugDumpSql = true;
$wgShowDBErrorBacktrace = true;
error_reporting( -1 );
ini_set( 'display_errors', 1 );

A couple of quick tests didn't reproduce the error. More testing to come tomorrow.

Ciencia Al Poder (talkcontribs)

If you reproduce that consistently, try disabling extensions, and see which one is causing the problem. Probably not a missing step in upgrade or configuration.

Dbeidle (talkcontribs)

I started off by disabling all extensions (WikiEditor, SyntaxHiglight_GeSHi, Cite), restarted the Safari browser, and browsed to the main page of the wiki. I got the following error:

'''Fatal error''': Uncaught exception 'Cdb\Exception' with message 'Unable to move the new CDB file into place.' in /Users/dabeidle/Sites/mediawiki-1.28.0/vendor/wikimedia/cdb/src/Writer/DBA.php:60 Stack trace: #0 /Users/dabeidle/Sites/mediawiki-1.28.0/vendor/wikimedia/cdb/src/Writer.php(88): Cdb\Writer\DBA->close() #1 [internal function]: Cdb\Writer->__destruct() #2 {main} thrown in '''/Users/dabeidle/Sites/mediawiki-1.28.0/vendor/wikimedia/cdb/src/Writer/DBA.php''' on line '''60'''

This was an end result of:

'''Warning''': rename(/var/tmp//l10n_cache-en.cdb.tmp.508300813,/var/tmp//l10n_cache-en.cdb): Permission denied in '''/Users/dabeidle/Sites/mediawiki-1.28.0/vendor/wikimedia/cdb/src/Writer/DBA.php''' on line '''59'''

[ec3c25e62192ab4a58132440] /~dabeidle/mediawiki-1.28.0/index.php/Main_Page MWException from line 118 of /Users/dabeidle/Sites/mediawiki-1.28.0/includes/cache/localisation/LCStoreCDB.php: Unable to move the new CDB file into place.

I noticed that the tmp file in question had an ownership of dabeidle:wheel instead of dabeidle:staff. I'll try removing the tmp file, and then retry the test.

Dbeidle (talkcontribs)

Removing the one /var/tmp file did not help. Failure repeatable. However, when I terminated the browser, deleted everything in /var/tmp, restarted the browser, and browsed to my main page it loaded this time. Testing continues. Will repeat the simple main page load test a couple more times and then start enabling extensions one by one.

Dbeidle (talkcontribs)

Clearing out /var/tmp/* and disabling extensions helped a lot in reducing the occurrence of "cannot start a transaction within a transaction" errors (only saw one while navigating the wiki so far).

I use three of the bundled extensions: WikiEditor, SyntaxHighlight_GeSHi, and Cite. When I enable any one of these three extensions, the occurrence of "cannot start a transaction within a transaction" increases. Reloading the page after such an error usually works in displaying the page. Note: I use the versions distributed with media wiki, I do not use the versions from prior releases.

We can set up a screen sharing session if it'd help.

Dbeidle (talkcontribs)

Not sure if this matters... After I enabled both the Cite and SyntaxHighlight_GeSHi extensions, both Chrome and Safari browsers get a "cannot start a transaction within a transaction" fairly quickly. However, I haven't been able to reproduce the error (yet) on Firefox. Makes one go "Hmmm!"

Reply to "Error: 1 cannot start a transaction within a transaction"

How to Search content rather than just page titles

DK PWCS (talkcontribs)

The out of the box set up seems to only search page names/titles and it it doesn't find one, offers to create a page with that name. How do you configure the Search function to also search page content (as with Wikipedia, all pages containing "XXX")?

DK PWCS (talkcontribs)

Although the search offers "containing..." it does not find the words I'm searching for unless they are also the page name

DK PWCS (talkcontribs)

Default Title of the search bos is "Go to a page with this exact name if it exists".

What am I doing wrong?

Reply to "How to Search content rather than just page titles"

help on enabling the new page,RSS feed and Embeded HTML in 1.27

PrathapM13 (talkcontribs)

We are migrating the mediawiki from 1.13 to 1.27 As part of this we are trying to add below new enhancements as well

1)Open new page functionality 2)Rss feed support 3)Embedded html for media inclusion

kindly guide me how to enable these services in Mediawiki 1.27

Reply to "help on enabling the new page,RSS feed and Embeded HTML in 1.27"

Search results and other links are downloaded instead of being rendered

Stefanomenci (talkcontribs)

Our company wiki has been working for years and has been updated to 1.26.3 a few months ago without problems. A few weeks ago it started downloading some pages instead of rendering them.

If the search term does not match the title of a page, the search result page is shown and clicking on one of the search result items works well.

If the search term matches the title of a page, pressing enter or clicking on the page title shown at the top of the list, downloads the page instead of showing it. Clicking on the Containing... link below the page name, then the search result page is shown and everything works well.

Clicking the Save page button after editing a page, the page will be downloaded. Canceling the download and clicking the Read link shows the page with the last editing properly saved.

The downloaded file is called index.php, it starts with the following text and has some binary data after that (I assume that's the compressed page content). I don't understand why there are the first two lines:

 HTTP/1.1 200 OK
 Server: nginx/1.10.2
 Date: Mon, 05 Dec 2016 17:16:45 GMT
 Content-Type: text/html; charset=UTF-8
 Transfer-Encoding: chunked
 Connection: keep-alive
 X-Content-Type-Options: nosniff
 Content-language: en
 X-UA-Compatible: IE=Edge
 Vary: Accept-Encoding,Cookie
 Expires: Thu, 01 Jan 1970 00:00:00 GMT
 Cache-Control: private, must-revalidate, max-age=0
 Content-Encoding: gzip
 Last-Modified: Mon, 05 Dec 2016 17:16:44 GMT

Here is the versions:

Product Version
MediaWiki 1.26.3
PHP 5.5.38 (cgi-fcgi)
MySQL 5.5.51-38.2
ICU 4.2.1
AKlapper (WMF) (talkcontribs)

Unrelated to your problem, but 1.26 is an old unsupported version without any security updates. Please strongly consider upgrading: Download.

Stefanomenci (talkcontribs)

Some more details:

  • The problem reproduces when a link causes a redirect. For example clicking on the Random page link it does reproduce because it redirects to another page
  • The problem reproduces 90-95% of the times, not 100%
Ciencia Al Poder (talkcontribs)

This looks like a misconfiguration on the server, but try $wgDisableOutputCompression

Stefanomenci (talkcontribs)

Yesterday we just found out that the problem disappears after uninstalling BitDefender (disabling is not enough).

And now, thanks to you, I found out that disabling the compression the problem disappears, even if BitDefender is installed.

So we have a workaround while we try to understand why BitDefender causes the problem.

Thanks, Stefano

Reply to "Search results and other links are downloaded instead of being rendered"

Retrieving JSON with thumbnails for Category members

2 (talkcontribs)

How to retrieve json response of category member with thumbnail url in it. I have more than 100 items in category members .

What query shall i use in the url for retrieving thumbnails for each and every category members in the list(more than 100 items) for JSON response of the category member.

I tried using "prop=pageimages" query parameter but I'm able to retrieve only 50 max objects in JSON containing thumbnails url in it. What is the alternative to receive thumbnail for every members as they all have images in the page too added in the correct format.

Example url i used:

Its a url to show example above, not a real live url to check

Please help me sort it ASAP.

Thank You,


Ciencia Al Poder (talkcontribs)

If there are more results than your limit, what you should do is using the continue parameter to do another request that will give you the remaining results

Reply to "Retrieving JSON with thumbnails for Category members"
Chris huh (talkcontribs)

I've moved my Mediawiki installation to another server and I'm now unable to upload files. Looking in the error_log I see a single line for each upload attempt:

[07-Dec-2016 13:25:23 UTC] PHP Fatal error: Call to undefined function iconv() in /home/username/public_html/wiki/includes/media/IPTC.php on line 449

Perhaps iconv isn't enabled on this server. How can I turn this on? Would it be through a php.ini file? Is there a way to confirm that iconv isn't enabled?


Ciencia Al Poder (talkcontribs)

You may need to install the php-iconv package

Reply to "Moved server: now can't upload files"
Please New Wiki (talkcontribs)

In my installation of MediaWiki, it says:

Warning: Can not find APCu, XCache or WinCache.

Object caching has not been enabled.

Links: APCu is XCache is WinCache is

Questions: What is the purpose of these resources? Should I install in which folder? How should I install it?

Reply to "Resources for MediaWiki"

Visual editor, from the site

Please New Wiki (talkcontribs)

I've been editing a page from,

But I put it in Visual Editor mode,

I want to put it in source code mode, but I can not. Please New Wiki (talk) 16:55, 8 December 2016 (UTC)

Reply to "Visual editor, from the site"
Cm2785 (talkcontribs)

Hi there! I have Xampp installed and mediawiki and I can access it on another computer over LAN by typing in the IP and exact path, but when logging on or selecting other links it reverts back to localhost and I have to re-enter the IP address in place of localhost to get that page to work. Is there a way I can set this up to avoid this? Thanks!

AhmadF.Cheema (talkcontribs)

You probably need to set $wgServer to your computer's IP. (talkcontribs)

Thank you, where would I enter this?

Jackmcbarn (talkcontribs)

In LocalSettings.php. (talkcontribs)

Thanks I added that and got: Parse error: syntax error, unexpected '.168' (T_DNUMBER) in C:\xampp\htdocs\wiki\LocalSettings.php on line 135 (talkcontribs)

Parse error: syntax error, unexpected '.168' (T_DNUMBER) in C:\xampp\htdocs\wiki\LocalSettings.php on line 70 (talkcontribs)

Nevermind I got it, thanks!