简体   繁体   English

有没有人遇到过这个php错误之前,警告:imagejpeg()?

[英]Has anyone come across this php error before, Warning: imagejpeg()?

Warning: imagejpeg() [function.imagejpeg]: Unable to open '/home/SITENAME/public_html/files/cache/052f225905c1618003df0c5088aec7a9.jpg' for writing: Permission denied in /home/SITENAME/public_html/concrete/helpers/image.php on line 172

I emptied the cache directory and still no luck, and if I change the permissions on the cache folder then I get another error and I can't use the site at all: 我清空缓存目录但仍然没有运气,如果我更改缓存文件夹的权限,那么我得到另一个错误,我根本无法使用该网站:

Warning: require_once(Zend/Cache/Backend/File.php) [function.require-once]: failed to open stream: No such file or directory in /home/MYACCOUNT/public_html/concrete/libraries/3rdparty/Zend/Cache.php on line 133

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Cache/Backend/File.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/owen/php') in /home/MYACCOUNT/public_html/concrete/libraries/3rdparty/Zend/Cache.php on line 133

I don't get it? 我不明白吗? I've never had this problem before. 我以前从未遇到过这个问题。

Sounds like a permissions problem to me, but we can't tell from this end. 对我来说听起来像权限问题,但我们无法从这个角度说出来。

If you can FTP (or CD) into that /home/SITENAME/public_html/files/ 如果你可以FTP(或CD)进入/ home / SITENAME / public_html / files /

and see if 'files' is owned by, and has the same permissions as public_html 并查看'files'是否归其所有,并且具有与public_html相同的权限

Then see what permissions they NEED to have for your hosting setup. 然后查看他们需要为您的主机设置拥有哪些权限。

  1. Check that directory exists. 检查该目录是否存在。
  2. Check if web server daemon, most of the time - www-data, has write permissions to that particular directory. 检查Web服务器守护程序(大多数情况下是www-data)是否具有该特定目录的写入权限。

For future reference the problem was the PHP handler. 为了将来参考,问题是PHP处理程序。 It has been changed to CGI mode (as opposed to DSO) and they turned suEXEC 'off' - might be useful for someone down the line. 它已经改为CGI模式(而不是DSO),它们将suEXEC'关闭' - 可能对某些人有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM