MediaWiki 1.32.2 does not recognize LocalSettings.php

It appears that after installing MediaWiki 1.32.2 from the repositories, I cannot finish the configuration.

While the normal configuration steps work as expected, once I get the LocalSettings.php file and I copied it to the proper place, it is not recognized.

So far, I double-checked permissions and checked the content of PHP files leading to the message, but could not find anything which was wrong.

As a MediaWiki veteran, I am surprised about this particular installation problem and there is nothing I could find on the topic.

I also contacted Wikimedia Foundation support, but they pointed out that since it was installed from an RPM source, they would not know if some changes had been done to the packages/files.

The first thing that comes to mind is selinux.
So, just to test if the issue is related to that, try to temporarily disable it:
sudo setenforce 0

More informations in this article: Troubleshooting SELinux - Fedora Magazine

1 Like

Hi @alciregi,

I realize that I forgot to mention it, but I actually did my homework and put SELinux on permissive mode. I actually use a script for the initial setup of my server(s) to do so. Also, other services (e.g. NextCloud) work and MediaWiki itself does show me a valid page (instead of a 403 or similar) as well. It just disregards LocalSettings.php.

However, as stated in my initial response: I am a veteran when it comes to setting up MediaWiki and indeed set it up already several times. I do understand and appreciate that everyone can forget to tweak a setting of course. Though if it would be so trivial as to putting SELinux to permissive mode I would not have asked here. :wink:

Thank you nevertheless for the response.

1 Like

I didn’t want to doubt of your expertise.
Mine was a hope that the issue could be trivial :relaxed:

Check the file and parent directory permissions:

sudo -u limited_user -g limited_group stat /path/to/file

Check the web server configuration and access permissions.

Hi @vgaetera,

I also did check permissions. It is in line with the rest of the directory. Ownership is root:root with permissions to 644. I also tested apache:apache with 640.

I have a small script which can also trace back the permissions from the root directory (“/”) to the file or directory I point to and all looks fine for the user “apache”, who can read the file.

1 Like

The Wikimedia Foundation support gave me some debugging options and it appears that LocalSettings.php is no longer expected to be placed in the instance, but in the main installation directory /usr/share/mediawiki.

This, obviously, must be a mistake when packaging MediaWiki into Fedora. After I got it to work preliminarily, it appears that user preferences are just a white website. So, there is more broken than just the location of the LocalSettings.php location.

If any Fedora package maintainer reads this, please have a look into any changes you apply to the MediaWiki package when committing this package to Fedora.

I worked around the issue at this point by copying LocalSettings.php into /usr/share/mediawiki, which possibly takes away the ability to use instances, making mw-createinstance a moot script.

PS: 1.32.4 has the same issue.

3 Likes

@phoenix

I doubt if any fedora package maintainer read this, the best place is to open a bug against this packed in :fedora: Bugzilla site:

https://bugzilla.redhat.com

you can do it with you FAS account provide all the information recompiled and also point out this TOPIC as a reference to the bug…

something like:

“Wrong location of Local Settings.php in MediaWiki”

Regards.,

2 Likes

Hi @hhlp,

Yeah, it was a long shot. I am, however, already in the process getting to the Bugzilla site, pending the confirmation mail from RedHat to use the FAS login. Once I received that mail, I will write away that bug report.

3 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.