
Tarball을 통해 Linux용 Windows(10) 하위 시스템의 Ubuntu 18.04.4 LTS에 Mediawiki 1.34를 설치하려고 합니다. 분명히 모든 모듈이 제대로 작동하고 있습니다: phpmyadmin, sql 데이터베이스, apache2.http://localhost/mediawiki/Mw-config성공적으로 실행되어 유효한 Localsettings.php를 생성했습니다.
미디어위키 디렉토리를 /var/www/html/에 넣거나 /var/www/html/에 대한 심볼릭 링크를 사용하여 /var/lib/에 넣으려고 했지만http://localhost/미디어위키계속 나에게 말합니다: LocalSettings.php를 찾을 수 없습니다.
나는 성공하지 못한 채 상상할 수 있는 모든 디렉토리에 LocalSettings.php를 넣었습니다. 또한 작곡가를 실행했습니다. 여러 사이트에 다른 제안이 많이 있지만 아무 것도 작동하지 않습니다. 나에게 그것은 분명하다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에서 검색할 수 있는 값은 다음과 같습니다.
에코( $_SERVER['SCRIPT_NAME'] ); /Mediawiki/index.php echo ( dirname( $_SERVER['SCRIPT_NAME'] ) ); /미디어위키 에코(디렉터리); /var/lib/Mediawiki 에코(파일); /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를 전달했습니다.