我在运行RHEL7的服务器上安装了Mediawiki v1.24.1。 我在/ var / www / foohelp / wiki下安装了它。但是,当我尝试上传文件时,出现以下错误:
[f3eae72a] /foohelp/wiki/index.php/Special:Upload Exception from line 1871 of /var/www/foohelp/mediawiki-1.24.1/includes/filerepo/file/LocalFile.php: Could not acquire lock for 'User-default.png.'
Backtrace:
#0 /var/www/foohelp/mediawiki-1.24.1/includes/filerepo/file/LocalFile.php(1174): LocalFile->lock()
#1 /var/www/foohelp/mediawiki-1.24.1/includes/upload/UploadBase.php(738): LocalFile->upload(string, string, string, integer, array, boolean, User)
#2 /var/www/foohelp/mediawiki-1.24.1/includes/specials/SpecialUpload.php(467): UploadBase->performUpload(string, string, boolean, User)
#3 /var/www/foohelp/mediawiki-1.24.1/includes/specials/SpecialUpload.php(186): SpecialUpload->processUpload()
#4 /var/www/foohelp/mediawiki-1.24.1/includes/specialpage/SpecialPage.php(363): SpecialUpload->execute(NULL)
#5 /var/www/foohelp/mediawiki-1.24.1/includes/specialpage/SpecialPageFactory.php(584): SpecialPage->run(NULL)
#6 /var/www/foohelp/mediawiki-1.24.1/includes/MediaWiki.php(275): SpecialPageFactory::executePath(Title, RequestContext)
#7 /var/www/foohelp/mediawiki-1.24.1/includes/MediaWiki.php(584): MediaWiki->performRequest()
#8 /var/www/foohelp/mediawiki-1.24.1/includes/MediaWiki.php(435): MediaWiki->main()
#9 /var/www/foohelp/mediawiki-1.24.1/index.php(46): MediaWiki->run()
#10 {main}
如果我编辑/includes/filebackend/FileBackendGroup.php 并将LockManager修改为
'lockManager' => 'fsLockManager',
并修改权限,如下所示:
chown -R apache:apache images/
chown -R 755 images/
我收到以下错误:
(Could not create directory "mwstore://local-backend/local-public)
我已经尝试过大多数论坛,并且没有解决方案可以解决我的问题。任何帮助,将不胜感激。
答案 0 :(得分:2)
尝试设置tmp目录:
$wgTmpDirectory = "/var/www/tmp/";
授予权利:
chown -R apache:apache tmp/
chown -R 755 tmp/
还尝试添加全局变量:
putenv("TMP=/var/www/tmp/");
putenv("HOME=/var/www");
如果您使用imagemagick:
$wgImageMagickTempDir = "/var/www/tmp/";