Topic on Project:Support desk

UploadStashFileException

7
BJMdata (talkcontribs)

My Platform - MediaWiki 1.23.2; Skin: BootStrap; PHP: 5.3.29 ; URL: [available upon request]; Permissions: $IP/images: 755.

My History - This is my new installation of MediaWiki and this Skin. I am inexperienced with these installation/configuration procedures. I imported existing database tables into this new installation. The previous MediaWiki installation was corrupted. I am in the process of tailoring this new Skin to match my website.

My Symptom - Some images were not being displayed on Chrome browser but were in IE11

My Failed Attempts - Delete image and upload a replacement image

Debug message - Warning: failed to mkdir "/usr/www/users/.../.../w/images/temp/d/d0" mode 0777 [Called from wfMkdirParents in /usr/www/users/.../.../w/includes/GlobalFunctions.php at line 2625] in /usr/www/users/.../.../w/includes/debug/Debug.php on line 303

Error message - "Internal Error - [197095a6] 2014-08-31 17:35:07: Fatal exception of type UploadStashFileException"

My Request - Please help me correct this problem. Thank you.

88.130.101.168 (talkcontribs)

Hi!

The maintenance script eraseArchivedFile.php allows you to remove a file completely after you have deleted it. Maybe this helps. In order to use this script, you will have to use the shell and execute the according commands there, e.g.:

cd folder/to/my/wiki/
cd maintenance
php eraseArchivedFile.php --filekey * --filename name_from_fa_name_column

The warning with mkdir() might be related to missing permissions inside the folder images/. Make sure that the needed permissions are not only set for the images/ folder itself, but also recursively for its child folders!

You say you could see the images in IE11, but not in Chrome. I guess Chrome showed you an error 404 instead?

76.88.52.182 (talkcontribs)

In Chrome there was no error 404. It just did not display that particular image although the image displayed when you clicked on it.

And when I tried to delete the image or tried to upload a new image I get this error: "Warning: failed to mkdir "/usr/www/users/.../.../w/images/0/0c" mode 0777 [Called from wfMkdirParents in /usr/www/users/.../.../w/includes/GlobalFunctions.php at line 2625] in /usr/www/users/.../.../w/includes/debug/Debug.php on line 303"

BJMdata (talkcontribs)

This is the other error I got when trying to upload an image: "Upload warning - Could not create directory "mwstore://local-backend/local-public/0/0c"." Permissions are 777 for images and 755 for all subdirectories however apparently it is not trying to write to an existing directory instead it is trying to make a new directory for the new image.

Ciencia Al Poder (talkcontribs)

Yes, it needs to create new directories.

Note that files shouldn't have the executable bit. They should be 666 or 644 but not 777. For testing, you may want to set files to 666 and folders to 777 to see if there are permission issues.

BJMdata (talkcontribs)

The error message reports MediaWiki is unable to create a directory in the images/temp folders even though they now both have 766 permissions. Why is that?

Concurrently there also is this message: "Internal Error - [197095a6] 2014-08-31 17:35:07: Fatal exception of type UploadStashFileException" What does that mean and how do you fix it?

Ciencia Al Poder (talkcontribs)

Be sure those folders are owned by the user running the webserver. If in doubt, give all folders (recursively) 777 permissions and test if it succeeds, and then restrict permissions until the desired level. This will discard any permission issues.

Reply to "UploadStashFileException"