Topic on Project:Support desk/Flow

137.120.78.143 (talkcontribs)

Hello,

I've recently decided to update the system which had a MediaWiki running on it, and after the update I cannot figure out what could recover the wiki in a working state.

I have MediaWiki version 1.16.0.0 running on Ubuntu 16.04 with PHP7.0.

Opening a wiki web page leads to a blank page. After enabling the error messages' display I see there:

'''Fatal error''':  Uncaught TypeError: Argument 1 passed to wfReportException() must be an instance of Exception, instance of Error given, called in /raid/var/www/wiki/includes/Exception.php on line 348 and defined in /raid/var/www/wiki/includes/Exception.php:285 Stack trace: #0 /raid/var/www/wiki/includes/Exception.php(348): wfReportException(Object(Error)) #1 [internal function]: wfExceptionHandler(Object(Error)) #2 {main}  thrown in '''/raid/var/www/wiki/includes/Exception.php''' on line '''285'''

Additionally, I tried to run the

update.php

and

rebuildall.php

scripts, which both ended up in this error:

DB connection error: MySQL functions missing, have you compiled PHP with the --with-mysql option?

However, I did verify that MySQL extension is installed and enabled in PHP7.0 (a few other modules connect to MySQL through PHP just fine).

My supposition is that the MediaWiki version might be way too old for the PHP7.0.

I cannot figure out where the error in

Exception.cpp

leads to and would appreciate any help or advice.

87.123.40.181 (talkcontribs)

Your new Ubuntu server has a current version of PHP 7. MediaWiki 1.16 however is rather old and may not be compatible with this new PHP version.

If I should guess, I would still say that for whatever reason MySQL actually really is not available. You can check that by putting a PHP file in the root of your MediaWiki installation with

<?php phpinfo();

in that file. When you view that file with your browser, does it ontain a section about MySQL and does it say MySQL would be enabled?

However, I would now make a backup of the MediaWiki installation, of the files and of the database. See Manual:Backing up a wiki!

Once I got a working backup, I would try updating MediaWiki to a current version, which is MediaWiki 1.27.1 at the moment. See upgrading for how to do this!

137.120.78.143 (talkcontribs)

Thank you for the input!

The info shows that: mysqli, mysqlnd, and PDO drivers for mysql are all enabled.

I have also checked the manual connection to the relevant database - all seems functional.

Regarding the update suggestion - I would like to give it a try, but as I wrote in the original post, the update script gives me a MySQL error. That is why I am not sure of how to come around it.

87.123.40.181 (talkcontribs)

MediaWiki 1.16 - and also the update.php script in MediaWiki 1.16) in fact is not compatible with PHP 7, not even with PHP 5.4, if you look at compatibility.

Maybe the problem already goes away when you upgrade to a newer MediaWiki version...

110.149.147.147 (talkcontribs)

Current versions of MW are indeed compatible with PHP 7.

MediaWiki 1.16 is 6(!) years old now, practically pre-historic times as far as software is concerned. I would be very much surprised if had worked. You'll want PHP 5.2 to run an ancient version like that.

137.120.78.143 (talkcontribs)

Thanks a lot for commenting on that!

I successfully installed the latest MediaWiki 1.27.1 in place of the old wiki and linked to the formerly used database without much problems.