2

again, I have a strange fail in the Mediawiki. If a link is formated like this:

www.path-to-my-wiki.net/wiki_path/index.php?title=blah

The Server will prompt out the source code (no joke) of the php file!

(Sample:)

<?php

/**
 * This is the main web entry point for MediaWiki.
 *
 ...
 *
 * @file
 */


# Initialise common code
$preIP = dirname( __FILE__ );
require_once( "$preIP/includes/WebStart.php" );

# Initialize MediaWiki base class
require_once( "$preIP/includes/Wiki.php" );
$mediaWiki = new MediaWiki();

wfProfileIn( 'main-misc-setup' );
OutputPage::setEncodings(); # Not really used yet

$maxLag = $wgRequest->getVal( 'maxlag' );
if( !is_null( $maxLag ) && !$mediaWiki->checkMaxLag( $maxLag ) ) {
    exit;
}

If the link will be like this:

www.path-to-my-wiki.net/wiki/blah

The Server will not prompt out the PHP source code, but the desired page.

I have not changed anyting regarding the webserver and Mediawiki configuration, and this wiki is not reachable from the internet. But I doubt that I am not the only one, who is working with this Mediawiki.

4

1 回答 1

1

听起来您的 Apache 配置没有为.php扩展分配处理程序,但为重写分配了处理程序。您很可能需要提供您的 .htaccess 以获得更多答案。

于 2012-09-24T14:40:50.223 回答