timthumb.php returns a 404 Error in WordPress

by Josh Highland on May 20, 2010

create wordpress thumbnails 300x300 150x150 timthumb.php returns a 404 Error in Wordpresstimthumb is a great little php script that helps create thumbnail images (http://code.google.com/p/timthumb). I’ve used it before, but recently I purchased a wordpress theme that used it, and it wasn’t working.

I would get a 404 error when I tired to access the directly via a url like this:
theDomain.com/wp-content/themes/theTheme/scripts/timthumb.php?src=/wp-content/uploads/2010/05/moose1.jpg&h=207&w=237&zc=1&q=80

After some digging around in log files on my server I realized the error

SoftException in Application.cpp:610: Directory “/home/usernamehere/public_html/wp-content” is writable by others

My problem had to so with the directory permissions! “writable by others” means that the permission on the directory were set to “777″. I changed the permissions of the directory using chmod to 755, and everything started to work.

Lesson learned, if timthumb.php is not working at giving you 404 errors, check the permission of the directory that contains the php file.

  • digg timthumb.php returns a 404 Error in Wordpress
  • facebook timthumb.php returns a 404 Error in Wordpress
  • stumbleupon timthumb.php returns a 404 Error in Wordpress
  • twitter timthumb.php returns a 404 Error in Wordpress
  • delicious timthumb.php returns a 404 Error in Wordpress
  • reddit timthumb.php returns a 404 Error in Wordpress
  • friendfeed timthumb.php returns a 404 Error in Wordpress
  • posterous timthumb.php returns a 404 Error in Wordpress
  • tumblr timthumb.php returns a 404 Error in Wordpress

{ 6 comments… read them below or add one }

1 Joseph September 24, 2010 at 2:02 am

I also have 404 errors but there is some other cause. I have nothing in my error log and changing the chmod did not fix the issue.

2 jehzlau October 21, 2010 at 1:34 pm

@Joseph – same problem here. I also changed the chmod to 755 and it didn’t fix the issue. :(

3 Matthew Pont January 11, 2011 at 1:57 am

Same issue here, 755 fixed it – thanks!

4 Casey July 27, 2011 at 7:22 am

Thanks, this solved my problem!

5 sridhar November 13, 2011 at 9:41 am

Which file i want to change to 0755
Where is chmod ? (what is chmod :( )
… please help me

6 Jay May 5, 2012 at 6:09 pm

Thank-you so much for the advice – much appreciated – changed permissions and presto I have thumbnail images!!!!

Leave a Comment

Previous post:

Next post: