我刚刚使用nginx 1.10.3,php 7.1.1,php-fpm和sqlite 3.16.2在arch linux上安装了MediaWiki 1.28。我按照拱门维基指南:https://wiki.archlinux.org/index.php/MediaWiki。我已经安装了所需的PHP扩展,PHP,sqlite,nginx似乎都可以自行运行。
现在,当我尝试设置MediaWiki安装的LocalSettings.php部分时,我在浏览器中转到0.0.0.0/mediawiki,单击设置并得到以下错误。也许这是sqlite的设置必须启用?
[1449c8c65e65734059748f4e] /mw-config/index.php MediaWiki\Services\ServiceDisabledException from line 340 of /usr/share/webapps/mediawiki/includes/services/ServiceContainer.php: Service disabled: DBLoadBalancer
Backtrace:
#0 /usr/share/webapps/mediawiki/includes/MediaWikiServices.php(509): MediaWiki\Services\ServiceContainer->getService(string)
#1 /usr/share/webapps/mediawiki/includes/GlobalFunctions.php(3089): MediaWiki\MediaWikiServices->getDBLoadBalancer()
#2 /usr/share/webapps/mediawiki/includes/GlobalFunctions.php(3075): wfGetLB(boolean)
#3 /usr/share/webapps/mediawiki/includes/cache/LinkCache.php(267): wfGetDB(integer)
#4 /usr/share/webapps/mediawiki/includes/Title.php(3184): LinkCache->addLinkObj(Title)
#5 /usr/share/webapps/mediawiki/includes/Title.php(934): Title->getArticleID(integer)
#6 /usr/share/webapps/mediawiki/includes/content/ContentHandler.php(282): Title->getContentModel()
#7 /usr/share/webapps/mediawiki/includes/Title.php(4684): ContentHandler::getForTitle(Title)
#8 /usr/share/webapps/mediawiki/includes/parser/Parser.php(867): Title->getPageLanguage()
#9 /usr/share/webapps/mediawiki/includes/parser/Parser.php(2110): Parser->getTargetLanguage()
#10 /usr/share/webapps/mediawiki/includes/parser/Parser.php(2075): Parser->replaceInternalLinks2(string)
#11 /usr/share/webapps/mediawiki/includes/parser/Parser.php(1290): Parser->replaceInternalLinks(string)
#12 /usr/share/webapps/mediawiki/includes/parser/Parser.php(441): Parser->internalParse(string)
#13 /usr/share/webapps/mediawiki/includes/installer/Installer.php(675): Parser->parse(string, Title, ParserOptions, boolean)
#14 /usr/share/webapps/mediawiki/includes/installer/WebInstaller.php(681): Installer->parse(string, boolean)
#15 /usr/share/webapps/mediawiki/includes/installer/WebInstaller.php(657): WebInstaller->getInfoBox(string, string, string)
#16 /usr/share/webapps/mediawiki/includes/installer/WebInstaller.php(401): WebInstaller->getErrorBox(string)
#17 /usr/share/webapps/mediawiki/mw-config/index.php(54): WebInstaller->showError(Message, string)
#18 /usr/share/webapps/mediawiki/mw-config/index.php(38): wfInstallerMain()
#19 {main}
答案 0 :(得分:0)
问题是我在php/sessions
中有/tmp
目录。我将其移至session.save_path = "/var/lib/php/sessions"
php.ini
并重复了以下步骤:
mkdir -p /var/lib/php/sessions
chown http:http /var/lib/php/sessions
chmod go-rwx /var/lib/php/sessions
答案 1 :(得分:0)
无论Tgr上面说了什么,修复会话确实为我解决了问题。我使用的是Apache ITK,因此我使用的解决方案略有不同,因为每个虚拟主机都在自己独特的uid下运行。
首先,我为会话创建一个单独的目录并更改所有权
mkdir /var/lib/php/sessions-wiki
chown wiki. /var/lib/php/sessions-wiki
然后在我的VirtualHosts指令中,我通过添加
告诉Apache / php在哪里找到会话文件php_admin_value session.save_path "/var/lib/php/sessions-wiki"
然后确保你的配置没有破坏它。
apachectl configtest
最后重新加载你的配置
apachectl graceful