Open main menu

MediaWiki β

Project:Support desk

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".
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
Brianfly (talkcontribs)

We are receiving the "Cannot access the database" error. This is a new install and we were able to complete the configuration, which means it was able to connect to the SQL server and create the database, logins and security. We also checked the box to use the same account for access as was used to create the SQL DB. We are using Windows authentication, but tried SQL server authentication as well, but with the same result. We enabled PHP errors and debugging, but got no useful information other than the below. Our environment is Windows Server 2016, SQL 2016, MediaWiki LTS 1.27.3. We have installed the correct VC and MS PHP drivers for PHP, which has been proven since everything talks to the SQL server, except after configuration. Looking at previous responses, there doesn't seem to be much help with SQL server, but thought I'd post to see if anyone has had a similar issue. Relevant error and debug log lines are:

PHP error log:PHP Warning:  Declaration of DatabaseMssql::ignoreErrors(array $value = NULL) should be compatible with DatabaseBase::ignoreErrors($ignoreErrors = NULL) in \\xxx\WikiMedia\includes\db\DatabaseMssql.php on line 1413

PHP Debug log:[error] [63d39a8a9c671c22ec901aaa] /   ErrorException from line 1413 of \\xxx\WikiMedia\includes\db\DatabaseMssql.php: PHP Warning: Declaration of DatabaseMssql::ignoreErrors(array $value = NULL) should be compatible with DatabaseBase::ignoreErrors($ignoreErrors = NULL)

[connect] Failed to connect to database 0 at xxx

Brianfly (talkcontribs)

Just an update. We were able to get SQL authentication working. We also tested windows authentication using the below script, connecting with the same apppool credentials as the site and it works as well. It seems that once the configuration is done, the wiki site does not find the windows authentication username and password. Was wondering if this can be verified?


/* Specify the server and connection string attributes. */ 

$serverName = "xxx"; 

$connectionInfo = array( "Database"=>"test_wiki"); 

/* Connect using Windows Authentication. */ 

$conn = sqlsrv_connect( $serverName, $connectionInfo); 

if( $conn === false ) 

     echo "Unable to connect.</br>"; 

     die( print_r( sqlsrv_errors(), true)); 

/* Query SQL Server for the login of the user accessing the 

database. */ 

$tsql = "SELECT CONVERT(varchar(32), SUSER_SNAME())"; 

$stmt = sqlsrv_query( $conn, $tsql); 

if( $stmt === false ) 

     echo "Error in executing query.</br>"; 

     die( print_r( sqlsrv_errors(), true)); 

/* Retrieve and display the results of the query. */ 

$row = sqlsrv_fetch_array($stmt); 

echo "User login: ".$row[0]."</br>"; 

/* Free statement and connection resources. */ 

sqlsrv_free_stmt( $stmt); 

sqlsrv_close( $conn); 


Reply to "(Cannot access the database)"
Summary by Kanto501

the cron was pointing to a symbolic link and not the actual directory, this made it look like it was rebuilding the text indexes but was actually breaking them. Once I fixed the cron it rebuilds correctly and everyone is happy again

Kanto501 (talkcontribs)

Using Mediawiki 1.28.0 with Mysql database. I have 2 wiki's that are identical except for the location of app and database. If I do a search on one it gives me correct results while the other gives me just a very small set of results. The only difference between the 2 is I have run the rebuildtextindex.php script against the wiki not returning correct results. I do not know how to troubleshoot this since this script appears to be working fine, no errors. Does anyone have any suggestions on what might be wrong?

I found the issue, the cron was pointing to a symbolic link and not the actual directory, this made it look like it was rebuilding the text indexes but was actually breaking them. Once I fixed the cron it rebuilds correctly and everyone is happy again.

Не могу найти созданную мной статью.

Summary by Malyacko

Unrelated to MediaWiki software. User contributions are linked from the side bar - in this case,

Sportnews1 (talkcontribs)

Здравствуйте, вчера я создала статью о Эльмире Эфендиевой - телеведущей телеканала НТВ. Но сегодня этой статьи нигде нет. Куда она делась?

Malyacko (talkcontribs)

Did you create that article on Because it does not look like. Hence impossible to tell...

Malyacko (talkcontribs)

Richarddteamaccent (talkcontribs)

When editing text through the "Edit" section in MediaWiki 1.29.0, I experience the following:

Source code produces the following output:


Process examples to communicate issues and templates to coders and editors. Test 2

  • Check engine oil level

null Expand

However, when editing text, for example, if I wanted to remove "Test 2" using "Edit" above, the following happens in the source code:

* <span class="mw-customtoggle-EngineOil" style="color:#36c">Check engine oil level</span>

<div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-EngineOil">

changes to:

* <span class="mw-customtoggle-EngineOil" style="color:#36c">Check engine oil level</span>

<div class="mw-collapsible mw-collapsed">

To summarize, id="mw-customcollapsible-EngineOil" is removed, which causes [Collapse] or [Expand] to appear in the far right, instead of clicking on the header to expand or collapse.

I can work around this by first editing the text and and then going into the source code to re-enter each ID, but that seems very manually intensive.

