Advertisement
Error: Duplicate entry '1-' for key 'whosonline'
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.
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.
-
- Joomla! Fledgling
- Posts: 3
- Joined: Thu Jan 16, 2014 8:37 pm
Error: Duplicate entry '1-' for key 'whosonline'
HI everyone
I just tried to log into joomla admin to find an error
Duplicate entry '1-' for key 'whosonline' SQL=INSERT INTO
Non of the pages are working.
The website hasn't been moved or anything, everything was working fine when I logged in last.
What has caused this error? How can I fix it?
Hope someone can help me.
Many thanks
I just tried to log into joomla admin to find an error
Duplicate entry '1-' for key 'whosonline' SQL=INSERT INTO
Non of the pages are working.
The website hasn't been moved or anything, everything was working fine when I logged in last.
What has caused this error? How can I fix it?
Hope someone can help me.
Many thanks
Advertisement
- dpacadmin
- Joomla! Champion
- Posts: 6029
- Joined: Sat Aug 16, 2008 1:46 pm
- Location: the Bat Cave
- Contact:
Re: Error: Duplicate entry '1-' for key 'whosonline'
Backup your database then try doing a repair and optimize on your database and see if that helps. If you do not know how ask your Host to do it.
-
- Joomla! Fledgling
- Posts: 3
- Joined: Thu Jan 16, 2014 8:37 pm
Re: Error: Duplicate entry '1-' for key 'whosonline'
Many thanks. I will do. What causes this error? Or does it just happen?
-
- Joomla! Fledgling
- Posts: 3
- Joined: Thu Jan 16, 2014 8:37 pm
Re: Error: Duplicate entry '1-' for key 'whosonline'
Many thanks for your help repair and optimize did the trick!
Thanks again
Thanks again
- dpacadmin
- Joomla! Champion
- Posts: 6029
- Joined: Sat Aug 16, 2008 1:46 pm
- Location: the Bat Cave
- Contact:
Re: Error: Duplicate entry '1-' for key 'whosonline'
Don't know what caused it, sometimes files can become corrupt on a server too. Probably bad sectors on the drive. Glad you were able to fix it.
- TheWebGuy
- Joomla! Enthusiast
- Posts: 135
- Joined: Wed Oct 03, 2007 10:39 pm
Re: Error: Duplicate entry '1-' for key 'whosonline'
I would like to know the cause of this error as it appears I have the same issue:
Duplicate entry '1-' for key 'whosonline' SQL=INSERT INTO `web_session` (`session_id`, `client_id`, `time`) VALUES ('230ed55f2a435a2329813d323e2c4985', 0, '1391633281')
This issue only arises when I have a certain surge in traffic due to advertising (like over 500 visitors at one time).
I know I can go into the database through phpadmin and do table web_session repair to put my site back up. But that is not the solution to the actual cause of the issue. It is only a band-aid.
Does anyone know what actually causes this to happen and how to fix it so it never happens?
I have spent the last week researching this issue and all I've seen is "How to repair"
I need to know how to stop this from happening.
Please, I would appreciate any advice on this issue, anyone?
Duplicate entry '1-' for key 'whosonline' SQL=INSERT INTO `web_session` (`session_id`, `client_id`, `time`) VALUES ('230ed55f2a435a2329813d323e2c4985', 0, '1391633281')
This issue only arises when I have a certain surge in traffic due to advertising (like over 500 visitors at one time).
I know I can go into the database through phpadmin and do table web_session repair to put my site back up. But that is not the solution to the actual cause of the issue. It is only a band-aid.
Does anyone know what actually causes this to happen and how to fix it so it never happens?
I have spent the last week researching this issue and all I've seen is "How to repair"
I need to know how to stop this from happening.
Please, I would appreciate any advice on this issue, anyone?
I know it's better to teach a man to fish...but if that man is starving, he'll die before he catches a fish. So do him a favor, feed him first...then teach him to fish.
-
- Joomla! Fledgling
- Posts: 2
- Joined: Fri Dec 18, 2009 8:11 pm
Re: Error: Duplicate entry '1-' for key 'whosonline'
I have the same problem, sometimes in 'whosonline' and sometimes 'sessions' tables.
Every time i need to empty the tables and repair database!
any help with this issue!
Every time i need to empty the tables and repair database!
any help with this issue!
-
- Joomla! Apprentice
- Posts: 9
- Joined: Sun Oct 19, 2008 3:48 pm
Re: Error: Duplicate entry '1-' for key 'whosonline'
We are having a similar issue on one of our sites. Exact same thing. Has anyone ever come up with a WHY it happens and a permanent fix?
-
- Joomla! Apprentice
- Posts: 10
- Joined: Tue Mar 20, 2007 11:30 pm
- Location: USA, Miami, FL
Re: Error: Duplicate entry '1-' for key 'whosonline'
I just had the same issue with my site. The backup and repair fixed this issue but this can cause my site to go down anytime. I've had no luck yet with finding the cause of this issue.
-
- Joomla! Apprentice
- Posts: 10
- Joined: Thu Nov 20, 2014 3:52 pm
Re: Error: Duplicate entry '1-' for key 'whosonline'
Hello, Ive got the same problem:
Duplicate entry '1-' for key 'whosonline' SQL=INSERT INTO `api8o_session` (`session_id`, `client_id`, `time`) VALUES ('7m3500eqb1897ngoh7c7689ic4', 0, '1416498649')
Google said that I should clear, repair and optimise the table "session", but it does not work for me.
How do I update joomla when administrator panel does not work? <the same problem>
Is there any other solution?
Jonek
Duplicate entry '1-' for key 'whosonline' SQL=INSERT INTO `api8o_session` (`session_id`, `client_id`, `time`) VALUES ('7m3500eqb1897ngoh7c7689ic4', 0, '1416498649')
Google said that I should clear, repair and optimise the table "session", but it does not work for me.
How do I update joomla when administrator panel does not work? <the same problem>
Is there any other solution?
Jonek
- Per Yngve Berg
- Joomla! Master
- Posts: 31288
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: Error: Duplicate entry '1-' for key 'whosonline'
The database must be repaired in a database administration tool like phpmyadmin.
Note: Joomla 1.5 went EOL several years ago and there are no more updates for it.
Note: Joomla 1.5 went EOL several years ago and there are no more updates for it.
- dpacadmin
- Joomla! Champion
- Posts: 6029
- Joined: Sat Aug 16, 2008 1:46 pm
- Location: the Bat Cave
- Contact:
Re: Error: Duplicate entry '1-' for key 'whosonline'
To clear the table run this in a query window
truncate table api8o_session
This will remove any data from the table, then try a repair and optimize on it.
truncate table api8o_session
This will remove any data from the table, then try a repair and optimize on it.
-
- Joomla! Apprentice
- Posts: 10
- Joined: Thu Nov 20, 2014 3:52 pm
Re: Error: Duplicate entry '1-' for key 'whosonline'
Hello, thanks for your replies.
I used phpmyadmin to delete data from table(earlier).
I just cleared that table once again, just like dpacadmin suggested, but again - no difference.
Im totally new in joomla and databases and the site is down for 3 days, so ill be grateful if you could help me.
Some more information:
1. In my phpmyadmin I see red error on the bottom the screen, it says:
"Połączenie dla użytkownika kontrolnego zdefiniowanego w pliku konfiguracyjnym nie powiodło się."
which, I think, in English means:
"Connection for control user defined in configuration file didnt succeed.
2. The site worked well for a looong time, then it went down cos of some filesystem problems and got recovered from backup (10 days earlier). The site worked fine for a few hours, and then went down with message I posted earlier.
If u need any other info, tell me, Im kinda desperate now.
Thanks
Jonek
I used phpmyadmin to delete data from table(earlier).
I just cleared that table once again, just like dpacadmin suggested, but again - no difference.
Im totally new in joomla and databases and the site is down for 3 days, so ill be grateful if you could help me.
Some more information:
1. In my phpmyadmin I see red error on the bottom the screen, it says:
"Połączenie dla użytkownika kontrolnego zdefiniowanego w pliku konfiguracyjnym nie powiodło się."
which, I think, in English means:
"Connection for control user defined in configuration file didnt succeed.
2. The site worked well for a looong time, then it went down cos of some filesystem problems and got recovered from backup (10 days earlier). The site worked fine for a few hours, and then went down with message I posted earlier.
If u need any other info, tell me, Im kinda desperate now.
Thanks
Jonek
- Per Yngve Berg
- Joomla! Master
- Posts: 31288
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: Error: Duplicate entry '1-' for key 'whosonline'
In Phpmyadmin, select the table api8o_session and do the "Repair" Command.
- dpacadmin
- Joomla! Champion
- Posts: 6029
- Joined: Sat Aug 16, 2008 1:46 pm
- Location: the Bat Cave
- Contact:
Re: Error: Duplicate entry '1-' for key 'whosonline'
You have not provided a url to the problem site.
In the error message you posted I see this is being added to the table;
"whosonline"
this is not part of the default Joomla 1.5 session table. I would guess you have a plugin or extension adding this to the table. It would seem whatever is adding it is the cause of the crash. If you can determine what is adding it you can disable it in the "_plugins" table by setting published to "0"(zero). If it is a component you will need to set enabled to 0 for that component in the "_components" table.
In the error message you posted I see this is being added to the table;
"whosonline"
this is not part of the default Joomla 1.5 session table. I would guess you have a plugin or extension adding this to the table. It would seem whatever is adding it is the cause of the crash. If you can determine what is adding it you can disable it in the "_plugins" table by setting published to "0"(zero). If it is a component you will need to set enabled to 0 for that component in the "_components" table.
- Per Yngve Berg
- Joomla! Master
- Posts: 31288
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: Error: Duplicate entry '1-' for key 'whosonline'
"whosonline" is a index key on the core #_session table. Only the Primary Key should be Unique.
The indexes "whosonline", "userid" and "time" shall not be unique.
The indexes "whosonline", "userid" and "time" shall not be unique.
- dpacadmin
- Joomla! Champion
- Posts: 6029
- Joined: Sat Aug 16, 2008 1:46 pm
- Location: the Bat Cave
- Contact:
Re: Error: Duplicate entry '1-' for key 'whosonline'
Hi Per Yngve Berg,
I'm not good enough with SQL to know how keys work, so you are saying something is trying to save a cookie with the whoisonline data to the session table? Do you know if this is a Joomla 1.5 function or part of a plugin or added extension? Will disabling it stop the error?
I'm not good enough with SQL to know how keys work, so you are saying something is trying to save a cookie with the whoisonline data to the session table? Do you know if this is a Joomla 1.5 function or part of a plugin or added extension? Will disabling it stop the error?
-
- Joomla! Apprentice
- Posts: 10
- Joined: Thu Nov 20, 2014 3:52 pm
Re: Error: Duplicate entry '1-' for key 'whosonline'
I disabled the extension <didnt help>
Ive found this entry in api8o_extensions:
http://imgur.com/d7LMXl1
manifest_cache: <dont know if it will help>
{"legacy":false,"name":"mod_whosonline","type":"module","creationDate":"July 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved.","authorEmail":"[email protected]","authorUrl":"www.joomla.org","version":"2.5.0","description":"MOD_WHOSONLINE_XML_DESCRIPTION","group":""}
Ive found this entry in api8o_extensions:
http://imgur.com/d7LMXl1
manifest_cache: <dont know if it will help>
{"legacy":false,"name":"mod_whosonline","type":"module","creationDate":"July 2004","author":"Joomla! Project","copyright":"Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved.","authorEmail":"[email protected]","authorUrl":"www.joomla.org","version":"2.5.0","description":"MOD_WHOSONLINE_XML_DESCRIPTION","group":""}
- dpacadmin
- Joomla! Champion
- Posts: 6029
- Joined: Sat Aug 16, 2008 1:46 pm
- Location: the Bat Cave
- Contact:
Re: Error: Duplicate entry '1-' for key 'whosonline'
If you have a Joomla 1.5 install it could be that the database got mixed up with another Joomla 2.5 or 3 site. Since Joomla 1.5 doesn't have an extensions table but 2.5 and 3 do you should try posting in the 2.5 or 3 forum. They may have already found a fix for your error.
-
- Joomla! Apprentice
- Posts: 10
- Joined: Thu Nov 20, 2014 3:52 pm
Re: Error: Duplicate entry '1-' for key 'whosonline'
Ye, Im sorry, but im not sure which joomla version I do have ^^" how can I check it if the site is down? Ive got access to VPS server root if neccessary.
<the site worked well for... 3 or 4 years on this configuration>
No other ideas guys?:)
#EDIT:
Ive found readme file on my server which starts from:
1- What is this?
* This is a Joomla! installation/upgrade package to version 2.5.x
So im omw to Joomla 2.5 forum. Thanks guys for your help!
<the site worked well for... 3 or 4 years on this configuration>
No other ideas guys?:)
#EDIT:
Ive found readme file on my server which starts from:
1- What is this?
* This is a Joomla! installation/upgrade package to version 2.5.x
So im omw to Joomla 2.5 forum. Thanks guys for your help!
- Per Yngve Berg
- Joomla! Master
- Posts: 31288
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: Error: Duplicate entry '1-' for key 'whosonline'
You cannot upgrade from 1.5 to 2.5 with an upgrade package. Data have to be migrated from the 1.5 install to the 2.5 install using the extension SPUpgrade, Jupgrade or J2XML.
Advertisement