Topic on Project:Support desk/Flow

Moving from another server and Upgrading from 1.26.3 to actual version

17
88.39.46.106 (talkcontribs)

Hi all, we have a big installation on 1.26.3 version, and we need to upgrade the host from the previous to an actual centos 7.x.

Any updgrade advice? I'm supposing to install centos+http+php 5+mysql, backup old installation, and restore in the new server. What do you think?


193.172.1.240 (talkcontribs)

i doesn't work if you have a http it has to be a https good luck

Ciencia Al Poder (talkcontribs)

Are you planning to upgrade on the same host, or a different one? If it's on the same host, you'll have to backup old installation before installing the new system!

Technofab (talkcontribs)

To a different host. We actually are moving in another linux box.


Previous system;

MediaWiki 1.26.3
PHP 5.3.17 (apache2handler)
MySQL 5.5.33
ICU 4.0


In the new box I install:

php-5.4.16

mysql (mariadb) 5.5.64

ICU 5.0


I backup the db and the "wiki" apache folder; move them to the new box.

Restored the DB, restored the folder, change in LocalSettings.php the settings for the new db in the new box.


Calling the url I obtain

Strict Standards: Declaration of GadgetResourceLoaderModule::getDependencies() should be compatible with ResourceLoaderModule::getDependencies(ResourceLoaderContext $context = NULL) in /var/www/html/wiki/extensions/Gadgets/Gadgets_body.php on line 420


Any help will be appreciated.

AhmadF.Cheema (talkcontribs)

Along with MediaWiki core, you'll have to update your extensions too.

Technofab (talkcontribs)

Like a wrote, I havn't upgrade the core, but only backup and restore to another machine.

But I have 2 issue:


In the top I obtain the message:

Strict Standards: Declaration of GadgetResourceLoaderModule::getDependencies() should be compatible with ResourceLoaderModule::getDependencies(ResourceLoaderContext $context = NULL) in /var/www/html/wiki/extensions/Gadgets/Gadgets_body.php on line 420


Second issue:

Modifying a content, the rich text editor is not running.


any ideas?


AhmadF.Cheema (talkcontribs)

Right, apologies.

But, after the Strict Standards error line, is there anything further?


Technofab (talkcontribs)

No, the page right loaded.

Also in error.log about apache is the only error was writtern


Apparently all works, except this 2 things: this message and the editor.


The 2 systems about core package are similar:

Previous system;

MediaWiki 1.26.3
PHP 5.3.17 (apache2handler)
MySQL 5.5.33
ICU 4.0

New system

MediaWiki 1.26.3
PHP 5.4.16 (apache2handler)
MariaDB 5.5.64-MariaDB
ICU 50.1.2

And all rest information in the ?title=Special:Version page are the same.

AhmadF.Cheema (talkcontribs)

Regarding the editor, is it an extension? Which one?

Errors for editor not loading problems usually get displayed in the Console tab of browser developer tools (F12).

Technofab (talkcontribs)

I suppose, via Localsettings. is the WYSIWYG editor; that is the same except for path and mysql settings to the db.

My settings are this:


require_once "$IP/extensions/WYSIWYG/WYSIWYG.php";

wfLoadExtension( 'WYSIWYG' );

wfLoadExtension( 'WikiEditor' );

$wgCKEditorWikiEditorActive = true;


But there are no errors clicking edit a post, it simple doesn't appear, like you can see in this images

https://ibb.co/86hrQdJ (the new server)

https://ibb.co/j50zpyj (the old server)

Ciencia Al Poder (talkcontribs)

You should never enable "strict standards" errors on production. Those are not errors. And also the display of errors on the webpage itself should be turned off. The output of those errors in random places of the HTML is what's likely causing issues.

On the other hand, if you're moving to a new host, we'd expect you to upgrade to a supported MediaWiki version. 1.26.3 is very old and not supported anymore. It most probably contains security vulnerabilities, same as with the PHP version you have on the new server.

Technofab (talkcontribs)

Cienca, I'vnt enabled nothing in the new machin, also strict standard or other.

You are right about upgrading, but before upgrading is good to keep working the "simple" backup - restore to another machine with similar configuration or otherwise correcting problems and errors on the new version becomes impossible.


Ciencia Al Poder (talkcontribs)

If you haven't enabled those errors, you should disable them.

Technofab (talkcontribs)

But disabling them, not solve the question about the editors. Any idea?

Ciencia Al Poder (talkcontribs)

Sorry. As we stated, MediaWiki 1.26 is old and not supported. Maybe it no longer works because the technology of that epoch doesn't work with current browsers.

Hawaiian717 (talkcontribs)

CentOS/RHEL 7 is tricky because it uses older base versions of PHP. It's incorrect to say it's "unsupported" because Red Hat continues to support it and will port any security fixes from newer versions to their supported version for the life of RHEL 7.

To run a supported version of MediaWiki on CentOS 7, you have to use SoftwareCollections to install php7. If you do this (at least in my experience) you also have to install Apache httpd from there rather than using the standard repository. It's doable. MediaWiki isn't unique in that its development has pushed ahead of what's available in stable enterprise-focused distributions like RHEL.

CentOS 8's standard repository has new enough PHP to run the latest MediaWiki.

Valerio Bozzolan (talkcontribs)

To fix this specific error you can try to change:

extensions-external/UniversalLanguageSelector/includes/ResourceLoaderULSJsonMessageModule.php

Changing from:

       /**
         * Part of the ResourceLoader module interface.
         * Declares the core ext.uls.i18n module as a dependency.
         * @return string[] Module names.
         */
        function getDependencies() {
                return array( 'ext.uls.i18n' );
        }

To:

       /**
         * Part of the ResourceLoader module interface.
         * Declares the core ext.uls.i18n module as a dependency.
         * @return string[] Module names.
         */
        function getDependencies( ResourceLoaderContext $context = NULL ) {
                return array( 'ext.uls.i18n' );
        }
Reply to "Moving from another server and Upgrading from 1.26.3 to actual version"