将wordpress安装到新域后,我遇到了错误。我已经联系了主题开发人员并且没有解决问题的运气。
我复制图像链接时收到以下错误:
Warning: touch() [function.touch]: Utime failed: Permission denied in /home/domain/public_html/wp-content/themes/folioway/core/thumb.php on line 190 Warning: Cannot modify header information - headers already sent by (output started at /home/domain/public_html/wp-content/themes/folioway/core/thumb.php:190) in /home/domain/public_html/wp-content/themes/folioway/core/thumb.php on line 413 A TimThumb error has occured The following error(s) occured: Could note create the index.html file. Query String : src=/wp-content/uploads/2012/03/CoffeetabeBox-custom_web1.jpg&w=187&h=187&zc=1&q=90 TimThumb version : 2.8.2
除了一些CSS,我没有修改任何其他内容。
缩略图不会出现在页面上,但是,图像确实出现在灯箱中。
我已将缓存文件夹的权限设置为777,但这还没有解决问题。
任何帮助都会非常感激。谢谢。
它也发生在我身上,这是第二次!
如果您没有时间发现原因,但想要保持工作,只需重命名或删除/ cache文件夹;然后,创建一个全新的/缓存文件夹,将权限设置为777,它将再次工作。
在
src=/wp-content/uploads/2012/03/CoffeetabeBox-custom_web1.jpg&w=187&h=187&zc=1&q=90
试试把'?'在.jpg和&w之间,所以它会是这样的
src=/wp-content/uploads/2012/03/CoffeetabeBox-custom_web1.jpg?&w=187&h=187&zc=1&q=90
我发现这个引用的缓存文件夹是与timthumb.php在同一文件夹中的文件夹 - 找到该文件和相关的缓存文件夹,并给予缓存文件夹777权限。
如果您使用的是基于Linux的服务器,
首先从配置文件中找到FILE_CACHE_DIRECTORY(例如在linux服务器中打开vi commond中的文件)
vi /system/web/esupu/wp-content/themes/gadgetry-parent/framework/timthumb/timthumb-config.php
它可能会像
define('FILE_CACHE_DIRECTORY', '../../cache/');
因此我们将缓存文件夹所有权更改为用户“www-data”,这是运行此php代码的Apache Web服务器的默认用户,
sudo chown -hR www-data:www-data /system/web/esupu/wp-content/themes/gadgetry-parent/cache/
此外,现在更好地检查文件夹是否也可写(chmod权限为777)
而不是像其他人建议的那样使用777,而是使用755到/ cache文件夹。
我只是删除缓存文件夹并刷新代码所在的页面,它开始工作。我认为这是文件许可的问题。
已发送的标头通常是文件开头或结尾的空格的一个症状 - 检查timthumb.php并确保在此之前没有空白行或空格
另一种可能性是/ wp-content / uploads /不能被Web服务器写入,但是我会在第一个上找到原因。
我把它添加到php.ini文件中:
display_errors = Off
display_warnings = Off
output_buffering = On
TimThumb是一个独立的开源项目,被许多WP插件使用。
如果更新文件夹权限对您不起作用,另一个对我有用的解决方案是使用最新版本更新插件的TimThumb脚本。你可以在这里下载:https://timthumb.googlecode.com/svn/trunk/timthumb.php
在我的情况下,此文件位于wp-content / plugins / events-manager / includes / thumbnails中
对于在使用FiatLux Wordpress Theme时遇到此问题的其他人,我在这里是解决方案:
*如果使用另一个Wordpress主题,则在wp-content中的该theme / plugins文件夹中找到TimThumb.php文件和相应的缓存文件夹