Topic on Project:Support desk

Error creating thumbnail: Unable to save thumbnail to destination

25
Fakeologist (talkcontribs)
AhmadF.Cheema (talkcontribs)
Fakeologist (talkcontribs)

Thanks. Tried everything and so far nothing works.

To I have to set this variable explicitly?

$wgUploadPath

Fakeologist (talkcontribs)

A file linked to wikicommons displays fine. Why then can't it display thumbnails to my own server?

AhmadF.Cheema (talkcontribs)

Did you create a debug log file?

What is the output to the log, at the time the thumbnails should be created?

Ciencia Al Poder (talkcontribs)
Fakeologist (talkcontribs)

ok did that, got the error. now what?

AhmadF.Cheema (talkcontribs)

Search on Google, or maybe try posting the error here - that might help also.

Fakeologist (talkcontribs)
Ciencia Al Poder (talkcontribs)

Is the log complete? It ends with [FileOperation] FileBackendStore::getFileStat: File mwstore://local-backend/local-thumb/a/ad/9-11-Photos-AP-Getty-640x480.jpg/180px-9-11-Photos-AP-Getty-640x480.jpg does not exist., which is okay, but it should then try to create the thumbnail, which should get logged.

Fakeologist (talkcontribs)

I re-pasted the whole log with 3 requests for the file in a row.@Ciencia Al Poder

Ciencia Al Poder (talkcontribs)

Better now, but still doesn't give any useful information, but that's not your fault.

I don't see the command used to generate the thumbnail, so my guess is that you don't have MediaWiki configured to use ImageMagick for thumbnails, and it's using the GD library instead., which seems to have less debug traces. In that case, try to use ImageMagick if you can, or else check if GD is really available to PHP (try phpinfo). Check also if you have SELinux enabled, which may cause problems if not configured correctly.

Fakeologist (talkcontribs)

I do have

$wgUseImageMagick = true;

$wgImageMagickConvertCommand = "/usr/bin/convert";

Fakeologist (talkcontribs)
Ciencia Al Poder (talkcontribs)

Well, if you have those settings, then you're using imagemagick. The error may happen on an early stage before attempting to invoke imagemagick, otherwise the full convert command will be printed on the debug log, but it wasn't printed on your debug log. Probably it fails when trying to copy the file to a temp folder. Check permissions of the $wgTmpDirectory

星耀晨曦 (talkcontribs)

Emm. I have a problem. Why is my tmp directory under /images/temp, I haven't give any value to $ wgTmpDirectory in my LocalSettings.php.

209.48.43.22 (talkcontribs)

Must be the default directory.

Fakeologist (talkcontribs)

Still not working. Upgraded to latest mediawiki 1.3 with still no ability to see thumbnails.

Malyacko (talkcontribs)

Version 1.3 is from the early 2000s (I hope that's a typo), and not helpful as you have not answered the SELinux question yet... If your configuration is broken then no software code update will fix it anyway.

溪木 (talkcontribs)

I don't know whether my solution is helpful but it works for me. When I try to use the imagemagick built from source, it turned out that I cannot resize the png file as it cannot find some required dependency. So I use the imagemagick installed from ubuntu repo using apt-get install imagemagick instead and it puts convert executable file into /usr/bin instead of /usr/local/bin. So I reset the $wgImageMagickConvertCommand to "/usr/bin/convert". Here is when this error occurs. But when I copy file "/usr/bin/convert" into "/usr/local/bin/convert" and set $wgImageMagickConvertCommand="/usr/local/bin/convert", this error disappeared.


So in short, following method may be helpful:

apt-get install imagemagick

cp /usr/bin/convert /usr/local/bin/

Edit your LocalSettings.php and set $wgImageMagickConvertCommand = "/usr/local/bin/convert";


Besides......yes, I use account root directly when install mediawiki.

Ciencia Al Poder (talkcontribs)

It makes no sense to need to copy the executable to another location for it to work. Maybe you had open_basedir restrictions that don't allow you to access /usr/bin directly but /usr/local/bin/ is allowed, or some rule in SELinux where /usr/local/bin/ is whitelisted and /usr/bin/ is not.

Reply to "Error creating thumbnail: Unable to save thumbnail to destination"