Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
CJ Webmaster Forums Forum Index -> PHP Scripts » CJ Users Online

   
ERROR: Duplicate entry '1112879391' for key 1
View previous topic :: View next topic  
Author Message
cbl



Joined: 07 Apr 2005
Posts: 5

Posted: Thu Apr 07, 2005 1:10 pm    Post subject: ERROR: Duplicate entry '1112879391' for key 1

When I load users.php it shows "2 users online", when I reload again it shows "Duplicate entry '1112879391' for key 1". Same after reloading for about 10 times. The correct line is shown or the error.

How can I fix this?
Back to top
darkcarnival
CJ-Design.com Moderator



Joined: 10 Jul 2003
Posts: 1104
Location: Michigan

Posted: Thu Apr 07, 2005 3:46 pm    Post subject:

thats odd Confused

could you show a link plz
_________________
List of Mods to James Scripts!
http://www.cj-design.com/forum/viewtopic.php?t=1798

give me some input on my current project
http://metalstation1.com/ebb.php

Elite Bulletin Board, comming soon!
Back to top
cbl



Joined: 07 Apr 2005
Posts: 5

Posted: Thu Apr 07, 2005 6:03 pm    Post subject:

Main site is Coolios Babelog and here's user.php.
CJusers is NOT yet added to the main site.

Just do 10 reloads of users.php and you'll see the problem.
Back to top
darkcarnival
CJ-Design.com Moderator



Joined: 10 Jul 2003
Posts: 1104
Location: Michigan

Posted: Thu Apr 07, 2005 8:15 pm    Post subject:

yea i see it Sad

and thats very odd Confused
_________________
List of Mods to James Scripts!
http://www.cj-design.com/forum/viewtopic.php?t=1798

give me some input on my current project
http://metalstation1.com/ebb.php

Elite Bulletin Board, comming soon!
Back to top
cbl



Joined: 07 Apr 2005
Posts: 5

Posted: Sun Apr 10, 2005 11:50 am    Post subject:

So not yet any idea how to solve this Sad
Back to top
darkcarnival
CJ-Design.com Moderator



Joined: 10 Jul 2003
Posts: 1104
Location: Michigan

Posted: Sun Apr 10, 2005 1:40 pm    Post subject:

ill be honest when i say that shouldnt be happening.

did you edit anything(besides the config file)
_________________
List of Mods to James Scripts!
http://www.cj-design.com/forum/viewtopic.php?t=1798

give me some input on my current project
http://metalstation1.com/ebb.php

Elite Bulletin Board, comming soon!
Back to top
cbl



Joined: 07 Apr 2005
Posts: 5

Posted: Fri Apr 15, 2005 4:53 pm    Post subject:

Offcourse not! Why should I do that...
Back to top
GodfatherUK
CJ-Design.com Moderator



Joined: 17 Sep 2004
Posts: 190
Location: UK

Posted: Fri Apr 15, 2005 7:19 pm    Post subject:

I suggest you make a full backup of all your UserOnline files. Then download a new copy of it.. and do the following:

Open setup.php

find
Code:

  timestamp int(15) NOT NULL default '0',


change to

Code:

  timestamp mediumint(15) NOT NULL default '0',


Run the setup file to re-install the useronline and see if that helps
_________________
GodfatherUK
CJ Designs Forum Moderator

"I dont think i am good at coding.. But i KNOW im good at helping"
Back to top
cbl



Joined: 07 Apr 2005
Posts: 5

Posted: Sun Apr 24, 2005 5:01 pm    Post subject:

No that didn't work. I'm not a program-expert, but why change anything in the setup if that did give me an error? It's the users.ph file that continously gives the error.
Back to top
darkcarnival
CJ-Design.com Moderator



Joined: 10 Jul 2003
Posts: 1104
Location: Michigan

Posted: Sun Apr 24, 2005 8:50 pm    Post subject:

cbl, i honestly have to say this is a very odd problem and nornally doesnt happen.

i know thats no help at all but if you didnt edit the user file then thats not the problem.

ok i got an idea

ok in the set-up file replace:
Code:

$sql = "CREATE TABLE CJ_UsersOnline (
  timestamp int(15) NOT NULL default '0',
  ip varchar(40) NOT NULL,
  FILE varchar(100) NOT NULL,
  PRIMARY KEY  (timestamp),
  KEY ip (ip),
  KEY FILE (FILE)
) TYPE=MyISAM";


Code:

$sql ="CREATE TABLE `CJ_UsersOnline` (
  `timestamp` int(5) NOT NULL default '0',
  `ip` varchar(40) NOT NULL default '',
  `FILE` varchar(100) NOT NULL default ''
) TYPE=MyISAM";


this should fix that problem, delete the current table made and run setup.php again.

i believe this will solve this issue
_________________
List of Mods to James Scripts!
http://www.cj-design.com/forum/viewtopic.php?t=1798

give me some input on my current project
http://metalstation1.com/ebb.php

Elite Bulletin Board, comming soon!
Back to top
James
CJ-Design.com Admin



Joined: 08 Nov 2002
Posts: 798
Location: UK

Posted: Fri May 06, 2005 10:16 am    Post subject:

Hi,

Are you still getting the problem? From what I have read, it seems as though your MySQL connection is being opened twice and in doing so is running the same query twice practically at the same time.

If you are still getting the error, please let me know.
_________________
CJ Website Design Developer
Web Design - http://www.cj-design.com
Web Hosting - http://www.cj-hosting.com
Back to top
mawk



Joined: 30 Aug 2005
Posts: 1

Posted: Tue Aug 30, 2005 7:12 pm    Post subject:

i am also getting this error...i didnt edit anything.
Back to top
Display posts from previous:   
       CJ Webmaster Forums Forum Index -> PHP Scripts » CJ Users Online All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional, Mods by CJ Website Design