Page 1 of 1

Cannot redeclare user_get_id_name()

Posted: Fri Jan 22, 2010 6:49 pm
by denisesballs
Hey all,

I've moved a blog from one domain to another and imported the DB from 3.0.4 to 3.0.6 (data only, and only basic tables). Everything has been find, except today I noticed when I click ACP-Manage Groups or "The Team" link on the index page, I get this error:

Code: Select all

Fatal error: Cannot redeclare user_get_id_name() (previously declared in /var/www/newforum/includes/functions_user.php:27) in /var/www/newforum/includes/functions_user.php on line 82
What am I missing here?

Re: Cannot redeclare user_get_id_name()

Posted: Fri Jan 22, 2010 6:57 pm
by Lumpy Burgertushie
denisesballs wrote:Hey all,

I've moved a blog from one domain to another and imported the DB from 3.0.4 to 3.0.6 (data only, and only basic tables). Everything has been find, except today I noticed when I click ACP-Manage Groups or "The Team" link on the index page, I get this error:

Code: Select all

Fatal error: Cannot redeclare user_get_id_name() (previously declared in /var/www/newforum/includes/functions_user.php:27) in /var/www/newforum/includes/functions_user.php on line 82
What am I missing here?
you have an error in that file probably caused by a MOD . check the two lines and see what edits you did that are causing it.

robert

Re: Cannot redeclare user_get_id_name()

Posted: Fri Jan 22, 2010 7:00 pm
by denisesballs
I actually just dropped my imported php_groups table and recreated it from the default 3.0.6 schema. Seems to be working now.

Re: Cannot redeclare user_get_id_name()

Posted: Sat Feb 09, 2013 6:59 pm
by yamahar
Hi I am actually getting the same problem with a new board I have taken over, I have migrated it from vbulletin 4 and then to move from the host to a new host have restored a backup of that into a stock phpbb 3.0.11 no mods installed and changed the DB details in config.php , can anyone tell me how to fix this error ?

Fatal error: Cannot redeclare user_get_id_name() (previously declared in /home/bikesje/bikes.je/includes/functions_user.php:27) in /home/bikesje/bikes.je/includes/functions_user.php on line 82

Re: Cannot redeclare user_get_id_name()

Posted: Sat Feb 09, 2013 9:46 pm
by Oyabun1
What phpBB version was the imported database from?

Re: Cannot redeclare user_get_id_name()

Posted: Sat Feb 09, 2013 10:22 pm
by yamahar
I just took over the forum, converted from Vbulletin to a new install of PHP 3.0.11 on the same server.

Then I installed a new phpBB 3.0.11 on my new hosting company, took a backup on the old server uploaded and restored on the new server and then changed the DB details in config.php

Everything works fine except attachments, group membership of users in certain groups seems not to have come over properly and I get this error.

I don't really care about the attachments, it would be nice but not a show stopper if they are gone, but I would like to move the forum over tonight but I am worried about this error not being fixable.

Any thoughts would be helpful.

Re: Cannot redeclare user_get_id_name()

Posted: Sun Feb 10, 2013 1:21 am
by HGN
Could you run the following MySQL query in phpMyAdmin:

Code: Select all

SELECT group_id, group_name, group_type, group_colour FROM phpbb_groups
See Executing SQL Queries in phpMyAdmin

Re: Cannot redeclare user_get_id_name()

Posted: Sun Feb 10, 2013 9:12 am
by yamahar
Thanks for the help

2 Registered Users 0
3 Users Awaiting Email Confirmation 0
4 Users Awaiting Moderation 0
5 Super Moderators 0
6 vB3 - Administrators 0
7 Moderators 0
8 Banned Users 0
9 Active Imported Users 0
10 vB3 - GUESTS 0
12 vB3 - REGISTERED_COPPA 0
15 vB3 - BOTS 0
16 NEWLY_REGISTERED 0
17 GUESTS 3
18 REGISTERED 3
19 REGISTERED_COPPA 3
20 GLOBAL_MODERATORS 3 00AA00
21 ADMINISTRATORS 3 AA0000
22 BOTS 3 9E8DA7

Re: Cannot redeclare user_get_id_name()

Posted: Sun Feb 10, 2013 12:08 pm
by HGN
Could you also run this query:

Code: Select all

SELECT DISTINCT group_id FROM phpbb_user_group WHERE 1

Re: Cannot redeclare user_get_id_name()

Posted: Sun Feb 10, 2013 1:31 pm
by yamahar
Hi There, this is the only thing that gets output.

group_id
2
3
4
6
7
8
17
18
20
21
22

