Topic on Project:Support desk

MediaWiki not working after latest upgrade (on Synology)

22
Summary last edited by PeterinKorea 13:18, 16 April 2021 3 years ago

Finally Synology admitted that something went wrong. They disabled "pcre jit" in the /usr/local/etc/php73/cli/conf.d/SYNO.SDS.MediaWiki.ini file. After restoring LocalSettings.php, images and extensions my web pages miraculously appeared.

However after a couple of days things when downhill. The disabled "pcre jit" statement somehow disappeared. Reinserting it did not help. I have given up finding a solution for MediaWiki 1.35 and returned to 1.33. I will be waiting for Synology to come up with a working version.


Sorry and good luck to those who are more tenacious.

PeterinKorea (talkcontribs)

Hardware:

Synology DS213


SW:

DSM 6.2.4-25556

Apache HTTP Server 2.2.34-0020

phpMyAdmin 4.9.6-0187

PHP 7.3.16-0008

MariaDB 10.3.21-0063

Web Station 2.1.9-0157

MediaWiki 1.35.1-0140


Error report:

2021/03/09 12:38:09 (system) trigger MediaWiki 1.33.1-0136 Begin start-stop-status stop

pkg-WebStation-php72 start/running, process 1076

2021/03/09 12:38:09 (system) trigger MediaWiki 1.33.1-0136 End start-stop-status stop ret=[0]

2021/03/09 12:39:49 (system) trigger MediaWiki 1.33.1-0136 Begin start-stop-status start

pkg-WebStation-php72 start/running, process 2983

2021/03/09 12:39:49 (system) trigger MediaWiki 1.33.1-0136 End start-stop-status start ret=[0]

2021/03/09 16:17:24 (system) trigger MediaWiki 1.33.1-0136 Begin start-stop-status stop

pkg-WebStation-php72 start/running, process 7890

2021/03/09 16:17:27 (system) trigger MediaWiki 1.33.1-0136 End start-stop-status stop ret=[0]

2021/03/09 16:19:26 (system) trigger MediaWiki 1.33.1-0136 Begin start-stop-status start

pkg-WebStation-php72 start/running, process 11593

2021/03/09 16:19:27 (system) trigger MediaWiki 1.33.1-0136 End start-stop-status start ret=[0]

2021/03/09 23:18:03 upgrade MediaWiki 1.33.1-0136 Begin start-stop-status stop

pkg-WebStation-php72 start/running, process 26233

2021/03/09 23:18:04 upgrade MediaWiki 1.33.1-0136 End start-stop-status stop ret=[0]

2021/03/09 23:18:07 upgrade MediaWiki 1.33.1-0136 Begin preupgrade

2021/03/09 23:18:09 upgrade MediaWiki 1.33.1-0136 End preupgrade ret=[0]

2021/03/09 23:18:09 upgrade MediaWiki 1.33.1-0136 Begin preuninst

rm: refusing to remove '.' or '..' directory: skipping '/volume1/@appstore/.mediawiki/extensions/.'

2021/03/09 23:23:00 upgrade MediaWiki 1.33.1-0136 End preuninst ret=[0]

2021/03/09 23:23:01 upgrade MediaWiki 1.33.1-0136 Begin /bin/rm -rf /volume1/@appstore/MediaWiki

2021/03/09 23:23:02 upgrade MediaWiki 1.33.1-0136 End /bin/rm -rf /volume1/@appstore/MediaWiki ret=[0]

2021/03/09 23:23:03 upgrade MediaWiki 1.33.1-0136 Begin postuninst

2021/03/09 23:23:23 upgrade MediaWiki 1.33.1-0136 End postuninst ret=[0]

2021/03/09 23:23:24 upgrade MediaWiki 1.35.1-0140 Begin preinst

2021/03/09 23:23:24 upgrade MediaWiki 1.35.1-0140 End preinst ret=[0]

2021/03/09 23:23:24 upgrade MediaWiki 1.35.1-0140 Begin /bin/rm -rf /volume1/@appstore/MediaWiki

2021/03/09 23:23:24 upgrade MediaWiki 1.35.1-0140 End /bin/rm -rf /volume1/@appstore/MediaWiki ret=[0]

