简体   繁体   中英

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

After migrating my local server to remote i get the above error. I have upgraded the joomla with the latest 2.5.10, am still getting the same error. Please How can i resolve this? Below is the code 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;
    }
}

The only solution to this problem is to install a fresh joomla and start again. I tried to upgrade, even download the new 2.5.10 upgrade file, because at that time my old joomla was 2.5.9 still nothing happened.

All i did was to create a new database and install joomla afresh.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM