[英]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。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.