6

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.

jOpacic
  • 9,453
  • 12
  • 36
  • 58

2 Answers2

12

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/

TameRobots
  • 156
  • 1
  • 5
  • 5
    I deleted index.html and that .touch file, and it worked. Oh my god. Thanks for the answer! – jOpacic Jan 23 '13 at 14:38
  • 1
    Same thing worked for me jOpacic. The index.html and touchfile weren't owned by the right user. It's always a permissions issue... – Robeezy Jun 04 '13 at 19:29
  • Note: This problem also occurs when the cache folder inside mod je camera has 644 or 755. set it to 777 – Willox Jun 27 '16 at 12:53
2

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

Ismail Osunlana
  • 434
  • 5
  • 9