2021/03/09 23:23:24 upgrade MediaWiki 1.35.1-0140 Begin /bin/mv -f /volume1/@tmp/pkginstall/package /volume1/@appstore/MediaWiki

2021/03/09 23:23:25 upgrade MediaWiki 1.35.1-0140 End /bin/mv -f /volume1/@tmp/pkginstall/package /volume1/@appstore/MediaWiki ret=[0]

2021/03/09 23:23:25 upgrade MediaWiki 1.35.1-0140 Begin /bin/mkdir -p /var/packages/MediaWiki

2021/03/09 23:23:25 upgrade MediaWiki 1.35.1-0140 End /bin/mkdir -p /var/packages/MediaWiki ret=[0]

2021/03/09 23:23:25 upgrade MediaWiki 1.35.1-0140 Begin /bin/mv -f /volume1/@tmp/pkginstall/INFO /var/packages/MediaWiki/INFO

2021/03/09 23:23:25 upgrade MediaWiki 1.35.1-0140 End /bin/mv -f /volume1/@tmp/pkginstall/INFO /var/packages/MediaWiki/INFO ret=[0]

2021/03/09 23:23:25 upgrade MediaWiki 1.35.1-0140 Begin /bin/rm -rf /var/packages/MediaWiki/scripts

2021/03/09 23:23:25 upgrade MediaWiki 1.35.1-0140 End /bin/rm -rf /var/packages/MediaWiki/scripts ret=[0]

2021/03/09 23:23:25 upgrade MediaWiki 1.35.1-0140 Begin /bin/mv -f /volume1/@tmp/pkginstall/scripts /var/packages/MediaWiki/scripts

2021/03/09 23:23:26 upgrade MediaWiki 1.35.1-0140 End /bin/mv -f /volume1/@tmp/pkginstall/scripts /var/packages/MediaWiki/scripts ret=[0]

2021/03/09 23:23:26 upgrade MediaWiki 1.35.1-0140 Begin /bin/rm -rf /var/packages/MediaWiki/WIZARD_UIFILES

2021/03/09 23:23:26 upgrade MediaWiki 1.35.1-0140 End /bin/rm -rf /var/packages/MediaWiki/WIZARD_UIFILES ret=[0]

2021/03/09 23:23:26 upgrade MediaWiki 1.35.1-0140 Begin /bin/mv -f /volume1/@tmp/pkginstall/WIZARD_UIFILES /var/packages/MediaWiki/WIZARD_UIFILES

2021/03/09 23:23:26 upgrade MediaWiki 1.35.1-0140 End /bin/mv -f /volume1/@tmp/pkginstall/WIZARD_UIFILES /var/packages/MediaWiki/WIZARD_UIFILES ret=[0]

2021/03/09 23:23:26 upgrade MediaWiki 1.35.1-0140 Begin /bin/rm -rf /var/packages/MediaWiki/conf

2021/03/09 23:23:26 upgrade MediaWiki 1.35.1-0140 End /bin/rm -rf /var/packages/MediaWiki/conf ret=[0]

2021/03/09 23:23:26 upgrade MediaWiki 1.35.1-0140 Begin /bin/mv -f /volume1/@tmp/pkginstall/conf /var/packages/MediaWiki/conf

2021/03/09 23:23:26 upgrade MediaWiki 1.35.1-0140 End /bin/mv -f /volume1/@tmp/pkginstall/conf /var/packages/MediaWiki/conf ret=[0]

2021/03/09 23:23:27 upgrade MediaWiki 1.35.1-0140 Begin postinst

pkg-WebStation-php73 start/running, process 31991

