Page 1 of 2

Group table corrupted?

Posted: Thu May 19, 2005 2:48 am
by Moustacy
Template(s) used: mxNBA
Any and all MODs:
topics on index
number of posts since last visit
gender mod
shoutbox
last members that visited
quick reply
login automatically checked
resync forum stats
move & lock
custom post color
advanced private message system
Do you use a port of phpBB: no
Version of phpBB: .15
Version of PHP: 4.3.11
Which database server and version: ?
Host: localhost
Did someone install this for you/who: I installed it
Is this an upgrade/from what to what: no
Is this a conversion/from what to what: no
Have you searched for your problem: yes
If so, what terms did you try: duplicate entries, double members
State the nature of your problem: members coming up double in usergroups and groups coming up double.
Do you have a test account for us: test/whatever

http://forum.moustacy.com/groupcp.php

my groups are coming up double and my members in the groups are coming up double if I delete one of the names it deletes both so how do I fix that or is it fixable?

Re: Group table corrupted?

Posted: Sat Mar 08, 2008 9:29 pm
by jsundqui
OK, I know this post is three years old, but I am experiencing the same problem after upgrading from 2.0.22 to 2.0.23

Did anyone have a solution. I see Moustacy got his problem fixed, although the test page is NSFW!

Re: Group table corrupted?

Posted: Sun Mar 09, 2008 12:07 am
by espicom
Place to start is with a repair of the tables, to make sure it isn't a screwed-up index. First link in my signature is a knowledge base article on how to do that.

Re: Group table corrupted?

Posted: Sun Mar 09, 2008 3:20 am
by jsundqui
Thanks for your suggestions.

I checked out your sig. I ran the commands you suggested in phpMyAdmin. no dice. I uploaded your script and ran it. It came back with OK's on all tables.

I tried running the old groupcp.php (version *.22) but got the same response.

I even put the groupcp.php file from the full 2.0.23 distribution into the directory in case the patches over the years missed something. But this didn't help (and in fact the file was identical).

The update_to_latest.php doesn't have anything for going from .22 to .23, so I don't think that was the problem either.

I hadn't checked groupcp.php for a while; maybe this happened before the upgrade. I just checked it now since this file was changed in the upgrade and I wanted to make sure it worked.

<scratches head>

Re: Group table corrupted?

