Broken thumbnails in Mediawiki 1.19.2

Recently we upgraded via the one click installer to the new version on Mediawiki that DH provides and all was well.

A couple of days ago we were moved to a new server and since that point the software cannot create any thumbnails for new images uploaded to the wiki.

Previous uploads continue to work, but otherwise new uploads needing a thumbnail don’t.

I have put in a ticket, but the response was to point us in the direction of log errors that have absolutely nothing to do with the issue.

It appears that the images are uploaded correctly, and clicking on a full size image will make them appear as they should look.

Does anyone have any experience in this issue and how to solve it? Is it possible that the location of Imagemagick has changed or that a newer version is needed for Mediawiki than is available? Perhaps this is a bug in Mediawiki, but if it is, how do you go about fixing it?

Thank you for any thoughts!

Sent in another ticket for help, no answers as yet…

Not sure if this is any help, but at least it will give you a heads up with respect to ImageMagick on the server…

function alist ($array) {  //This function prints a text array as an html list.
  $alist = "<ul>";
  for ($i = 0; $i < sizeof($array); $i++) {
    $alist .= "<li>$array[$i]";
  $alist .= "</ul>";
  return $alist;
exec("convert -version", $out, $rcode); //Try to get ImageMagick "convert" program version number.
echo "Version return code is $rcode <br>"; //Print the return code: 0 if OK, nonzero if error.
echo alist($out); //Print the output of "convert -version"
system("which convert");


Bit of chatter here too:’t_work_since_Update_to_1.19

Imagemagick exists on the server, the patches as suggested in that link I have tried, and I have rechecked that the path in mediawiki is correct.

But it still doesn’t work.

I have the worst feeling that in all the mySQL stuff going on that something there is the issue, but I have no idea…

It’s (generally) not MySQL. Did you set the permissions on your folders for images correctly? MediaWiki can get tetchy. I had the same problem when I upgraded, and my LocalSettings.php file now has this:

# Because my server got stupid

I’ve seem similar issues and it was permissions like the one Ipstenu cites above. Mediawiki uses at least one tmp folder to process images. Actually it uses a second one if you attempt to delete/replace an image as well.

The thing of it is, the wiki was working perfectly well before the server move. Uploading images were perfect. All worked exactly correctly, Then the move to the new server came and the thumbnails fail with the message “cannot create image” but the full size images are perfect, previous thumbnails are perfect as well. But making new ones does not function.

I’ll be honest and add that I have no idea what the folder permissions are, but since the wiki was functioning right before the move, would’t it be fair to assume that they are correct?

I’d try that line of code and let you all know…

Thank you in advance!
Adding that code, with the changes for my server, the error message now returns as: Error creating thumbnail: Unable to save thumbnail to destination

To be clear, the changes to that code should only to to change to my domain? Otherwise the path seems correct

[quote=“TeraS, post:7, topic:58815”]
I’ll be honest and add that I have no idea what the folder permissions are, but since the wiki was functioning right before the move, would’t it be fair to assume that they are correct?[/quote]
Not usually. I guess it depends how the move was done, but generally when you copy files over, their permissions are not copied with them. If DH automated your move, I dunno how they handle that.

You’ll want to google how to set folder permissions in your ftp client. In filezilla you just right-click the images folder, check the boxes as described here:

They say 755 should be sufficient. You may want to try checking all the boxes (777) if 755 isn’t enough, but many people consider that a security risk.

Make sure you check the box to “recurse into subdirectories” and apply to all files and directories inside the images folder. It will take a while to run through it all.

I looked through every folder in the images folder and they are all set to 755. Seeing that they were all at that number already I switched them all to 777 and tested to no effect. I’ve reverted back again to the original settings.

I have two wikis running on two different users, and I just found out that the other wiki also cannot create thumbnails…

Not all servers are equal. I mean this in the literal sense: No matter how much we try to make servers as close to identical as possible, it never happens :confused:

When you added in the code, did the folder exist? I created an image/tmp folder and set it to 777 for things to run. I think it dovetailed with my installing of ImageMagick.

The path to that folder is: wiki/images/temp on my server, which matches with your code. And that folder did exist prior to my adding the code to the Local Settings as suggested…

If chmod 777 is a requirement I’d throw that app in the trash until they fix it.

Well, it’s getting progressively worse as now the site is crashing with 500 errors when attempting to upload an image.


sXi - Oh don’t get me started on how unfriendly MediaWiki is to users :wink: Learning that was like jumping from a 15 meter high dive the first time I went swimming. (I’m afraid of heights too)

TeraS: What domain is this? Maybe I can see something obvious?

If you want a ticket #5495732… Or you can look on my profile here for the URL…

I’m not trying to be funny about revealing the URL, there’s a reasonable explanation, which is that it it deals with somewhat adult themes…

But any help at all would be wonderful for us…

Oh I totally understand :slight_smile: (It’s still weird to me that I can look at any website I need to for work)

I noticed this has a space at the end:

I don’t know if it matters, but I know that mediaWiki can get particular.

Also your tmpdir is wrong. You have it as this:

You need to have it as

The putenv code line should have a # in front of it to turn it off, but I’ll get in there and fiddle it as well as the other line… BRB!
Nope, neither change helps…

The removal of the space didn’t help and changing the path as suggested now adds this to the thumbnail error message:

Error creating thumbnail: Unable to save thumbnail to destination


Ugh, I re-read the error and the LocalSettings file. tmp should be temp

Corrected the line as you suggested and the thumbnail error returns to: Error creating thumbnail without any further explanation…

I’m going to start drinking again at this rate. :frowning:

Okay… If I look in your wiki/images/temp folder, I see a bunch of folders.

When I look at MY temp folder, I see nothing.

Let’s just be crazy.

Make a folder called /tmp (no e) and point set_env to that?