Fixing 403, 404 and 500 errors when using timthumb.php
Many new WordPress templates have been incorporating the timthumb.php thumbnail generator.
If you run into any 403, 404 or 500 errors when implementing timthumb, here are a few tips:
- Make sure the timthumb.php file has its permission set to 775
- Make sure the “cache” folder’s permissions are set to 775. The cache folder is generated the first time you try to run timthumb. It is located within the same directory as the timthumb.php file.
- If you host your website on HostGator, you will need to ask them to change a few settings within mod_security for Apache. This is a documented issue with timthumb usage on Host Gator. Below is an email I sent to them making my own request:
Dear Host Gator,
I recently updated my WordPress website with a theme that uses the
timthumb.php thumbnail generator.I have learned that in order for it to work properly HostGator needs to
change a few setting for my website. When I try to run timthumb I receive
a 403 error.I need the following rules [1234234,340151, 340153] added to mod_security
for www.recommendedwebtools.com.Please let me know if there are any questions or concerns.
Thanks!
Contact Host Gator at their support email address. They responded within the hour and the setting was changed shortly thereafter.
Happy Thumbnailing!
Posted by Paul Flyer on Friday, June 19th, 2009 in Graphic Design, Web Development




Lior Sion Says:
August 19th, 2009 at 7:13 am
wow. Wow. wow. Thanks. Even included your sample email
thanks again!
Keith Douglas | Real World Muse Building Says:
November 16th, 2009 at 5:16 am
Thanks Paul! I’ve spent all weekend trying to fix this. Much appreciated.
Keith
Creare Studio Says:
December 11th, 2009 at 10:42 am
I was wasting too much time trying to run the script, and now is working on a shared account from Hostgator. Thanks!!