Jump to content

Topic on Project:Support desk

[1.24.0] "Fatal exception of type MWException" error

7
Lilis2nd (talkcontribs)

Hi.

I freshly installed MW 1.24.0 on a dedicated server, and while everything else works,
"Fatal exception of type MWException" error pops up when I try to upload a file.

I have tried giving writable permission to the images folder, and tried almost every solution posted on this board,
and still haven't succeeded.


I'm running a CentOS 6, with PHP 5.3.3 & MySQL 5.1.73. I'm in desperate need of any advice.


ANY help would be grateful.
Thank you.

Lilis2nd (talkcontribs)

Here's the backtrace log.

[8ae2b2fe] /wiki/index.php/Special:Upload Exception from line 1871 of /home/ast-wiki/www/wiki/includes/filerepo/file/LocalFile.php: Could not acquire lock for 'Delete_error.PNG.'

Backtrace:

#0 /home/ast-wiki/www/wiki/includes/filerepo/file/LocalFile.php(1174): LocalFile->lock()
#1 /home/ast-wiki/www/wiki/includes/upload/UploadBase.php(738): LocalFile->upload(string, string, string, integer, array, boolean, User)
#2 /home/ast-wiki/www/wiki/includes/specials/SpecialUpload.php(467): UploadBase->performUpload(string, string, boolean, User)
#3 /home/ast-wiki/www/wiki/includes/specials/SpecialUpload.php(186): SpecialUpload->processUpload()
#4 /home/ast-wiki/www/wiki/includes/specialpage/SpecialPage.php(363): SpecialUpload->execute(NULL)
#5 /home/ast-wiki/www/wiki/includes/specialpage/SpecialPageFactory.php(584): SpecialPage->run(NULL)
#6 /home/ast-wiki/www/wiki/includes/MediaWiki.php(275): SpecialPageFactory::executePath(Title, RequestContext)
#7 /home/ast-wiki/www/wiki/includes/MediaWiki.php(584): MediaWiki->performRequest()
#8 /home/ast-wiki/www/wiki/includes/MediaWiki.php(435): MediaWiki->main()
#9 /home/ast-wiki/www/wiki/index.php(46): MediaWiki->run()
#10 {main}
Ciencia Al Poder (talkcontribs)

Try adding this to LocalSettings.php:

$wgFileBackends[] = array(
	'name'        => 'local-backend',
	'class'       => 'FSFileBackend',
	'lockManager' => 'nullLockManager',
	'containerPaths' => array(
		'local-public'  => "{$wgUploadDirectory}",
		'local-thumb'   => "{$wgUploadDirectory}/thumb",
		'local-deleted' => $wgDeletedDirectory,
		'local-temp'    => "{$wgUploadDirectory}/temp",
	),
	'fileMode'    => 0644,
);
 
$wgLocalFileRepo = array (
        'class'             => 'LocalRepo',
        'name'              => 'local',
		'directory'         => $wgUploadDirectory,
        'scriptDirUrl'      => $wgScriptPath,
        'scriptExtension'   => $wgScriptExtension,
        'url'               => $wgUploadBaseUrl ? $wgUploadBaseUrl . $wgUploadPath : $wgUploadPath,
        'hashLevels'        => $wgHashedUploadDirectory ? 2 : 0,
        'thumbScriptUrl'    => $wgThumbnailScriptPath,
        'transformVia404'   => !$wgGenerateThumbnailOnParse,
		'deletedDir'        => $wgDeletedDirectory,
		'deletedHashLevels' => 3,
        'backend'           => 'local-backend',
);

(extracted from Thread:Project:Support desk/Problem With File Upload: Could not acquire lock for "mwstore://local-backend/local-public/1/1e".)

Please come back to say if that works for you

איתי בריבוע (talkcontribs)

I have this problem too. I'm using a hosting service.

87.229.231.234 (talkcontribs)

No, it say another truble: Could not create «mwstore://local-backend/local-public/0/06».

Abswv (talkcontribs)

That block of code fixed it for me. THANKS! I'm hosting on a windows 2012 Virtual Server with IIS8

209.191.21.234 (talkcontribs)

Worked for me, too. Server 2008R2 with IIS 7.5

Reply to "[1.24.0] "Fatal exception of type MWException" error"