问题
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.
回答1:
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/
来源:https://stackoverflow.com/questions/14396991/timthumb-cant-show-image-after-its-uploaded