Manual talk:$wgHashedUploadDirectory

changing an existing configuration
You will receive following error (MW 1.9.2)

 Warning: imagecreatefrompng(E:\Programme\xampp\htdocs\w/images/1_GrafikTest_01_1024.png) [function.imagecreatefrompng]: failed to open stream: No such file or directory in E:\Programme\xampp\htdocs\w\includes\Image.php on line 1266

Warning: imagecopyresampled: supplied argument is not a valid Image resource in E:\Programme\xampp\htdocs\w\includes\Image.php on line 1274

Fatal error: imagepng [function.imagepng]: gd-png: fatal libpng error: Invalid number of colors in palette in E:\Programme\xampp\htdocs\w\includes\Image.php on line 1275

Moving to the system
Does anyone have a script which runs through the uploads dir and files existing images into this new structure? I have way too many images just in the image folder, but there does not seem to be a migration path. --ThePlaz 07:14, 10 March 2010 (UTC)

Script
Thanx to Platonides !! http://lists.wikimedia.org/pipermail/mediawiki-l/2010-April/033779.html

Make a backup archive of the images folder first !

Changes / manual work:

mkdir($folder, 0755, true); chown($folder, "www-data"); chgrp($folder, "www-data"); chown www-data:www-data *
 * You may have to modify permissions, e.g.
 * then manually fix the owner of the top level directories
 * Then get rid of the top-level files in the thumb subdirectory (thumbs subdirectories will be automatically re-generated when users access pages)
 * Finally make sure that the cashes you use are emptied, e.g. "TRUNCATE TABLE objectcache;" in the MySQL database and kill the files in the file-cache subdirectory.