Image thumbnail creation error in MediaWiki on Windows IIS7 with php

130 views Asked by At

I am facing this strange problem, and i am really frustrated with it

The problem is as follows: wiki was hosted on linux based server with php 5.3, now has been moved to IIS7 with php 5.4 but the problem is when I upload images:

if i upload an image with normal name like : foobar.png it works fine, I mean it is uploaded and thumbnails are also displayed, but when I try to upload the Image with German characters like : ü ö ä Ä Ü Ö... the image thumbnail is not created and the wiki throws an error message, "Error Creating Thumbnail" by some research I found out that mostly the wiki doesn't work well with Windows in this case but of course that is not the solution its the problem actually.

I tried to modify the character type string into Window-1250 before passing the path to function to save thumbnail( in short tried to hack the Core of wiki) but it didn't worked. Could there be any possible solution to this problem ?

2

There are 2 answers

0
Mayank Tiwari On

I am not sure if this is a good option but this helped, I had to turn off the thumbnail creation by setting

$wgUseImageResize = false;

I know this could possibly downgrade the performance a little, but I think "images are displayed" is priority than creation of image thumbnails.

0
Nemo On

AFAIK, it's impossible for Windows to handle uploads: https://phabricator.wikimedia.org/T3780, https://www.mediawiki.org/wiki/Manual:Configuring_file_uploads#Known_problems_on_Windows

However, you could help test the SHA-1 file repository feature being introduced in MediaWiki 1.26alpha. The process to switch should be something like

  • add $wgLocalFileRepo['storageLayout'] = 'sha1'; to LocalSettings.php;
  • run php maintenance/migrateFileRepoLayout.php --oldlayout name --newlayout sha1.

Good luck!