将本地服务器迁移到远程后,我收到上述错误。我用最新的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;
}
}
答案 0 :(得分:1)
解决此问题的唯一方法是安装一个新的joomla并重新开始。我尝试升级,甚至下载新的2.5.10升级文件,因为当时我的旧joomla是2.5.9仍然没有发生。
我所做的就是创建一个新数据库并重新安装joomla。