类& # 39;JFactory& # 39;在/httpdocs/libraries/joomla/session/s


Class 'JFactory' not found /httpdocs/libraries/joomla/session/storage/database.php on line 71

迁移本地服务器到远程服务器后,我得到上述错误。我已经用最新的2.5.10升级了joomla,我仍然得到同样的错误。请问我该如何解决这个问题?下面是第71行

的代码
public function write($id, $data)
{
    // Get the database connection object and verify its connected.
    $db = JFactory::getDbo();//Line 71
    if (!$db->connected())
    {
        return false;
    }
    try
    {
        $query = $db->getQuery(true);
        $query->update($db->quoteName('#__session'))
        ->set($db->quoteName('data') . ' = ' . $db->quote($data))
        ->set($db->quoteName('time') . ' = ' . $db->quote((int) time()))
        ->where($db->quoteName('session_id') . ' = ' . $db->quote($id));
        // Try to update the session data in the database table.
        $db->setQuery($query);
        if (!$db->execute())
        {
            return false;
        }
        /* Since $db->execute did not throw an exception, so the query was successful.
        Either the data changed, or the data was identical.
        In either case we are done.
        */
        return true;
    }
    catch (Exception $e)
    {
        return false;
    }
}

解决这个问题的唯一方法是安装一个新的joomla并重新开始。我试着升级,甚至下载了新的2.5.10升级文件,因为当时我的旧joomla是2.5.9,仍然没有任何反应。

我所做的就是创建一个新的数据库并重新安装joomla