Has anyone seen this? Is there a fix? (Please let me know if further clarification is required.)

Thank you.

Reply to "Page Editing Error (Collapse/Expand)"

Can I install a new mediawiki and use an old mediawiki database?

Serrkind (talkcontribs)

We are currently running Mediawiki 1.19.

I upgraded the server OS from Ubuntu 12.04 to Ubuntu 14.04 and it broke the wiki extension Wiki2Latex.

PHP version is 5.5.9.

MySQL Database version is 5.5.57.

I would like to upgrade the mediawiki to 1.25 or 1.26 (I still need the LDAP extension functionality), but following the upgrade directions doesn't seem to be working.

Can I install a fresh copy of Mediawiki 1.25 or 1.26, refer it to the existing database and images and run update.php?

Thank you for the help.

2003:72:6D1A:8600:A467:F3F4:B77B:F6B1 (talkcontribs)

You definitely can upgrade from 1.19 to 1.26. While making that upgrade, you will also have to run update.php. A complete guide is available at Upgrading!

What is it that is not working as expected?

Reply to "Can I install a new mediawiki and use an old mediawiki database?"
TheSoleIntern (talkcontribs)


First off, this is the software that i use for the system:

 Ubuntu 16.04.3 


PHP 7.0.22

mysqld  Ver 5.7.19


So, I'm trying to only setup the wiki for a local network. It would be unnecessary to make it available on the internet and I don't want to pay for a domain.

I followed this guide for the installation of Mediawiki:

It seemed to be going well, although I wasn't sure how to edit the files /etc/apache2/sites-available/mediawiki.conf and /etc/nginx/conf.d/mediawiki.conf since I didn't own a domain. I decided to put the server's IP-address in the spaces that should be edited. But when i finished setting up the system and I wanted to access the web interface I only got to the apache default page when I typed in the IP-address in my browser.

I decided to reinstall Mediawiki since I wasn't sure if it was installed correctly. The reason for that is that I wasn't able to find the localsettings.php and defaulsettings.php files in the directory.

This time I followed this guide:

The problem remains.

So if someone could tell me how I can access the web interface of Mediawiki with this setup I would be very grateful.

Malyacko (talkcontribs)

Reinstalling never solves configuration issues. See (talkcontribs)

In which folder is the Apache default page, which you are seeing?

This is the folder, in which you have to install MediaWiki: Remove the default page and instead extract the MediaWiki tarball there.

Then calling the URL with index.php at the end should bring up the MediaWiki installer.

Reply to "Access Mediawiki webpage in local network" (talkcontribs)


I am deleted objectcache table by mistake. How i create it on the mysql terminal?

CREATE TABLE objectcache;

is it enough?

2003:72:6D1C:7500:CD92:7D96:FEB1:DD20 (talkcontribs)

No, that is not enough.

Basically, the file maintenance/tables.sql contains the CREATE statement, which you have to run.

How exactly the table has to look may be different in other versions of MediaWiki and in other database management systems (e.g. in MSSQL or PostGres).

2003:72:6D1C:7500:CD92:7D96:FEB1:DD20 (talkcontribs)

And note that /*_*/ has to be replaced by the table prefix, if set. And /*i*/ is what indeces are prepended with. (talkcontribs)

If i run maintenance script problem is solve?

I am created table on the terminal like that, it works but i don't know, maybe in the background there may be a problem.

"CREATE TABLE objectcache (keyname char(255) binary, value mediumblob, exptime datetime);" (talkcontribs)

No, running update.php will not help.

The query, which you have run, misses the PRIMARY KEY on the keyname column.

Also, you should still add an index:

 CREATE INDEX exptime ON objectcache (exptime);
Reply to "How i create "objectcache" table?"
Alex Vissers (talkcontribs)

I closed the option to add a viewed page to my travel book "Schotland 2018". How do I get the pop up window again that makes it easy to add a page to my book. Also even when I'm logged in, I cannot see my "collection" nor do I know how to "save" a book. I do not need to save and share the book but I cannot find the book as a subpage in the navigation panel either... Thanks for some feedback

Malyacko (talkcontribs)

Where to find that option? How to "close an option"? How to create a "travel book"? Is this or something else? Which MediaWiki version is this about? This needs clearer steps to reproduce. :)

Reply to "Wiki book"
Bekircem (talkcontribs)


I've installed ConfirmEdit plugin i got error.

Warning: array_merge_recursive(): Argument #1 not an array in /public/includes/registration/ExtensionProcessor.php on line 294

Any ideas?

AhmadF.Cheema (talkcontribs)

According to T102522, this was an issue with the old MediaWiki 1.25.

You can either upgrade, or possibly make the changes mentioned here.

Reply to "Plugin installation problem"

Escape the double quote symbol in page title

Planetoid (talkcontribs)

How to transform the external link contains double quote symbols in page title e.g.

regex - MySQL REGEXP word boundaries [[:<:]] [[:>:]] and double quotes - Stack Overflow


into MediaWiki link format? Thanks for your time!

Reply to "Escape the double quote symbol in page title"