Timthumb上传后无法显示图像 [英] Timthumb can't show image after it's uploaded

查看:195
本文介绍了Timthumb上传后无法显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用名为User Avatar的Wordpress插件,该插件使用Timthumb进行图像显示.当我打开页面显示图像时,在控制台中显示错误500,并且在新标签页中使用该图像链接时,出现以下错误:

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

我认为这是服务器错误或配置错误,所有内容均被上载到文件夹uploads中,然后上载到具有0777权限的avatars子文件夹中,文件夹1也具有0777.

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,同时具有cachetemp文件夹,都具有0777权限. 服务器上已启用GD Image Lib.

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

推荐答案

查看您的timthumb-config.php,以检查FILE_CACHE_DIRECTORY是否设置为您认为的目录.

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

您还可以删除tim thumb cache目录中的现有index.html文件,因为tim thumb将自动创建该文件(以防万一,请先将其备份).

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)

您可能还需要检查配置文件,以查看MEMORY_LIMIT是否设置得足够高以适合您的特定图像.

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

您还应该检查缓存文件夹是否由Web服务器拥有,而不是您所有.

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

此处的其他疑难解答帮助: http://www.binarymoon.co.uk/2010/11/timthumb-hints-tips/

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

这篇关于Timthumb上传后无法显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