Comment on Technical Support by SEO Dave.

WordPress Technical Support Here’s how to waste an hour trying to track down an error in the timthumb.php script that didn’t exist :-)

Recently updated Timthumb.php to the latest version 2.8.14 for the next Stallion Responsive update.

There was a security issue found in timthumb.php 2.8.13 which is part of Stallion Responsive 8.0, no need to worry I’ve never activated the feature that had the security flaw, never liked the idea of allowing thumbnails to be generated from external domains, so always disabled it completely just in case (better safe than sorry).

Anyway, been running the 2.8.14 script here for a couple of weeks and it seemed to be working fine, until today. Found some thumbnail images are not working, they were generating this error message when loading directly in a browser:

The cached image file seems to be corrupt.

On rare occasions or after updating the Timthumb.php script file the thumbnails broke, can either wait for the cache to clear or use FTP to manually delete all the Timthumb.php images and let the script rebuild them. So logged in via FTP and deleted the thumbnails.

This fixed the issue, or so I thought. After checking multiple archive pages (where the images are generated) found some images still gave the “The cached image file seems to be corrupt.” error message, though the images producing the error changed as I again manually deleted the thumbnail images!

Getting a tad concerned now, weird stuff happening on a site could mean HACKED! If a hacker had messed with owner/groups it could stop files being saved(permissions issue) though that didn’t make much sense with the files changing that generated the error.

Made a full server backup just in case and started checking if anything had crashed, found nothing wrong. Uploaded the old 2.8.13 script which I knew worked for months with no issues, again same issue. That strongly suggested it wasn’t Timbthumb to blame.

Checked the error log file (where I should have first looked) and found a bunch of errors:

[Mon Jul 21 19:17:20 2014] [warn] [client IP] mod_fcgid: ######: PHP Warning:  file_put_contents() [<a href='function.file-put-contents'>function.file-put-contents</a>]: Only 0 of 40 bytes written, possibly out of free disk space in /home/######/public_html/wp-content/themes/stallion-responsive-child/timthumb.php on line 806, referer: https://stallion-theme.co.uk/responsive/adsense-wordpress-themes/

Hmm, out of disk space, don’t think so there’s loads of free room on the SERVER.

Now I set my domains to have unlimited disk space so this sort of thing (running out of disk space) doesn’t happen, would appear when I set this server up with Virtualmin I forgot to change the disk space allocation from 1GB to unlimited. Oops.

After changing the setting to unlimited and again deleting the cached Timthumb thumbnail images everything is working again.

That’s how to waste an hour tracking down a self inflicted error :-)

Better go check all the other domains on the server and set them all to unlimited disk space.

David