View Full Version : 2 forums share 1 database
Chunky Monkey
02-02-2009, 02:03 PM
How can 2 installations of vbulletin at separate domains on the same server share the same database so that all users, posts, etc., exist at both vbulletin installations?
Using the same config.php file at both domains seems to work because all forums and threads are available at both domains, and I can even log in to both using the same username and password, but it breaks if you try to post or send a pm from one of them.
And yes, I know 2 licenses are necessary.
Please help!
Max Kwiatkowski
02-02-2009, 02:54 PM
You need to use different prefixes for each forum in a database.
To configure domains go to:
Admin CP -> vB Options -> vB Options -> Cookies and HTTP Header Options
Chunky Monkey
02-02-2009, 05:32 PM
Hi, wouldn't having different prefixes for each forum make them function like separate forums when what I am trying to do is allow them to share all of the same users, forums, threads, posts, etc.?
Antivirus
02-02-2009, 06:18 PM
I thin it's likely to do with your cookie prefix in config file. Try having same db info but different cookie prefix in each cfg file and see if that helps.
Chunky Monkey
02-02-2009, 08:28 PM
I will give that a try, thanks. Have you managed to get two vb installations at two different domains to share a database, Antivirus?
--------------- Added 1233613866 at 1233613866 ---------------
EDIT: No good. I tried adding a cookie prefix but I still got a white page with no source code when I tried to create a new thread. I wonder why I can log in but not post or send a pm?
Antivirus
02-03-2009, 03:07 AM
Hmm, afraid I am all out of suggestions. I haven't tried, no.
Dismounted
02-03-2009, 04:56 AM
You need to add the other domain onto the POST referrer whitelist (vBulletin Options).
Chunky Monkey
02-03-2009, 02:29 PM
Thank you, Dismounted. I have added the other domain to the POST referrer whitelist and am now able to send private messages from the "secondary" domain, but it still goes to a white screen when I try to create a thread or post a reply. Any ideas?
Dismounted
02-04-2009, 07:12 AM
The URL set in vBulletin Options (Site URL Options) must be changed for each domain. This can be done through plugins.
Chunky Monkey
02-04-2009, 12:43 PM
I changed the URL by adding
$vbulletin->options['bburl'] = <my domain>
to the top of global.php. It appears to work in so far as links at the "slave" forum lead to the proper URLs. However, I still get blank white pages when I try to post. Any ideas?
--------------- Added 1233795774 at 1233795774 ---------------
Anyone?
Dismounted
02-10-2009, 05:19 AM
Have a look at this: Blank or 'White' Pages (http://www.vbulletin.com/docs/html/blank_pages).
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.