0
将我的本地服务器迁移到远程后,出现上述错误。我已经升级了最新的2.5.10的joomla,我仍然得到相同的错误。 请问我该如何解决这个问题? 下面是一行代码71找不到类'JFactory'/httpdocs/libraries/joomla/session/storage/database.php on line 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安装? – Tom 2013-04-25 01:22:54
是的,我的Db运行平稳,后端正在正常工作。 – jking 2013-04-25 03:10:38
不知道。也许损坏的文件...似乎不太可能与错误。但不会再伤害升级。 – Tom 2013-04-25 03:35:08