Mediawiki 1.26.2 - 样式表无法正常工作/加载

时间:2016-02-11 12:24:42

标签: php css mediawiki

我已经下载并安装了Mediawiki最新版本1.26.2。在此版本中,样式表无法正常工作/加载。在同一服务器上安装的Mediawiki的旧版本(1.23.5)中,其工作正常。我已多次检查LocalSettings.php文件,一切似乎都没问题。

任何人都面临同样的问题?

编辑 - 添加更多详细信息以使我的问题更加清晰

Mediawiki 1.26.2站点部署为IIS(Windows 2012服务器)下的网站中的目录。在同一网站中,Mediawiki 1.23.5部署在不同的目录下。 Mediawiki 1.23.5样式表有效。然而,对于1.26.2,它没有。

以下是部署配置的快照。

enter image description here

我还尝试在新网站下部署Mediawiki 1.26.2" MediawikiNew'只是为了确保网站内的目录没有造成任何问题。但仍然没有效果。

enter image description here

我尝试使用http和https协议,但它没有任何区别。

我在这里提到我的Mediawiki 1.26.2的LocalSettings.php文件(当部署在网站内的目录下)

<?php
# This file was automatically generated by the MediaWiki 1.26.2
# installer. If you make manual changes, please keep track in case you
# need to recreate them later.
#
# See includes/DefaultSettings.php for all configurable settings
# and their default values, but don't forget to make changes in _this_
# file, not there.
#
# Further documentation for configuration settings may be found at:
# https://www.mediawiki.org/wiki/Manual:Configuration_settings

# Protect against web entry
if ( !defined( 'MEDIAWIKI' ) ) {
    exit;
}

## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;

$wgSitename = "Mediawiki1.26.2";

## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
## For more information on customizing the URLs
## (like /w/index.php/Page_title to /wiki/Page_title) please see:
## https://www.mediawiki.org/wiki/Manual:Short_URL
$wgScriptPath = "/mediawiki-1.26.2";
$wgScriptExtension = ".php";

## The protocol and server name to use in fully-qualified URLs
$wgServer = "http://localhost/";

## The URL path to static resources (images, scripts, etc.)
$wgResourceBasePath = $wgScriptPath;

## The URL path to the logo.  Make sure you change this from the default,
## or else you'll overwrite your logo when you upgrade!
$wgLogo = "$wgResourceBasePath/resources/assets/wiki.png";

## UPO means: this is also a user preference option

$wgEnableEmail = true;
$wgEnableUserEmail = true; # UPO

$wgEmergencyContact = "apache@bp1amsapt221.cloudapp.net";
$wgPasswordSender = "apache@bp1amsapt221.cloudapp.net";

$wgEnotifUserTalk = false; # UPO
$wgEnotifWatchlist = false; # UPO
$wgEmailAuthentication = true;

## Database settings
$wgDBtype = "mysql";
$wgDBserver = "<secret>";
$wgDBname = "<secret>";
$wgDBuser = "<secret>";
$wgDBpassword = "<secret>";

# MySQL specific settings
$wgDBprefix = "";

# MySQL table options to use during installation or update
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";

# Experimental charset support for MySQL 5.0.
$wgDBmysql5 = false;

## Shared memory settings
$wgMainCacheType = CACHE_NONE;
$wgMemCachedServers = array();

## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = true;
#$wgUseImageMagick = true;
#$wgImageMagickConvertCommand = "/usr/bin/convert";

# InstantCommons allows wiki to use images from https://commons.wikimedia.org
$wgUseInstantCommons = false;

## If you use ImageMagick (or any other shell command) on a
## Linux server, this will need to be set to the name of an
## available UTF-8 locale
$wgShellLocale = "en_US.utf8";

## If you want to use image uploads under safe mode,
## create the directories images/archive, images/thumb and
## images/temp, and make them all writable. Then uncomment
## this, if it's not already uncommented:
#$wgHashedUploadDirectory = false;

## Set $wgCacheDirectory to a writable directory on the web server
## to make your wiki go slightly faster. The directory should not
## be publically accessible from the web.
#$wgCacheDirectory = "$IP/cache";

# Site language code, should be one of the list in ./languages/Names.php
$wgLanguageCode = "en";

$wgSecretKey = "3e7c50e485e082453ec47a29c70ffd76925bbe00d0185058a870ef474bb71f55";

# Site upgrade key. Must be set to a string (default provided) to turn on the
# web installer while LocalSettings.php is in place
$wgUpgradeKey = "dbdeb53536b08e21";

## For attaching licensing metadata to pages, and displaying an
## appropriate copyright notice / icon. GNU Free Documentation
## License and Creative Commons licenses are supported so far.
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "";
$wgRightsText = "";
$wgRightsIcon = "";

# Path to the GNU diff3 utility. Used for conflict resolution.
$wgDiff3 = "";

## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'vector', 'monobook':
$wgDefaultSkin = "vector";

# Enabled skins.
# The following skins were automatically enabled:
wfLoadSkin( 'CologneBlue' );
wfLoadSkin( 'Modern' );
wfLoadSkin( 'MonoBook' );
wfLoadSkin( 'Vector' );


# Enabled Extensions. Most extensions are enabled by including the base extension file here
# but check specific extension documentation for more details
# The following extensions were automatically enabled:
wfLoadExtension( 'Cite' );
wfLoadExtension( 'Gadgets' );
wfLoadExtension( 'ImageMap' );
wfLoadExtension( 'InputBox' );
wfLoadExtension( 'Nuke' );
wfLoadExtension( 'ParserFunctions' );
wfLoadExtension( 'PdfHandler' );
wfLoadExtension( 'Renameuser' );
wfLoadExtension( 'SyntaxHighlight_GeSHi' );
wfLoadExtension( 'WikiEditor' );


# End of automatically generated settings.
# Add more configuration options below.

2 个答案:

答案 0 :(得分:1)

我已经解决了这个问题。问题是PHP.exe没有对临时文件夹的写访问权限,它在应用程序执行期间创建临时文件。对于旧版本的MediaWiki(例如 - MediaWiki-1.23.5),这很好。但是,由于此问题,最新版本(例如 - Mediawiki-1.26.2)不会加载样式。

我能够通过获得MediaWiki支持来解决这个问题。

在此处发布决议,以便可以帮助他人。

答案 1 :(得分:0)

此版本试图将文件写入临时文件夹,但它没有权限,因此无效。

解决方案: 授予C:\ Windows \ Temp

的完全权限