【问题标题】:Can access joomla via ip but not through domain (Warning: require_once error)可以通过 ip 访问 joomla 但不能通过域(警告:require_once 错误)
【发布时间】:2015-01-08 03:03:55
【问题描述】:

突然间我的client's sites stopped working之一

错误:

警告:require_once(/home/logosist/public_html/includes/defines.php):无法打开流:第 18 行的 /home/logosist/public_html/index.php 中没有这样的文件或目录

致命错误:require_once(): 未能打开所需的 '/home/logosist/public_html/includes/defines.php' (include_path='.:/usr/lib/php:/usr/local/lib/php')在 /home/logosist/public_html/index.php 第 18 行

从报错可以看出是目录路径不对:

应该是

/home/public_html/logosist/includes/defines.php

而不是

/home/logosist/public_html/includes/defines.php

关于如何解决这个问题的任何想法?

【问题讨论】:

  • 打开您的index.php,查看第 18 行,从那里往回工作。
  • define('_JEXEC', 1); define('DS', DIRECTORY_SEPARATOR); if (file_exists(dirname(__FILE__) . '/defines.php')) { include_once dirname(__FILE__) . '/defines.php'; } if (!defined('_JDEFINES')) { define('JPATH_BASE', dirname(__FILE__)); require_once JPATH_BASE.'/includes/defines.php'; } require_once JPATH_BASE.'/includes/framework.php';
  • 这不是 index.php 文件的问题。 不要改变它!检查您的主机,看看他们是否更改了任何服务器设置。如果您的 Joomla 网站之前一直在工作并且突然出现问题,那么这不是您的错,而是与服务器相关的问题。还要确保您从不移动或编辑任何核心 Joomla 文件
  • 你确定路径不对吗?错误声称/home/logosist/public_html/ 是您的index.php 的路径,为什么您的includes/defines.php 文件会在其他地方?为了让大家明白这一点,defines.php 文件是否存在于该路径下? @Lodder我没有告诉他更改文件,我告诉他看看那里,这样他就可以学习排除故障。服务器相关问题是我的故障排除步骤中的最后一件事。这里没有考虑到太多其他变量。
  • @sjagr - 我知道你没有告诉他这样做。我确保他没有对其进行任何更改。很多人开始更改核心 Joomla 文件,然后想知道为什么他们的网站无法运行;)

标签: php joomla


【解决方案1】:

检查您的目录和文件访问权限。我不认为这是路径问题。我有相同的设置正确的权限解决了它。

【讨论】:

    猜你喜欢
    • 2022-01-14
    • 1970-01-01
    • 1970-01-01
    • 2011-07-17
    • 1970-01-01
    • 2015-09-02
    • 2018-03-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多