【问题标题】:Timthumb can't show image after it's uploadedTimthumb 上传后无法显示图片
【发布时间】:2013-01-02 01:11:02
【问题描述】:

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

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

Insinde,cachetemp 文件夹都有 0777 权限。 GD Image Lib 已在服务器上启用。

【问题讨论】:

    标签: wordpress timthumb


    【解决方案1】:

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

    您还可以删除 tim thumb 缓存目录中现有的 index.html 文件,因为 tim thumb 会自动创建它(以防万一,先备份它)

    您可能还需要检查配置文件以查看 MEMORY_LIMIT 是否设置得足够高以容纳您的特定图像。

    您还应该检查缓存文件夹是否属于网络服务器而不是您。

    其他故障排除帮助:http://www.binarymoon.co.uk/2010/11/timthumb-hints-tips/

    【讨论】:

    • 我删除了 index.html 和那个 .touch 文件,它工作正常。我的天啊。感谢您的回答!
    • 同样的事情对我 jOpacic 有用。 index.html 和 touchfile 不属于正确的用户。这始终是权限问题...
    • 注意:当mod je相机内的缓存文件夹有644或755时也会出现此问题。将其设置为777
    【解决方案2】:

    就像@jopacic 说的那样。以下内容也对我有用:

    • 将“缓存”目录权限更改为 777
    • 删除“缓存”目录下的 index.html 文件

    试试看,应该可以的

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-07-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-19
      • 2022-01-17
      • 2014-07-25
      相关资源
      最近更新 更多