Posted: Sun Mar 09, 2008 3:25 am
by ric323
jsundqui wrote:..
I tried running the old groupcp.php (version *.22) but got the same response, so it must have been the table update script for 22 > 23.
The "table update script" is update_to_latest.php, which as you saw yourself, does NOT touch that table.
(It doesn't touch any tables in this update, just changes the ersion number from ".0.22" to ".0.23")

Did you fix something else? I can't see the problem you describe right now.

Re: Group table corrupted?

Posted: Sun Mar 09, 2008 3:35 am
by jsundqui
I see you replied before I edited that sentence out! My bad. I wrote that, then checked the script and wrote the later sentence saying so, but for got to delete my previous sentence! :mrgreen:

I have not fixed anything else lately. I sure wish I had tried groupcp.php before I did the upgrade to see if it was related to that.

The last mod I did was just about a year ago, adding in an album mod. I know that groupcp.php worked well then as I added some groups who had access to uploading pictures. There have been no phpBB upgrades after that (it was already on .22 back then).

My hosting service has changed equipment since then. They had a failed kernel upgrade a week or so ago that required a restore from backup. They had a less recent version of the database than I did, so I had them restore the one I had so posts wouldn't go missing. That's enough stuff to have something go wrong, but aside from groupcp.php, the board is working flawlessly.

I duplicate my site on a local linux box where I check all updates before I do them on the "production" server. I did that this time, too, but didn't check the groupcp.php before I did the "production" update. The local mirror site exhibits the same doubling behavior.

Thanks.

Re: Group table corrupted?

Posted: Sun Mar 09, 2008 4:53 am
by ric323
Can you describe the problem again in more detail please?
I repeat, I've had a look around your group listings, and I cannot see ANY doubling.
Try doing it as a guest, just in case that is the difference.

Re: Group table corrupted?

Posted: Sun Mar 09, 2008 1:51 pm
by jsundqui
Actually, that site you are looking at is not my site. I was the second poster to this thread (I always check to see if someone had the same problem - and solution - before. This time I only found the problem).

My site is http://www.wnymba.org/index.php

the groupcp page is http://www.wnymba.org/groupcp.php

Now, all my groups are hidden so going there doesn't show anything.

...

OK, changed that and here's something interesting:

I added a new public group, "test". It doesn't show up as doubling.

When you log in as *not* the administrator, it shows just "test", and no doubling.

When I log in as administrator, it shows all the hidden groups as doubled, but then shows "test" as non doubled.

I will be busy today, but tonight, I will try to rebuild the index for the table from scratch. The other thing would be get rid of all the groups, and recreate them, which is not as big a job as it seems.

Re: Group table corrupted?

Posted: Mon Mar 10, 2008 1:26 am
by espicom
The fact that things show up twice as an admin may be a clue... did you recently edit any templates?

It is possible that the template has an error in it, and will display things twice - once as a user would see it, and the second time as an admin would see it. The program only found one of everything (and you can confirm this through phpmyadmin), but it displays twice, because two things match when it came time to interpret the template.

The following SQL query should show NO group_id with more than 1 hit, if there isn't a problem with the index:

Code: Select all

SELECT DISTINCT group_id, count( group_id ) AS hits FROM phpbb_groups GROUP BY group_id ORDER BY hits DESC

Re: Group table corrupted?

Posted: Mon Mar 10, 2008 1:47 am
by jsundqui
I ran the query, and the value for hits is "1" for all group_id's.

Haven't edited any templates recently. Last time I edited a template was when I added in the disclaimer at the top of the forum index page (index_body.tpl)

J.S.

Re: Group table corrupted?

Posted: Mon Mar 10, 2008 2:09 am
by espicom
Well, that confirms that it isn't a problem with the table itself, so we're down to programs. If you have a backup of the files from your site, give this a try....

Unzip everything from a clean copy of phpBB v2.0.23 to a directory on your hard drive. Delete config.php, the install/ and contrib/ directories, then upload the whole thing to your website, over the top of the existing programs. Yes, this will disable any MODs you have installed, but it will let us check one more thing in the chain, and this is why you want to have the backup of the existing files...

Test the board. If you're still seeing doubled user groups, then we've got some more digging to do, but, if the user groups are suddenly correct, we need to verify all the MOD edits that affect the group management files, which isn't just groupcp.php.

Re: Group table corrupted?

Posted: Mon Mar 10, 2008 2:38 am
by jsundqui
OK, I can give that try tomorrow.

As I mentioned earlier, I keep a mirror of the site on a linux box at home. That box exhibits the same behavior. I think I would prefer to try this there rather than on the production server. There's a new fresh 16 inches of snow on the ground and the folks on the board still don't cease talking about bicycling. I'll get skewered by them if I take it offline for a few days ;)

Re: Group table corrupted?

Posted: Tue Mar 11, 2008 2:37 am
by jsundqui
OK, gave that a try.

Got the default decorations, etc. after pasting over the clean 2.0.23 files.

However, still got duplicate entries on the groupcp.php!

This was on my mirror system on a linux box at home.

J.S.

Re: Group table corrupted?

Posted: Tue Mar 11, 2008 10:19 pm
by espicom
Hmm... Both the "main" system and test system use separate MySQL servers, correct?

Re: Group table corrupted?

Posted: Tue Mar 11, 2008 10:37 pm
by jsundqui
Yes, separate MySQL servers (each local to its respective box).

As I noted above, I had just done a database backup on the production server so I could load it onto my mirror to test the 22-23 upgrade with as close a mirror as possible (it's not truly a mirror, just snapshots updated periodically). Right after I made the database backup, my hosting company had some problems during a kernel upgrade and restored an older version of the database. I sent them back the backup I just made and they reloaded it.

So yes, different MySQL servers, but both running the same (or just-forked; I've gotten new posts) database *data* (and structure).