Cannot redeclare user_get_id_name()

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
denisesballs
Registered User
Posts: 30
Joined: Sun Oct 23, 2005 2:49 am

Cannot redeclare user_get_id_name()

Post by denisesballs » Fri Jan 22, 2010 6:49 pm

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?

User avatar
Lumpy Burgertushie
Registered User
Posts: 66735
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Cannot redeclare user_get_id_name()

Post by Lumpy Burgertushie » Fri Jan 22, 2010 6:57 pm

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
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

denisesballs
Registered User
Posts: 30
Joined: Sun Oct 23, 2005 2:49 am

Re: Cannot redeclare user_get_id_name()

Post by denisesballs » Fri Jan 22, 2010 7:00 pm

I actually just dropped my imported php_groups table and recreated it from the default 3.0.6 schema. Seems to be working now.

yamahar
Registered User
Posts: 42
Joined: Sun Dec 09, 2012 12:17 pm

Re: Cannot redeclare user_get_id_name()

Post by yamahar » Sat Feb 09, 2013 6:59 pm

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

User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: Cannot redeclare user_get_id_name()

Post by Oyabun1 » Sat Feb 09, 2013 9:46 pm

What phpBB version was the imported database from?
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests

yamahar
Registered User
Posts: 42
Joined: Sun Dec 09, 2012 12:17 pm

Re: Cannot redeclare user_get_id_name()

Post by yamahar » Sat Feb 09, 2013 10:22 pm

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.

User avatar
HGN
Former Team Member
Posts: 4706
Joined: Wed Dec 03, 2008 1:53 pm
Location: The Netherlands
Name: Alfred
Contact:

Re: Cannot redeclare user_get_id_name()

Post by HGN » Sun Feb 10, 2013 1:21 am

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

yamahar
Registered User
Posts: 42
Joined: Sun Dec 09, 2012 12:17 pm

Re: Cannot redeclare user_get_id_name()

Post by yamahar » Sun Feb 10, 2013 9:12 am

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

User avatar
HGN
Former Team Member
Posts: 4706
Joined: Wed Dec 03, 2008 1:53 pm
Location: The Netherlands
Name: Alfred
Contact:

Re: Cannot redeclare user_get_id_name()

Post by HGN » Sun Feb 10, 2013 12:08 pm

Could you also run this query:

Code: Select all

SELECT DISTINCT group_id FROM phpbb_user_group WHERE 1

yamahar
Registered User
Posts: 42
Joined: Sun Dec 09, 2012 12:17 pm

Re: Cannot redeclare user_get_id_name()

Post by yamahar » Sun Feb 10, 2013 1:31 pm

Hi There, this is the only thing that gets output.

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

User avatar
HGN
Former Team Member
Posts: 4706
Joined: Wed Dec 03, 2008 1:53 pm
Location: The Netherlands
Name: Alfred
Contact:

Re: Cannot redeclare user_get_id_name()

Post by HGN » Sun Feb 10, 2013 3:13 pm

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);

yamahar
Registered User
Posts: 42
Joined: Sun Dec 09, 2012 12:17 pm

Re: Cannot redeclare user_get_id_name()

Post by yamahar » Sun Feb 10, 2013 5:39 pm

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.

User avatar
Lumpy Burgertushie
Registered User
Posts: 66735
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Cannot redeclare user_get_id_name()

Post by Lumpy Burgertushie » Sun Feb 10, 2013 5:47 pm

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
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

yamahar
Registered User
Posts: 42
Joined: Sun Dec 09, 2012 12:17 pm

Re: Cannot redeclare user_get_id_name()

Post by yamahar » Sun Feb 10, 2013 6:01 pm

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

Locked

Return to “[3.0.x] Support Forum”