PHP Warning: PHP Startup: Unable to load dynamic library 'mcrypt.so' (tried: /usr/local/lib/php73/modules/mcrypt.so (/usr/local/lib/php73/modules/mcrypt.so: cannot open shared object file: No such file or directory), /usr/local/lib/php73/modules/mcrypt.so.so (/usr/local/lib/php73/modules/mcrypt.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library 'mcrypt.so' (tried: /usr/local/lib/php73/modules/mcrypt.so (/usr/local/lib/php73/modules/mcrypt.so: cannot open shared object file: No such file or directory), /usr/local/lib/php73/modules/mcrypt.so.so (/usr/local/lib/php73/modules/mcrypt.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library 'mysql.so' (tried: /usr/local/lib/php73/modules/mysql.so (/usr/local/lib/php73/modules/mysql.so: cannot open shared object file: No such file or directory), /usr/local/lib/php73/modules/mysql.so.so (/usr/local/lib/php73/modules/mysql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

PHP Fatal error: Cannot declare class Maintenance, because the name is already in use in /volume1/web/mediawiki/maintenance/includes/Maintenance.php on line 55

Fatal error: Cannot declare class Maintenance, because the name is already in use in /volume1/web/mediawiki/maintenance/includes/Maintenance.php on line 55

mv: cannot stat '/var/packages/MediaWiki/target/synology_added/htaccess_php.conf': No such file or directory

2021/03/09 23:28:08 upgrade MediaWiki 1.35.1-0140 End postinst ret=[0]

2021/03/09 23:28:08 upgrade MediaWiki 1.35.1-0140 Begin postupgrade

2021/03/09 23:28:08 upgrade MediaWiki 1.35.1-0140 End postupgrade ret=[0]

2021/03/09 23:28:29 upgrade MediaWiki 1.35.1-0140 Begin start-stop-status start

pkg-WebStation-php73 start/running, process 5975

2021/03/09 23:28:30 upgrade MediaWiki 1.35.1-0140 End start-stop-status start ret=[0]

2021/03/09 23:28:50 upgrade MediaWiki 1.35.1-0140 Begin /bin/rm -rf /volume1/@tmp/pkginstall

2021/03/09 23:28:50 upgrade MediaWiki 1.35.1-0140 End /bin/rm -rf /volume1/@tmp/pkginstall ret=[0]


Question:

Synology has recommended to contact MediaWiki with this error report. Does anybody know what the problem might be?

Malyacko (talkcontribs)

Please provide steps (commands) how you update.

PeterinKorea (talkcontribs)

Using Synology Package Centre I selected the MediaWiki version 1.35 update button which was available at that time

MikeDarling (talkcontribs)

FYI.. I got the same thing using the installer from Synology on a fresh install (not an upgrade).


Fatal error: Cannot declare class Maintenance, because the name is already in use in /volume1/web/mediawiki/maintenance/includes/Maintenance.php on line 55

PeterinKorea (talkcontribs)

Have you contacted Synology yet?

Bawolff (talkcontribs)

honestly sounds like something broken on the synology end. Maybe multiple versions installed at once.


Generally speaking we reccomend using the official package over synology's version. We don't know what synology has changed from our version so its difficult for us to provide help.

PeterinKorea (talkcontribs)

I agree with your assessment that it is probably at the Synology end but I have to try this route first. I have only a single version of MediaWiki.

I understand your opinion about using the official package. However the MediaWiki package provided by Synology has been working fine for the last couple of years and as a newbie I prefer this route.

195.206.189.192 (talkcontribs)

Malyacko, did you find a solution to this problem? I have the same issue.

PeterinKorea (talkcontribs)

No I'm still looking for a solution. Have you contacted Synology yet?

Backscheider (talkcontribs)

I have the same error using the synology package. How would you perform an install using the downloaded version?

PeterinKorea (talkcontribs)

Synology MediaWiki is set to work with PHP 7.3.16 while the compatibility list from mediawiki shows 1.35 version is compatible with php7.3.x from 7.3.19 and higher, and any version of PHP 7.4 from 7.4.3 and higher.. I have reported this to Synology but they claim that MediaWiki works fine with PHP 7.3.16 and the later updates are for CVE issues

PeterinKorea (talkcontribs)

Does anyone know what the issues were for MediaWiki with PHP 7.3.16?

2601:500:C301:1DF0:D9B6:9606:27C8:A4BC (talkcontribs)

I found a solution; open /volume1/web/mediawiki/maintenance/Maintenance.php, and change "abstract class Maintenance" to "abstract class OtherMaintenance". The problem is that the class Maintenance is declared in both

/volume1/web/mediawiki/maintenance/Maintenance.php and

/volume1/web/mediawiki/maintenance/includes/Maintenance.php

This is probably not the optimal solution, but it worked for me.

PeterinKorea (talkcontribs)

Thanks for the suggestion but I still get a blank page at mw-config/index.php.

I somehow cannot get php error messages on screen, I tried enabling errors in the php7.43 settings.. I did try

$ cd mw-config

$ php73 update.php


and the Maintenance error is gone, so something did improve. (There I get a follow-up message that LocalSettings.php is not present which is as I expected).

I still get the mcrypt.so and mysqli.so not found warning. Did you solve this problem?

Hansakelund (talkcontribs)

This solution works for me to.

After upgrade to MediaWiki 1.35.1-0140 on Synology DSM 6.2.3-25426 Update 3, my backup script gave the error "PHP Fatal error: Cannot declare class Maintenance, because the name is already in use in /volume1/web/mediawiki/maintenance/includes/Maintenance.php on line 55".

My maintenance script had to be changed to use php73 instead of php72.

I also had an unrelated problem in LocalSettings.php when trying to open my wiki after upgrade: "Parse error: syntax error, unexpected '<first letters of my DB password>' (T_STRING) in /volume1/web/mediawiki/LocalSettings.php on line 62". It looks like that all text on this line was inserted in the middle of the DB password. After removing the inserted text, it worked again.

PeterinKorea (talkcontribs)

Thanks for your suggestions.

However as mentioned in my answer to 2601:500:C301:1DF0:D9B6:9606:27C8:A4BC I am still stuck, but tried installing using the mw-config/index.php page.

Your answer (involving php73) seems to imply you use a script to setup LocalSettings.php, What script are you referring to?

Hansakelund (talkcontribs)

I am using a script to regularly copy my internal wiki from one Synology NAS to another Synology NAS, this script uses in turn some scripts in the maintenance/ directory. This script does not touch LocalSettings.php.

The problem I had with LocalSettings.php showed as an error message in the web browser when trying to access the wiki and has (most probably) nothing to do with that the class Maintenance is declared twice.

This post was hidden by PeterinKorea (history)
PeterinKorea (talkcontribs)

I have downloaded MediaWiki from the MediaWiki site and compared the files with the ones from Synology and noticed there are differences:

diff -rq mediawiki-1.35.1 /volume1/web/mediawiki

Only in /volume1/web/mediawiki: disabled.html

Files mediawiki-1.35.1/includes/DefaultSettings.php and /volume1/web/mediawiki/includes/DefaultSettings.php differ

Files mediawiki-1.35.1/includes/installer/Installer.php and /volume1/web/mediawiki/includes/installer/Installer.php differ

Files mediawiki-1.35.1/includes/installer/MysqlInstaller.php and /volume1/web/mediawiki/includes/installer/MysqlInstaller.php differ

Files mediawiki-1.35.1/includes/PHPVersionCheck.php and /volume1/web/mediawiki/includes/PHPVersionCheck.php differ

Files mediawiki-1.35.1/includes/templates/NoLocalSettings.mustache and /volume1/web/mediawiki/includes/templates/NoLocalSettings.mustache differ

Only in /volume1/web/mediawiki/maintenance: Maintenance - Copy.php

Files mediawiki-1.35.1/maintenance/Maintenance.php and /volume1/web/mediawiki/maintenance/Maintenance.php differ

Take for example the maintenance.php from MediaWiki is only 2 kB versus 47.6 kB from Synology and the one from MediaWiki does not contain the "abstract class Maintenance",

RalliHH (talkcontribs)

Hi, not sure if my findings are of any help, but please see my SOLVED trouble, which very much sounds like this one here. You can find my findings in this threat: Problems to access the MariaDB on a Synology Diskstation after update...

Hope you get it working again! Good luck!

PeterinKorea (talkcontribs)

Finally Synology admitted that something went wrong. They disabled "pcre jit" in the /usr/local/etc/php73/cli/conf.d/SYNO.SDS.MediaWiki.ini file. After restoring LocalSettings.php, images and extensions my web pages miraculously appeared.

Thank you for all your support