Topic on Project:Support desk

Jump to navigation Jump to search

mw 1.20.2 thumbs not displayed but while uploading

Nutt (talkcontribs)

Hej there,

I upgraded and switched from

MediaWiki: 1.8.2
PHP: 5.2.17 (cgi-fcgi)
MySQL: 4.0.27--maxd0-log 


MediaWiki 	1.20.2
PHP 	5.4.11 (cgi-fcgi)
MySQL 	5.0.96-log

I face the problem that thumbs of uploaded pics don't show. Interestingly they are shown in the uploading process (&gt div id="mw-upload-thumbnail" class="thumb tright"&lt) but not later.

When I expect a thumbnail to be shown the debug log shows

File::transform: Doing stat for mwstore://local-backend/local-thumb/Bruell-viersen06.jpg/90px-Bruell-viersen06.jpg
FileBackendStore::getFileStat: File mwstore://local-backend/local-thumb/Bruell-viersen06.jpg/90px-Bruell-viersen06.jpg does not exist.


the page shows "Fehler beim Erstellen des Vorschaubildes: Die Miniaturansicht konnte nicht am vorgesehenen Ort gespeichert werden".

What can I do to get the thumbs back?

Which additional information should I provide?

thanks in advance cheers Nutt

ps for test purposes I also changed the location from one domain to a subdirectory of another domain, stuff is in a hosted environment no shell.

MarkAHershberger (talkcontribs)

First, if you're really upgrading from 1.8 and not 1.18, THANK YOU!!! Even if you are upgrading from 1.18, thank you.

Next what are the permissions on your images directory? It sounds like you're webserver can't write to the thumb sub-directory.

Nutt (talkcontribs)

Yes, missed one or another version. Had that MySql 4. Version and dared to dump because of the possibility to smash my latin1 with utf-8 during the dump. Didn't happen but still it's latin1 and utf-8 mixed. Will sort that out later, hopefully.

The permissions in the images-directory are like that:

w/images 755
w/images/archive 755
w/images/lockdir 755
w/images/temp 755
w/images/thumb 755
pictures there 644

Can I trust filezilla or do directories have different names nowadays?

As I wrote I can upload pictures, they will be there but only as a full version, nothing thumbed. As the old ones they are accessable but only fullsize. The old thumbnails are in thumb and ok when I download them manually. A fresh uploaded pic doesn't get a thumb saved.



If in localsettings is $wgTmpDirectory     = "{$wgUploadDirectory}/tmp";
There should be in that dir also tmp and _not_ temp!

Think it solved my problem, thumbs are back in the game! Wonder why it worked before?!

Could you tell me perhaps if I should care about the latin1 / utf-8 stuff or should i open a new thread for that?

MarkAHershberger (talkcontribs)

Can you see who owns those files? What if you change them to 777 instead of 755?

Nutt (talkcontribs)
Nutt (talkcontribs)

sorry for talking to myself.

Not all are ok, some thumbs still don't show.

index.php?title=Spezial:Dateien is blank!

Where to look for?

Ciencia Al Poder (talkcontribs)

Do you mean "blank" as there's no HTML output at all? see Blank page

Nutt (talkcontribs)

yes, Blank page!

I set

error_reporting( E_ALL );
ini_set( 'display_errors', 1 );
$wgDebugToolbar	= true;

unfortunately still blank.

It concerns

whereas this is working

from info.php I get

memory_limit	90M	90M

in localsettings there was nothing, I inserted

ini_set( 'memory_limit', '60M' );

I can't see errorlogs on the server, will ask if it is somehow possible.



will turn blank as well, so this was working before! Still something wrong with temp-files or location?


  • images/temp is still in use, the pics I intended to upload are there with random names
  • images/tmp now has only various transform_71c6a52a7d32-1.jpg (differing after the "_") with zero bytes
  • except one which is a real thumb


MarkAHershberger (talkcontribs)

Could you enable $wgDebugLogFile and see if it gives you an idea of what might be happening?

