Red Hat Bugzilla – Bug 967302
Missing symlink in /var/www/wiki after initial install
Last modified: 2013-08-05 20:11:55 EDT
Description of problem:
After yum install mediawiki and enabling the *global* aliases in /etc/httpd/conf.d/mediawiki.conf (Not using mw-crateinstance): When visiting http://localhost/wiki, The initial page shows a link to complete the web-based installation. However: Following this link just returns an empty page. The httpd error log shows the following:
[Sun May 26 14:11:10.716036 2013] [:error] [pid 2788] [client 192.168.2.25:36856] PHP Warning: require(/var/www/wiki/languages/Language.php): failed to open stream: No such file or directory in /usr/share/mediawiki/includes/AutoLoader.php on line 1008
After manually creating a symlink /usr/share/mediawiki/languages => /var/www/wiki/languages, the web-based installer starts working.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. yum install mediawiki
2. Enable global aliases in /etc/httpd/conf.d/mediawiki.conf
3. Visit /wiki and follow the "complete the installation" link
Empty page, PHP error shown above.
Initial (language selection) page of mw-install
I'm not sure why you created a bug report since you are not using the install script.
The package does not automatically create files in /var/www/wiki if you do not use the scripts. If you had any there then it is your responsibility.
1. It definitely *does* create /var/www/wiki with some contents.
2. Quote from the installed /etc/httpd/conf.d/mediawiki.conf:
# This is a sample configuration for a wiki instance located under
# /var/www/wiki and exposed as http://thishost/wiki. Please read
# /usr/share/doc/mediawiki-*/README.RPM on whether to use this
# instance or create copies of it.
So this suggests that the install-script is optional! (Only required if one wants to create multiple instances instead of using the predefined one located at /var/www/wiki
I suggest you fix this comment or create a README.Fedora wher ist clearly states that the predefinded thingy mentioned above is *not* suppoerted.
After some thorough testing on a FRESHLY F18 VM:
(In reply to Michael Cronenworth from comment #1)
> I'm not sure why you created a bug report since you are not using the
> install script.
> The package does not automatically create files in /var/www/wiki if you do
> not use the scripts. If you had any there then it is your responsibility.
This is simply not true! See the following proof:
# rpm -V mediawiki
(no output, so nothing modified)
# rpm -qf /var/www/wiki
# rpm -qf /etc/mediawiki/instances
# cat /etc/mediawiki/instances
# rpm -q --scripts mediawiki
postinstall scriptlet (using /bin/sh):
/usr/sbin/mw-updateallinstances >> /var/log/mediawiki-updates.log 2>&1 || :
# sh -x /usr/sbin/mw-updateallinstances
+ read path
+ cat /etc/mediawiki/instances
+ grep '^ *#'
+ echo /var/www/wiki
+ mw-createinstance /var/www/wiki
+ test -e /var/www/wiki/LocalSettings.php
+ read path
The actual bug is in mw-createinstance in the for-loop starting at line 26,
which misses several names for which symlinks should be created.
Another comment on your closing comment:
Since the actual bug is in mw-createinstance it would have given the exact same result if i had used that script in the first place. No matter how the package is installed - it does not work at all without tweaking the file hierarchy manually.
Created attachment 755027 [details]
Patch for fixing mw-createinstance.in
This patch fixes mw-createinstance.in (refereced as Source4 in mediawiki.spec)
It adds symlinks for the following 4 subdirs from /usr/share/mediawiki to the current instance:
extensions languages resources skins
mediawiki-1.19.7-4.fc18 has been submitted as an update for Fedora 18.
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mediawiki-1.19.7-4.fc18'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
mediawiki-1.19.7-4.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.