osCthumb-phpThumb does not show all cached images

One of our client’s osCommerce websites with oscThumb was not displaying all thumbnails for some reason. After messing around with the configuration file and testing a few directives, I found one that fixed the problem. PhpThumb was generating the thumbnails properly, but hit the maximum cached files limit. In order to fix this, edit the ‘cache_maxfiles’ and/or ‘cache_maxsize” parameters. In this instance, I changed it from 200 to 400. Maximum number of generated thumbnails and directories is usually less than 300, so this setting is pretty safe.


//$PHPTHUMB_CONFIG['cache_maxsize'] = null; // never delete cached thumbnails based on byte size of cache directory
$PHPTHUMB_CONFIG['cache_maxsize'] = 20 * 1024 * 1024; // delete least-recently-accessed cached thumbnails when more than [10MB] of cached files are present (value is maximum bytesize of all cached files)

//$PHPTHUMB_CONFIG['cache_maxfiles'] = null; // never delete cached thumbnails based on number of cached files
$PHPTHUMB_CONFIG['cache_maxfiles'] = 400; // delete least-recently-accessed cached thumbnails when more than [200] cached files are present (value is maximum number of cached files to keep)

Leave a Reply

Your email address will not be published. Required fields are marked *