Nutt (talkcontribs)

Currently my locals...php looks like

error_reporting( E_ALL );
ini_set( 'display_errors', 1 );
$wgDebugToolbar	= true;
$wgDebugLogFile = "/w/logs/wiki-{$wgSitename}.log";

but no logs

Nutt (talkcontribs)

I put the whole stuff local on my machine and found:

the pages threw

Warning: wfMkdirParents: failed to mkdir "/w/images/thumb/20120311_163324-c.jpg" mode 0777 in 
  /w/includes/GlobalFunctions.php on line 2546

Warning: copy(/w/images/thumb/20120311_163324-c.jpg/180px-20120311_163324-c.jpg): failed to open stream: 
  No such file or directory in /w/includes/filebackend/FSFileBackend.php on line 213

nothing happened on these pages until I gave sudo chmod a+w /w/images/thumb then really a lot of thumb-dirs were generated, which were not there before

  • so probably it dies silently on the webserver because of the load?
  • or it's not possible to write 0777?
  • but if it is done one by one, it seems to function

should I set thumb to 0777?

MarkAHershberger (talkcontribs)

Yes, set thumb to 0777 if you can. (talkcontribs)

set thumb 0777, no change.

MarkAHershberger (talkcontribs)

I missed you saying you did sudo chmod a+w /w/images/thumb. Try:

find /w/images -type d | xargs sudo chmod a+xwr

which is one level up and should get all the sub directories

Nutt (talkcontribs)

I don't have shell-access.

I used filezilla and put 777 from images downwards on all directories.


  • Spezial:Dateien/Special:FileList
  • Spezial:Neue_Dateien/Special:NewFiles

whereas these are working like

  • upload is working
  • Spezial:Meistbenutzte_Dateien/Special:MostLinkedFiles (there are only may be 20 pics)
  • Spezial:Unbenutzte_Dateien/Special:UnusedFiles (first page with 50 pics next page is blank)

Edit: Isn't there something too refresh the whole pic-stuff?

MarkAHershberger (talkcontribs)

Why did you say you used sudo if you don't have shell access?

In any case, I don't know of any way to fix the problem you're having without shell access. Perhaps you can ask your hoster to help you?

Nutt (talkcontribs)

I put the whole stuff local on my machine and found: local I do have shell access, my admin was that friendly :)

I could ask but I don't know what to ask.

MarkAHershberger (talkcontribs)

Ask your hoster to run the find command I gave you:

find /w/images -type d | xargs sudo chmod a+xwr
Nutt (talkcontribs)

I used ur command thru php-shell with no change.

I transferred my local installation to the final destination. Without changes everything works fine. But when I try to upload a new image the process fails silently and the page goes blank. The other a.m. special pages also go blank then.

So I digged more into thumbs and found

2109  /**
2110   * Allow thumbnail rendering on page view. If this is false, a valid
2111   * thumbnail URL is still output, but no file will be created at
2112   * the target location. This may save some time if you have a
2113   * thumb.php or 404 handler set up which is faster than the regular
2114   * webserver(s).
2115   */
2116  $wgGenerateThumbnailOnParse = true;

So i set $wgGenerateThumbnailOnParse = false; Everything works fine now.

I found messages concerning thumb-probs and reverting to mw 1.19.x which solved the problems.

Should i try this?

MarkAHershberger (talkcontribs)

Yes, that sounds like the thing to do.

Nutt (talkcontribs)

finally I talked to the support and

  • got the php-error-log
  • when it silently dies
  • PHP Fatal error: Out of memory (allocated 29622272) (tried to allocate 10240 bytes) in /w5/includes/media/Bitmap.php on line 555
  • what is when gd silently dies
  • switched to image magick convert
  • everything (? not tested all the features) works!
  • from support if im dies add "putenv("MAGICK_THREAD_LIMIT=1");" right after "<?php"

dunno why gd dies but with im it works.

Hope this is solved now, will report later.

n8 n

Reply to "mw 1.20.2 thumbs not displayed but while uploading"