Sharing A Members Database

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Ideas Centre
User avatar
cyberken
Registered User
Posts: 185
Joined: Wed Jul 27, 2005 11:51 am
Location: Edinburgh

Re: Sharing A Members Database

Post by cyberken »

GroovePlugs wrote: I figured since I replied to this on area51, I'll just post my message here as well :)

Only for more boards, duplicate board 2 instructions but make sure each one has their own prefix.
Handyman wrote: try installing to forums into the same database with different prefixes… then on one of the forums, open the includes/constants.php and change the $table_prefix for the users, user_group and groups table to the actual table name of the users table you have in the database.

example:

board 1
  • Table Prefix phpbb_
Board 2
  • Table Prefix phpbb3_
  • Change includes/constants.php $table_prefix . 'users' to 'phpbb_users'
  • Change $table_prefix . 'user_group' to phpbb_user_group
  • Change $table_prefix . 'groups' to phpbb_groups
that should get you going in the right direction… I would be interested to hear how it works.

Hi Groove Plugs :)

Sorry I thought it was deleted from area 51 after phpBB.com came back online.

I have tried the above and when I go to the 2nd board I get the following error message:
SQL ERROR [ mysql4 ]

Table 'web30-forums-4.phpbban_phpbb_users' doesn't exist [1146]

An sql error occurred while fetching this page. Please contact an administrator if this problem persists.

The forums are on the same server in the same database just with different prefixes - I dont know how I managed it before :(
User avatar
Handyman`
Former Team Member
Posts: 1751
Joined: Thu Feb 03, 2005 8:44 pm

Re: Sharing A Members Database

Post by Handyman` »

did you remove the $table_prefix? because it looks like it's still there… which is why it's showing up like this phpbban_phpbb_users
http://startrekguide.com My Mod Queue || 1/16/10 Display Posts Anywhere 1.2.0 RC5, Cash MOD 1.0.0 b1, MOD Version Check, AJAX Chat, SEO MOD, AJAX QR, Photo Gallery
MOD Development Manager (version 0.2.0-dev with MODX Generator)
User avatar
cyberken
Registered User
Posts: 185
Joined: Wed Jul 27, 2005 11:51 am
Location: Edinburgh

Re: Sharing A Members Database

Post by cyberken »

GroovePlugs wrote: did you remove the $table_prefix? because it looks like it's still there… which is why it's showing up like this phpbban_phpbb_users

oops :oops: thats the blonde coming out in me again :)
took out the prefix and all is working fine now

thanx for your help
User avatar
Handyman`
Former Team Member
Posts: 1751
Joined: Thu Feb 03, 2005 8:44 pm

Re: Sharing A Members Database

Post by Handyman` »

very cool :)
http://startrekguide.com My Mod Queue || 1/16/10 Display Posts Anywhere 1.2.0 RC5, Cash MOD 1.0.0 b1, MOD Version Check, AJAX Chat, SEO MOD, AJAX QR, Photo Gallery
MOD Development Manager (version 0.2.0-dev with MODX Generator)
User avatar
cyberken
Registered User
Posts: 185
Joined: Wed Jul 27, 2005 11:51 am
Location: Edinburgh

Re: Sharing A Members Database

Post by cyberken »

