This is not the Image handler support thread, that is here
This is for Image Handler users who are hosted by GoDaddy (and other bucket hosts) who are falling foul of Godaddys limit of 1024 files per folder rule in your bmz_cache subfolders, where the optimised images are placed by image handler.
With most decent hosts you shouldn't need to do this as they don't have issues with you exceeding the 1024 files per folder.
Anyway Here goes
@ You Go Daddy users
First off Image handler should be installed and working correctly, if it isn't working correctly in the first place, this won't fix it.
This is an unsupported change to a core image handler file, which may help you Go-Daddy fans
This hasn't been heavily tested so USE AT YOU OWN RISK, I make no guarantees whatsoever
from line 71 in your
/includes/functions/extra_functions/functions_bmz_io.php
PHP Code:
function getCacheName($data, $ext='') {
global $bmzConf;
$md5 = md5($data);
$file = $bmzConf['cachedir'] . '/' . $md5{0} . '/' . $md5.$ext;
io_makeFileDir($file);
return $file;
}
try replacing it with this
PHP Code:
function getCacheName($data, $ext='') {
global $bmzConf;
$md5 = md5($data);
// $file = $bmzConf['cachedir'] . '/' . $md5{0} . '/' . $md5.$ext;
$file = $bmzConf['cachedir'] . '/' . substr($md5,0,2) . '/' . $md5.$ext;
io_makeFileDir($file);
return $file;
}
Currently Image Handler uses the first character of the optimised image for the sub directory name in your bmz_cache folder, so you will have 16 sub folders 0-f (hexidecimal), The change above instead take the first 2 characters of the optimised image name giving you 256 subfolders in the bmz_cache, so this should mean less images in each folder.
And just a note, there is no point trying to take the first 3 chars as that will give you 4096 folders which might kill the hamster that runs Go-Daddy