Topic on Project:Support desk

Can't enable skin Vector.php

7
Mafi9 (talkcontribs)

Hello,

I've just installed MW 1.24.2 and tried to display the main page. Unfortunately there is an error saying: \mediawiki\skins\Vector/SkinVector.php): failed to open stream: No such file or directory in ...\mediawiki\includes\AutoLoader.php on line 1282

I checked in the LocalSettings.php if there is a problem with the path, but the default skin is set for "vector" and require_once "$IP/skins/Vector/Vector.php"; seems to be alright as well. The path of SkinVector.php seems to be correct and I couldn't find any typos or similar in the directory. I tried to download the skin separately and paste it into the skins directory, but then it says its only compatible with MW1.25+. I realized the error shows up with every skin I try to enable.

Any hints what might be the problem? I'm actually still thinking of a path problem, but I just don't know where to look after it.

MediaWiki: 1.24.2 PHP: 5.6.3 Database: MySQL 5.6.17

88.130.109.195 (talkcontribs)

When you install MediaWiki, have you then taken a checkout from the Git versioning system? Doing so would be a way I could imagine you get this error.

In contrast, for normal end users, the recommended installation method is to use a tarball from here: http://releases.wikimedia.org/mediawiki/1.25/mediawiki-1.25.1.tar.gz. 1.25 btw. is the newest version - but a 1.24.2 tarball is available as well, if you want that. These tarballs contain everything you need, also the Vector skin in the correct version. :-)

Mafi9 (talkcontribs)

Hello and thank you for the reply! The reason why I don't use the 1.25 version is that I simply couldn't get the installation running - instead of getting the index.php to start from I always got a blank page, even tough I meet the requirements.

In the meantime I could fix the problem with the vector skin. In Vector.php on line 36 I replaced "$GLOBALS['wgAutoloadClasses']['SkinVector'] = __DIR__ . '/SkinVector.php';" with "$GLOBALS['wgAutoloadClasses']['SkinVector'] = 'skins/Vector/SkinVector.php';" and it seems to work fine now. :)

AKlapper (WMF) (talkcontribs)
Mafi9 (talkcontribs)

Yes I have checked the errors and symptoms of a blank page, but none of them seems to work for me. Because I have a blank page before the install I don't have a LocalSettings to modify, nor I have access to the php.ini since I'm on a hosted server. Regarding the DOM-XML problem I have checked with the phpInfo, but DOM-XML support is enabled as well as the other requirements.

88.130.74.147 (talkcontribs)

Your change in Vector.php looks strange: __DIR__ is defined since PHP 5.3 at least. If you have PHP 5.6, this change should not be needed and if you have an old PHP version, you should get a different error ("Use of undefined constant __DIR__...").

For the blank page, you should check the error log or have your host tell you, what after such error is inside.

Mafi9 (talkcontribs)

It looks strange indeed. Now it turned out that it's in general a problem regarding the __DIR__, cause there is an error popping up if I want to go the special pages of the Interwiki extension as well:

Warning: require(\\...\DFS\Websites\t\test-wiki\mediawiki/\\...\DFS\Websites\t\test-wiki\mediawiki\extensions\Interwiki/Interwiki_body.php): failed to open stream: No such file or directory in \\...\DFS\Websites\t\test-wiki\mediawiki\includes\AutoLoader.php on line 1282

The lines of code which could be responsible for that:
$dir = dirname( __FILE__ ) . '/';
$wgAutoloadClasses['SpecialInterwiki'] = $dir . 'Interwiki_body.php';

Somehow it shows the path twice, rather than just \\....\DFS\Websites\t\test-wiki\mediawiki\extensions\Interwiki/Interwiki_body.php. There might be a path problem with dirname( __FILE__ ) or __DIR__, anyone has a clue what could cause that?

Reply to "Can't enable skin Vector.php"