【问题标题】:Access forbidden in MagentoMagento 禁止访问
【发布时间】:2012-05-22 18:02:41
【问题描述】:

你能帮帮我吗,

我正在尝试从 media/customer/ 文件夹中访问直接图像文件,但它的内容类似于

Access forbidden!

您无权访问请求的对象。它要么是读保护的,要么是服务器不可读的。

如果您认为这是服务器错误,请联系网站管理员。

错误 403

本地主机 2012 年 5 月 15 日 14:13:26 Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1

请帮忙!!我知道,这不是 xampp 的错误,它来自 magento,请帮帮我

提前多谢

【问题讨论】:

    标签: magento xampp


    【解决方案1】:

    我敢怀疑,这条消息是由 Magento 制作的。

    它与 XAMPP 的默认 xampp/apache/error/HTTP_FORBIDDEN.html.var 完全一样:

    Content-language: en
    Content-type: text/html; charset=ISO-8859-1
    Body:----------en--
    <!--#set var="TITLE" value="Access forbidden!"
    --><!--#include virtual="include/top.html" -->
    
      <!--#if expr="$REDIRECT_URL = /\/$/" -->
    
        You don't have permission to access the requested directory.
        There is either no index document or the directory is read-protected.
    
      <!--#else -->
    
       You don't have permission to access the requested object.
       It is either read-protected or not readable by the server.
    
      <!--#endif -->
    
    <!--#include virtual="include/bottom.html" -->
    ----------en--
    

    不幸的是,您没有写任何关于您的代码如何尝试访问图像的内容。

    请贴出相关代码部分。

    请在 Apache error_log 中找到正确的 403 消息并发布。

    【讨论】:

      【解决方案2】:

      您应该检查媒体文件夹中的权限设置。

      【讨论】:

        【解决方案3】:

        看起来安装 Magento 的目录没有访问 Magento 目录的权限。这是 Apache 错误,而不是 Magento 错误。

        【讨论】: