Multiple Forum Databases

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Get Involved
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
boeingcpt
Registered User
Posts: 1
Joined: Wed Jan 21, 2009 4:20 am

Multiple Forum Databases

Post by boeingcpt »

Hey guys/gals, Im still quiet new to this. And sorry if this has been discussed.

I would like to create multiple installations of phpBB in different directories of my server, however i would like to merge all the users into one so that one user can access all the forums with one username and password.
Is this possible? Thanks in advance

- Tom
Green Light
Registered User
Posts: 224
Joined: Fri Jan 16, 2009 10:10 pm

Re: Multiple Forum Databases

Post by Green Light »

Couldn't you just forward the add-on domains (guessing) to the directory w/ phpBB installed...?
If not, sounds to me like a tough modification which I won't be able to assist you in...

BTW your topic name confused me,sounded like you have 1 DATABASE and 5 directorys.. with different boards..
either way it's one database and many boards...
sandman229
Registered User
Posts: 47
Joined: Wed Oct 08, 2003 6:09 pm
Location: Victorville, Ca.
Contact:

Re: Multiple Forum Databases

Post by sandman229 »

It can be done. I set one up on my local Hard drive once to see if it can be done.
I set up 3 forums on 1 database.

I installed each one with different prefixs;

example:
directorys: forum, forum1, forum2
Database: phpbb, phpbb1, phpbb2

I don't have my files handy at the moment, I believe its in the common.php?? I'll have to get back with you later on today with what changes that has to be changed.

The only problem I found (which I don't do) is if you let the users upload there own avatars to the board, I couldn't figure out how to make the change for all boards to look into the same directory where the avatars are uploaded. Everything else seemed to work just fine. I went back and forth between all 3 boards and was never found myself logged off or not logged on, and I had no problems so far. Now that was on a test board and not open to the public but I could setup 3 basic forums up on my domain, all with different styles to see if it works.

I'll let you know later on today.
User avatar
ric323
Former Team Member
Posts: 22910
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: Multiple Forum Databases

Post by ric323 »

Why do you need multiple installations?
Why not just have several categories in the one board, and users access the one that they want?
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions
sandman229
Registered User
Posts: 47
Joined: Wed Oct 08, 2003 6:09 pm
Location: Victorville, Ca.
Contact:

Re: Multiple Forum Databases

Post by sandman229 »

ric323 wrote:Why do you need multiple installations?
Why not just have several categories in the one board, and users access the one that they want?
I don't but I was just answering his question... I was going to have several categories with different styles..
User avatar
ric323
Former Team Member
Posts: 22910
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: Multiple Forum Databases

Post by ric323 »

Actually, my query was aimed at boeingcpt
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions
sandman229
Registered User
Posts: 47
Joined: Wed Oct 08, 2003 6:09 pm
Location: Victorville, Ca.
Contact:

Re: Multiple Forum Databases

Post by sandman229 »

oh, sorry..
sandman229
Registered User
Posts: 47
Joined: Wed Oct 08, 2003 6:09 pm
Location: Victorville, Ca.
Contact:

Re: Multiple Forum Databases

Post by sandman229 »

Here are the changes needed to get this to work..

open includes/constant.php

on the bottom you'll see:

define('K_USERS_TABLE', $table_prefix . 'k_users');

change to any table name you want. I made it like it is below.

define('K_USERS_TABLE', $table_share . 'k_users');
define('WARNINGS_TABLE', $table_share . 'warnings');
define('USERS_TABLE', $table_share . 'users');
define('WARNINGS_TABLE', $table_share . 'warnings');
define('SESSIONS_TABLE', $table_share . 'sessions');
define('SESSIONS_KEYS_TABLE', $table_share . 'sessions_keys');
define('PRIVMSGS_TABLE', $table_share . 'privmsgs');
define('PRIVMSGS_FOLDER_TABLE', $table_share . 'privmsgs_folder');
define('PRIVMSGS_RULES_TABLE', $table_share . 'privmsgs_rules');
define('PRIVMSGS_TO_TABLE', $table_share . 'privmsgs_to');
define('PROFILE_FIELDS_TABLE', $table_share . 'profile_fields');
define('PROFILE_FIELDS_DATA_TABLE', $table_share . 'profile_fields_data');
define('PROFILE_FIELDS_LANG_TABLE', $table_share . 'profile_fields_lang');
define('PROFILE_LANG_TABLE', $table_share . 'profile_lang');
define('RANKS_TABLE', $table_share . 'ranks');

It seems to work.

Now, open each of your config.php files for each of your forums and add:

below
$table_prefix = 'phpbb3_';
Add
$table_share = 'phpbb_';


Now each of your forums have the same user datbase..

Hope you understood all of that.

Hope that helps..
User avatar
lou-in-usa
Registered User
Posts: 37
Joined: Thu Jan 01, 2009 11:48 pm

Re: Multiple Forum Databases

Post by lou-in-usa »

OK I'm trying to see if this could help me with my problem somehow.
My problem is I need to break up the number of forums in the forum table of the database because I have too many and they are causing slow page-loads and maybe problems for users down the line.
I would like to break up the forums into seperate tables and a corresponding sub-directory for each table. So each subdirectory would call on a seperate forums table and permissions table. I would go so far as to say I'd split it into seperate databases if I had to but I would like users to register only once.
But if I can just figure out how to modify the viewtopic.php pages and etc. for use in particular directories that would be great.
-Lou
Locked

Return to “[3.0.x] Support Forum”