Fatal error in sessions table: J2.5.19

General questions relating to Joomla! 2.5. Note: All 1.6 and 1.7 releases have reached end of life and should be updated to 2.5. There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Post Reply
Suge
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Tue Nov 29, 2011 4:25 pm

Fatal error in sessions table: J2.5.19

Post by Suge » Thu May 06, 2021 7:24 pm

Hello,

Currently working with a production site using 2.5.19 and we suddenly received the following fatal error on our homepage:

Duplicate entry 'odi6ccrbmhrqbbu5not9dqq4v0' for key 'PRIMARY' SQL=INSERT INTO `jos_session` (`session_id`, `client_id`, `time`) VALUES ('odi6ccrbmhrqbbu5not9dqq4v0', 0, '1620301575')
This error only occurs on the homepage so we're able to access every other page of the website.

What we've tried:

1. Fixing the database from the Extensions Manager in the admin panel
2. Optimizing, repairing, truncating the sessions table in PHP MyAdmin
3. Using code from the following tracker
4. Clearing Joomla and browser cache
5. Dropping the sessions table and creating it again

As the error only occurs on the home page, we're able to employ a degree of damage limitation and switch the home page in the menu item. However, this doesn't rectify the issue and is only a sticking plaster to the problem.

We had a similar issue in March. I'd like to say we resolved it ourselves but the issue seemed to correct itself after 20 hours or so. Obviously, now this is happening again we now need to look into the problem a little deeper.

My analysis is somewhat of a novice but, as the issue is strictly related to the homepage, I've been looking into the "includes" folder to see why the page is dying. There is some code somewhere displaying the error code and then shutting down all other code.

I've attempted to resolve this by using a php function called "register_shutdown_function" which will execute a function when a fatal error occurs. Again, I've had no luck so far in employing this method.

Any help would be very welcome.

User avatar
AMurray
Joomla! Champion
Joomla! Champion
Posts: 6774
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Fatal error in sessions table: J2.5.19

Post by AMurray » Thu May 06, 2021 9:42 pm

If you can do so, perhaps update it to 2.5.28, or restore from a backup of the site where the error had not occurred? Make sure you do another backup before attempting any update.

Note that 2.5.x is no longer supported (since 2014), as the forum heading states. ("Joomla versions which are End of Life".)
Regards - A Murray


Post Reply

Return to “General Questions/New to Joomla! 2.5”