PHP运行时异常

PHP运行时异常,php,runtime,Php,Runtime,我朋友拥有的一个网站出现问题,不再加载,我正在尝试帮助,但对PHP和网站了解不多 打开页面时出现的错误是 致命错误:未捕获异常“RuntimeException”并显示消息 中的“JLIB\u应用程序错误\u应用程序加载” /home/vandlar1/public_html/libraries/cms/application/cms.php:329堆栈 跟踪:#0 /home/vandlar1/public_html/libraries/joomla/factory.php(124): JAp

我朋友拥有的一个网站出现问题,不再加载,我正在尝试帮助,但对PHP和网站了解不多

打开页面时出现的错误是

致命错误:未捕获异常“RuntimeException”并显示消息 中的“JLIB\u应用程序错误\u应用程序加载” /home/vandlar1/public_html/libraries/cms/application/cms.php:329堆栈 跟踪:#0 /home/vandlar1/public_html/libraries/joomla/factory.php(124): JApplicationCms::getInstance('site')#1 /home/vandlar1/public_html/index.php(38): JFactory::getApplication('site')#2{main}已抛出 /home/vandlar1/public_html/libraries/cms/application/cms.php在线 329

在它引用的PHP文件中,这是函数

public static function getInstance($name = null)
    {
        if (empty(static::$instances[$name]))
        {
        // Create a JApplicationCms object.
        $classname = 'JApplication' . ucfirst($name);

        if (!class_exists($classname))
        {
            throw new RuntimeException(JText::sprintf('JLIB_APPLICATION_ERROR_APPLICATION_LOAD', $name), 500);
        }

        static::$instances[$name] = new $classname;
    }

    return static::$instances[$name];
}

根据我的经验,我没有处理过太多的运行时错误,因此非常感谢您的帮助。

对Joomla了解不多,但该函数似乎正在尝试查找名为
JApplicationSite
的类,但未能找到它。这可能是一个自动加载问题,即应用程序不知道在哪里查找文件/类。或者可能是类不存在。

如果方法中的所有代码都要求设置参数,那么为什么参数
$name
是可选的(defaultet为null)?但那可能是Joomla代码?我不确定,这是go daddy网站的代码。我遇到的第一个错误是:警告:require_once(/home/vandlar1/public_html/libraries/cms.php):无法打开流:第44行的/home/vandlar1/public_html/includes/framework.php中没有这样的文件或目录致命错误:require_once():打开所需的“/home/vandlar1/public_html/libraries/cms.php”(include_path=”:/usr/lib/php:/usr/local/lib/php')失败在framwork.php的第44行的/home/vandlar1/public_html/includes/framework.php中,它正在尝试引导cms目录中的cms库。我看到的问题是在libraries目录中没有cms.php,但在libraries/cms/应用程序中有一个,因此我扩展了该文件的路径,导致了运行时错误例外情况。这可能会有所帮助:看起来其他人在使用旧版本的PHP从Joomla 1.7升级到2.5后遇到了这个问题。不确定您/您的朋友是否尝试升级或注意到?我看到,该网站使用的joomla是3.2.3,当我尝试更新它时,它表示服务器不符合要求。PHP版本是5.5。至于他们试图更新jooma,他们还没有,但不知道它是否会自动更新jooma。