0

将本地服务器迁移到远程后,出现上述错误。我已经用最新的 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;
    }
}
4

1 回答 1

1

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

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

于 2013-04-25T10:58:58.607 回答