2

我的 wordpress 工作正常,然后突然我的图像不再显示了。它们显示为损坏的图像。我禁用了插件,更改了主题,更改了文件权限,但它确实解决了我的问题。 网络错误 图片未加载示例

服务器错误日志

    [Thu May 11 17:02:42 2017] [crit] [client 96.43.225.68] [host afaccra.org] (13)Permission denied: /homez.47/afaccraons/www/wp-content/uploads/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, 
    [Thu May 11 17:02:42 2017] [crit] [client 96.43.225.68] [host afaccra.org] (13)Permission denied: /homez.47/afaccraons/www/wp-content/uploads/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, 
    [Thu May 11 17:02:42 2017] [crit] [client 96.43.225.68] [host afaccra.org] (13)Permission denied: /homez.47/afaccraons/www/wp-content/uploads/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, 
    [Thu May 11 17:02:42 2017] [crit] [client 96.43.225.68] [host afaccra.org] (13)Permission denied: /homez.47/afaccraons/www/wp-content/uploads/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, 
[Thu May 11 19:45:06 2017] [error] [client 197.234.219.17] [host afaccra.org] (104)Connection reset by peer: FastCGI: comm with server "/homez.47/afaccraons/www/wp-admin/admin-ajax.php" aborted: read failed, referer: http://afaccra.org/wp-admin/tools.php?page=regenerate-thumbnails
[Thu May 11 19:45:06 2017] [error] [client 197.234.219.17] [host afaccra.org] FastCGI: incomplete headers (0 bytes) received from server "/homez.47/afaccraons/www/wp-admin/admin-ajax.php", referer: http://afaccra.org/wp-admin/tools.php?page=regenerate-thumbnails

我真的不知道该怎么办了。这个问题有什么解决方法吗?

4

3 回答 3

0

这是一个权限问题。您需要确保执行脚本的用户对路径中的所有文件夹和文件具有读取权限。这不应该花费超过半小时,只要确保您没有对文件夹授予太多权限(例如,访客不应该能够访问它们)。另外,请确保路径正确。

于 2017-05-12T13:47:40.790 回答
0

如果通过 CHMOD 更改文件或文件夹的权限不起作用,请尝试使用 chown 命令更改或添加用户/组的权限。如果您无法通过 SSH 访问来执行此操作,请联系您的托管技术支持。

于 2017-05-12T16:38:11.497 回答
0

首先检查在媒体库中上传图像是否可见。如果它不可见,请尝试这些命令。

还要检查 apache 是否可以读取 htaccess 文件:chmod 644 /var/www/abc/.htaccess

然后它所在的目录是可读和可执行的: chmod 755 /var/www/abc/

于 2017-05-12T06:19:14.327 回答