Topic on Project:Support desk

Failure to Upload files to MediaWiki

3
Steve0613 (talkcontribs)

Good morning, I am experiencing issues with uploading files to my MediaWiki v1.26.2 server. Our current setup is as follows:

PHP v5.4.16, MariaDB v5.5.47, Apache v2.4.6.40

I have enabled debugging and receive the following errors when attempting to upload:

[exception] [6476b2a0] /mediawiki/index.php/Special:Upload   MWException from line 1868 of /var/www/mediawiki-1.26.2/includes/filerepo/file/LocalFile.php: Could not acquire lock for 'Cable.JPG.'

G#0 /var/www/mediawiki-1.26.2/includes/filerepo/file/LocalFile.php(1147): LocalFile->lock()

#1 /var/www/mediawiki-1.26.2/includes/upload/UploadBase.php(708): LocalFile->upload(string, string, string, integer, array, boolean, User)

#2 /var/www/mediawiki-1.26.2/includes/specials/SpecialUpload.php(486): UploadBase->performUpload(string, string, boolean, User)

#3 /var/www/mediawiki-1.26.2/includes/specials/SpecialUpload.php(197): SpecialUpload->processUpload()

#4 /var/www/mediawiki-1.26.2/includes/specialpage/SpecialPage.php(384): SpecialUpload->execute(NULL)

#5 /var/www/mediawiki-1.26.2/includes/specialpage/SpecialPageFactory.php(553): SpecialPage->run(NULL)

#6 /var/www/mediawiki-1.26.2/includes/MediaWiki.php(281): SpecialPageFactory::executePath(Title, RequestContext)

#7 /var/www/mediawiki-1.26.2/includes/MediaWiki.php(714): MediaWiki->performRequest()

#8 /var/www/mediawiki-1.26.2/includes/MediaWiki.php(508): MediaWiki->main()

#9 /var/www/mediawiki-1.26.2/index.php(41): MediaWiki->run()

#10 {main}

DatabaseBase::query: Writes done: REPLACE INTO `msg_resource` (mr_resource,mr_lang,mr_blob,mr_timestamp) VALUES ('X')

OutputPage::sendCacheControl: no caching **

[error] [5a2ad114] [no req]   ErrorException from line 4262 of /var/www/mediawiki-1.26.2/includes/db/Database.php: PHP Notice: Uncommitted DB writes (transaction from DatabaseBase::query (User::loadFromDatabase)).

#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)

#1 /var/www/mediawiki-1.26.2/includes/db/Database.php(4262): trigger_error(string)

#2[internal function]: DatabaseBase->__destruct()

#3 {main}

NOTE: This server has worked fine since we set it up. Then out of the blue we couldn't upload files. We are in a production environment and need this thing fixed. Any assistance would be greatly appreciated. Thank you!

Ciencia Al Poder (talkcontribs)

I'd say something has changed in your server, this particular thing doesn't break on its own...

  • Verify permissions on the images folder
  • Verify if you have SELinux enabled, and disable it to test if some kind of additional enforcement was added
  • Check free space on the mount point where images are stored, just in case you ran out of space
Steve0613 (talkcontribs)

Figured out the issue pertains to the /var/www/html/mediawiki/images directory being sym-linked to a network share. Moved the images file from the file server to the local machine and this worked. Still need to figure out what was causing the issues with sym-links.

Steve