Ive been working on 2 test installed forums and the sharing of the database has thrown up an unusual problem :(
The main forum was set up no problem.
When setting up forum 2 I put in some categories and forums which after setting the permissions work fine.
Then when I go back to the main forum there is a board message saying "This board has no forums"
So I go into the ACP of the main site and update the permissions and that works fine then I get the no forums message on the 2nd install :(

Im confused - any ideas :cry:
EvilNui
Registered User
Posts: 23
Joined: Sun Mar 25, 2007 10:14 am

Re: Sharing A Members Database

Post by EvilNui »

Sorry that i cannot help you. While testing this I did not have any problems, although i didn't do much testing :?.
But I do have a question regarding this idea.


Wouldn't it be possible to share the forum setup without sharing the permissions?
Than you would be able to share a certain group of forums across the boards!

example:
Community: Computer-geeks, freaks :P
Board 1: Software-forum
Board 2: Hardware-forum
Both individual forums have their own topicrelated forums and both of them could have a 'Off-topic'-area, which they could share!
I'd like that ...
User avatar
Handyman`
Former Team Member
Posts: 1751
Joined: Thu Feb 03, 2005 8:44 pm

Re: Sharing A Members Database

Post by Handyman` »

it sounds like your permission tables are linked… you'll probably want to use different permission tables for each install… same with forum tables.
http://startrekguide.com My Mod Queue || 1/16/10 Display Posts Anywhere 1.2.0 RC5, Cash MOD 1.0.0 b1, MOD Version Check, AJAX Chat, SEO MOD, AJAX QR, Photo Gallery
MOD Development Manager (version 0.2.0-dev with MODX Generator)
User avatar
cyberken
Registered User
Posts: 185
Joined: Wed Jul 27, 2005 11:51 am
Location: Edinburgh

Re: Sharing A Members Database

Post by cyberken »

// Table names
define('ACL_GROUPS_TABLE', $table_prefix . 'acl_groups');
define('ACL_OPTIONS_TABLE', $table_prefix . 'acl_options');
define('ACL_ROLES_DATA_TABLE', $table_prefix . 'acl_roles_data');
define('ACL_ROLES_TABLE', $table_prefix . 'acl_roles');
define('ACL_USERS_TABLE', $table_prefix . 'acl_users');
define('ATTACHMENTS_TABLE', $table_prefix . 'attachments');
define('BANLIST_TABLE', $table_prefix . 'banlist');
define('BBCODES_TABLE', $table_prefix . 'bbcodes');
define('BOOKMARKS_TABLE', $table_prefix . 'bookmarks');
define('BOTS_TABLE', $table_prefix . 'bots');
define('CONFIG_TABLE', $table_prefix . 'config');
define('CONFIRM_TABLE', $table_prefix . 'confirm');
define('DISALLOW_TABLE', $table_prefix . 'disallow');
define('DRAFTS_TABLE', $table_prefix . 'drafts');
define('EXTENSIONS_TABLE', $table_prefix . 'extensions');
define('EXTENSION_GROUPS_TABLE', $table_prefix . 'extension_groups');
define('FORUMS_TABLE', $table_prefix . 'forums');
define('FORUMS_ACCESS_TABLE', $table_prefix . 'forums_access');
define('FORUMS_TRACK_TABLE', $table_prefix . 'forums_track');
define('FORUMS_WATCH_TABLE', $table_prefix . 'forums_watch');
define('GROUPS_TABLE', 'phpbb_groups');
define('ICONS_TABLE', $table_prefix . 'icons');
define('LANG_TABLE', $table_prefix . 'lang');
define('LOG_TABLE', $table_prefix . 'log');
define('MODERATOR_CACHE_TABLE', $table_prefix . 'moderator_cache');
define('MODULES_TABLE', $table_prefix . 'modules');
define('POLL_OPTIONS_TABLE', $table_prefix . 'poll_options');
define('POLL_VOTES_TABLE', $table_prefix . 'poll_votes');
define('POSTS_TABLE', $table_prefix . 'posts');
define('PRIVMSGS_TABLE', $table_prefix . 'privmsgs');
define('PRIVMSGS_FOLDER_TABLE', $table_prefix . 'privmsgs_folder');
define('PRIVMSGS_RULES_TABLE', $table_prefix . 'privmsgs_rules');
define('PRIVMSGS_TO_TABLE', $table_prefix . 'privmsgs_to');
define('PROFILE_FIELDS_TABLE', $table_prefix . 'profile_fields');
define('PROFILE_FIELDS_DATA_TABLE', $table_prefix . 'profile_fields_data');
define('PROFILE_FIELDS_LANG_TABLE', $table_prefix . 'profile_fields_lang');
define('PROFILE_LANG_TABLE', $table_prefix . 'profile_lang');
define('RANKS_TABLE', $table_prefix . 'ranks');
define('REPORTS_TABLE', $table_prefix . 'reports');
define('REPORTS_REASONS_TABLE', $table_prefix . 'reports_reasons');
define('SEARCH_RESULTS_TABLE', $table_prefix . 'search_results');
define('SEARCH_WORDLIST_TABLE', $table_prefix . 'search_wordlist');
define('SEARCH_WORDMATCH_TABLE', $table_prefix . 'search_wordmatch');
define('SESSIONS_TABLE', $table_prefix . 'sessions');
define('SESSIONS_KEYS_TABLE', $table_prefix . 'sessions_keys');
define('SITELIST_TABLE', $table_prefix . 'sitelist');
define('SMILIES_TABLE', $table_prefix . 'smilies');
define('STYLES_TABLE', $table_prefix . 'styles');
define('STYLES_TEMPLATE_TABLE', $table_prefix . 'styles_template');
define('STYLES_TEMPLATE_DATA_TABLE',$table_prefix . 'styles_template_data');
define('STYLES_THEME_TABLE', $table_prefix . 'styles_theme');
define('STYLES_IMAGESET_TABLE', $table_prefix . 'styles_imageset');
define('TOPICS_TABLE', $table_prefix . 'topics');
define('TOPICS_POSTED_TABLE', $table_prefix . 'topics_posted');
define('TOPICS_TRACK_TABLE', $table_prefix . 'topics_track');
define('TOPICS_WATCH_TABLE', $table_prefix . 'topics_watch');
define('USER_GROUP_TABLE', 'phpbb_user_group');
define('USERS_TABLE', 'phpbb_users');
define('WARNINGS_TABLE', $table_prefix . 'warnings');
define('WORDS_TABLE', $table_prefix . 'words');
define('ZEBRA_TABLE', $table_prefix . 'zebra');


Thats the layout of the 2nd install, I have only shared the 3 tables, im getting a bit cross-eyed now looking through code for anything that stands out :(
salmanjamali
Registered User
Posts: 1
Joined: Sun Apr 29, 2007 10:09 am

Re: Sharing A Members Database

Post by salmanjamali »

Hey. My problem starts after successfully sharing the Member's Database by sharing the 3 tables. Now, I want to share SESSIONS too. Attached image describes my problem a lot.
problem.GIF
When I LOGIN in FORUM-1, I want to be automatically LOGGED IN in FORUM-2. I have tried sharing following two TABLES, but its seems to be not working. Please help me out.

In FORUM-2/includes/constants.php:
  • define('SESSIONS_TABLE', 'FORUM-1_sessions');
    define('SESSIONS_KEYS_TABLE', 'FORUM-1_sessions_keys');
[/b]

Regards.
You do not have the required permissions to view the files attached to this post.

Return to “phpBB Discussion”