
私は、Windows (10) Subsystem for Linux 上の Ubuntu 18.04.4 LTS に tarball 経由で Mediawiki 1.34 をインストールしようとしています。どうやら、phpmyadmin、sql database、apache2 など、すべてのモジュールが正常に動作しているようです。http://localhost/mediawiki/Mw-config正常に実行され、有効なLocalsettings.phpが生成されました
私はmediawikiディレクトリを/var/www/html/に置き、代わりに/var/lib/に/var/www/html/へのシンボリックリンクを置こうとしたが、http://localhost/メディアウィキ次のようなメッセージが表示され続けます: LocalSettings.php が見つかりません。
LocalSettings.phpを想像できるすべてのディレクトリに配置しましたが、うまくいきませんでした。また、composerも実行しました。いくつかのサイトで他の提案がたくさんありますが、何も機能しません。私にとっては明らかです。http://localhost/mediawiki/index.php開かれます:
define( 'MW_ENTRY_POINT', 'index' );
/*define( 'MW_ENTRY_POINT', '/var/www/html/mediawiki/' );*/
// Bail on old versions of PHP, or if composer has not been run yet to install
// dependencies. Using dirname( __FILE__ ) here because __DIR__ is PHP5.3+.
// phpcs:ignore MediaWiki.Usage.DirUsage.FunctionFound
require_once dirname( __FILE__ ) . '/includes/PHPVersionCheck.php';
wfEntryPointCheck( 'html', dirname( $_SERVER['SCRIPT_NAME'] ) );
require __DIR__ . '/includes/WebStart.php';
$mediaWiki = new MediaWiki();
$mediaWiki->run();
________________________________________
index.phpから取得できた値は次のとおりです。
echo ( $_SERVER['SCRIPT_NAME'] ); /Mediawiki/index.php echo ( dirname( $_SERVER['SCRIPT_NAME'] ) ); /Mediawiki echo (ディレクター); /var/lib/Mediawiki echo (ファイル); /var/lib/Mediawiki/index.php echo (dirname(ファイル) . '/includes/PHPVersionCheck.php'); /var/lib/Mediawiki/includes/PHPVersionCheck.php ________________________________________ 次に WebStart.php に移動します ________________________________________
// If no LocalSettings file exists, try to disnano WebStart.phpnano WebStart.phpplay an error page
// (use a callback because it depends on TemplateParser)
if ( !defined( 'MW_CONFIG_CALLBACK' ) ) {
if ( !defined( 'MW_CONFIG_FILE' ) ) {
define( 'MW_CONFIG_FILE', "$IP/LocalSettings.php" );
}
if ( !is_readable( MW_CONFIG_FILE ) ) {
function wfWebStartNoLocalSettings() {
# LocalSettings.php is the per-site customization file. If it does not exist
# the wiki installer needs to be launched or the generated file uploaded to
# the root wiki directory. Give a hint, if it is not readable by the server.
global $IP;
require_once "$IP/includes/NoLocalSettings.php";
die();
}
define( 'MW_CONFIG_CALLBACK', 'wfWebStartNoLocalSettings' );
}
何か案が?
答え1
問題は解決しました。大文字/小文字の問題でした。WebStart.php は LocalSettings.php を検索しますが、インストール スクリプトは Localsettings.php を配信しました。