Broken thumbnails in Mediawiki 1.19.2


#1

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!


#2

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


#3

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

<?php
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");
?>

Source: http://stackoverflow.com/questions/4208253/verify-imagemagick-installation

Bit of chatter here too: http://www.mediawiki.org/wiki/Thread:Talk:MediaWiki_1.19/Thumbnails_didn’t_work_since_Update_to_1.19


#4

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…


#5

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
putenv('TMPDIR=/home/domain.com/wiki/images/tmp');

#6

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.


#7

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!
[hr]
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 domain.com to my domain? Otherwise the path seems correct


#8

[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: http://www.mediawiki.org/wiki/Manual:Configuring_file_uploads#Check_directory_security

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.


#9

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…


#10

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.


#11

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…


#12

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


#13

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

Wonderful…


#14

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?


#15

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…


#16

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


#17

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!
[hr]
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

Thoughts?


#18

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


#19

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


#20

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?