Re: Cannot redeclare user_get_id_name()

Posted: Sun Feb 10, 2013 3:13 pm
by HGN
Could you try this: rename the current table phpbb_groups in phpMyAdmin (Operations on the table) to e.g. phpbb_groups_org.
Than run this query to recreate the table and fill it again.

Code: Select all

# Table: 'phpbb_groups'
CREATE TABLE phpbb_groups (
   group_id mediumint(8) UNSIGNED NOT NULL auto_increment,
   group_type tinyint(4) DEFAULT '1' NOT NULL,
   group_founder_manage tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
   group_skip_auth tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
   group_name varchar(255) DEFAULT '' NOT NULL,
   group_desc text NOT NULL,
   group_desc_bitfield varchar(255) DEFAULT '' NOT NULL,
   group_desc_options int(11) UNSIGNED DEFAULT '7' NOT NULL,
   group_desc_uid varchar(8) DEFAULT '' NOT NULL,
   group_display tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
   group_avatar varchar(255) DEFAULT '' NOT NULL,
   group_avatar_type tinyint(2) DEFAULT '0' NOT NULL,
   group_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
   group_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
   group_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
   group_colour varchar(6) DEFAULT '' NOT NULL,
   group_sig_chars mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
   group_receive_pm tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
   group_message_limit mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
   group_max_recipients mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
   group_legend tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
   PRIMARY KEY (group_id),
   KEY group_legend_name (group_legend, group_name)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;


INSERT INTO phpbb_groups (group_id, group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES (17, 'GUESTS', 3, 0, '', 0, '', '', '', 5);
INSERT INTO phpbb_groups (group_id, group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES (18, 'REGISTERED', 3, 0, '', 0, '', '', '', 5);
INSERT INTO phpbb_groups (group_id, group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES (19, 'REGISTERED_COPPA', 3, 0, '', 0, '', '', '', 5);
INSERT INTO phpbb_groups (group_id, group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES (20, 'GLOBAL_MODERATORS', 3, 0, '00AA00', 1, '', '', '', 0);
INSERT INTO phpbb_groups (group_id, group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES (21, 'ADMINISTRATORS', 3, 1, 'AA0000', 1, '', '', '', 0);
INSERT INTO phpbb_groups (group_id, group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES (22, 'BOTS', 3, 0, '9E8DA7', 0, '', '', '', 5);
INSERT INTO phpbb_groups (group_id, group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES (16, 'NEWLY_REGISTERED', 3, 0, '', 0, '', '', '', 5);

INSERT INTO phpbb_groups (group_id, group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES (2, 'Registered Users', 0, 0, '', 0, '', '', '', 5);
INSERT INTO phpbb_groups (group_id, group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES (3, 'Users Awaiting Email Confirmation', 0, 0, '', 0, '', '', '', 5);
INSERT INTO phpbb_groups (group_id, group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES (4, 'Users Awaiting Moderation', 0, 0, '', 0, '', '', '', 5);
INSERT INTO phpbb_groups (group_id, group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES (6, 'vB3 - Administrators', 0, 0, '', 0, '', '', '', 5);
INSERT INTO phpbb_groups (group_id, group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES (7, 'Moderators', 0, 0, '', 0, '', '', '', 5);
INSERT INTO phpbb_groups (group_id, group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid, group_max_recipients) VALUES (8, 'Banned Users', 0, 0, '', 0, '', '', '', 5);

Re: Cannot redeclare user_get_id_name()

Posted: Sun Feb 10, 2013 5:39 pm
by yamahar
HGN, that seems to have worked a treat !

I am going to go live with the forum now (not really bothered that the attachments haven't come over)

There have been two forum posts since I made my convert, is there an easy way for me to extract them and import them or if not I will just tell the users to re-post.

Thanks again for your help.

Re: Cannot redeclare user_get_id_name()

Posted: Sun Feb 10, 2013 5:47 pm
by Lumpy Burgertushie
yamahar wrote:HGN, that seems to have worked a treat !

I am going to go live with the forum now (not really bothered that the attachments haven't come over)

There have been two forum posts since I made my convert, is there an easy way for me to extract them and import them or if not I will just tell the users to re-post.

Thanks again for your help.
there are many different tables involved so it would be much easier and faster to ask them to repost.

robert

Re: Cannot redeclare user_get_id_name()

Posted: Sun Feb 10, 2013 6:01 pm
by yamahar
Many thanks, that is what I have done.

Guys, thanks, I run a support dept for a computer company and you have lived up to the high level of support I make my team give, and they get paid for it !

I love phpBB :D