Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Timthumb can't show image after it's uploaded

I'm using Wordpress plugin called User Avatar, that uses Timthumb for image display. When I open page to show the image, it gives error 500 in the console, and when I use that image link in new tab, I get following error:

A TimThumb error has occured

The following error(s) occured:
Could not create the index.html file - to fix this create an empty file named index.html file in the cache directory.
Could not create cache clean timestamp file.


Query String : src=http://my.domain.com/wp-content/uploads/avatars/1/1358504649-bpfull.jpg&w=150&id=1&random=1358504649
TimThumb version : 2.8.10

I persume it's a server error or misconfiguration, everything is being uploaded into folder uploads, then into avatars subfolder, which has 0777 permission, folder 1 also has 0777.

Insinde, there are both cache and temp folders, both with 0777 permissions. GD Image Lib is enabled on the server.

like image 953
jOpacic Avatar asked Jan 18 '13 10:01

jOpacic


2 Answers

Look in your timthumb-config.php, to check if the FILE_CACHE_DIRECTORY is set to the directory you think it is.

You could also delete the existing index.html file that's in the tim thumb cache directory, as tim thumb will automatically create it (back it up somewhere first just in case)

You may also need to check the config file to see if the MEMORY_LIMIT is set high enough for your particular images.

You should also check that the cache folder is owned by the webserver and not by you.

Other troubleshooting help here: http://www.binarymoon.co.uk/2010/11/timthumb-hints-tips/

like image 118
TameRobots Avatar answered Nov 19 '22 20:11

TameRobots


Just like @jopacic said. What also worked for me was the following:

  • Changing the "cache" directory permission to 777
  • Deleting index.html file in the "cache" directory

Try that, it should work

like image 43
Ismail Osunlana Avatar answered Nov 19 '22 22:11

Ismail Osunlana