브라우저의 localhost/mediawiki-1.30.0/은 run()을 반환합니다. Firefox의 경우, Chromium의 경우 파일 콘텐츠

브라우저의 localhost/mediawiki-1.30.0/은 run()을 반환합니다. Firefox의 경우, Chromium의 경우 파일 콘텐츠

Ubuntu 17.10에서 18.04로 업데이트한 후 내 Wiki가 작동을 멈췄습니다.

내 시스템은 다음과 같습니다

~$ ls /var/www/html/mediawiki-1.30.0/
api.php                     img_auth.php             phpcs.xml
autoload.php                includes                 profileinfo.php
cache                       index.php                README
CODE_OF_CONDUCT.md          INSTALL                  RELEASE-NOTES-1.30
composer.json               jsduck.json              resources
composer.local.json-sample  languages                serialized
COPYING                     load.php                 skins
CREDITS                     LocalSettings.php        StartProfiler.sample
docs                        LocalSettings.php~       tests
extensions                  maintenance              thumb_handler.php
FAQ                         mediawiki-1.30.0         thumb.php
Gruntfile.js                mediawiki-1.30.0.tar.gz  UPGRADE
HISTORY                     mw-config                vendor
images                      opensearch_desc.php

http://localhost/mediawiki-1.30.0/Firefox에서 이를 표시하도록 지시하고 run();Chromium에서는 다음을 표시합니다.

<?php
/**
 * This is the main web entry point for MediaWiki.
 *
 * If you are reading this in your web browser, your server is probably
 * not configured correctly to run PHP applications!
 *
 * See the README, INSTALL, and UPGRADE files for basic setup instructions
 * and pointers to the online documentation.
 *
 * https://www.mediawiki.org/wiki/Special:MyLanguage/MediaWiki
 *
 * ----------
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 * http://www.gnu.org/copyleft/gpl.html
 *
 * @file
 */

// 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+.
// @codingStandardsIgnoreStart MediaWiki.Usage.DirUsage.FunctionFound
require_once dirname( __FILE__ ) . '/includes/PHPVersionCheck.php';
// @codingStandardsIgnoreEnd
wfEntryPointCheck( 'index.php' );

require __DIR__ . '/includes/WebStart.php';

$mediaWiki = new MediaWiki();
$mediaWiki->run();

전에도 이런 일이 있었는데 문제를 해결하는 답변을 받았습니다. 하지만 더 이상 답을 찾을 수 없어서 다시 질문을 드려야겠습니다.

대답은 구성 항목인 것 같은데 어느 것입니까? apache2, php7.2 또는 mediawiki 구성?

답변1

Apache2용 PHP 활성화

sudo a2enmod php

Apache2 다시 시작

systemctl restart apache2

문제를 해결했습니다.

관련 정보