Having two forums reading and writing to the same database? Is this possible?

Started by Threepwud, July 14, 2008, 02:01:53 AM

Previous topic - Next topic

Threepwud

Hi peeps

I currently have 1.1.1 but also want to try a more stable 2.0 beta (more efficient, anyway).

I have a forum that has been modded (inc. the smfarcade) and will die without! So I was wanting to have two forums, basically one for each  - 1.1.1 and the beta 2.0.

I'd gradually move everyone over to the latter forum but the 2.0 would be for me testing stuff without jeapordising the main forum, that's why I'd like two, both reading and displaying the same information.

Before I go further, is this even possible?

Many thanks!
hldrforum.com - Stu

SleePy

1.1 and 2.0 can not share the same database (with the same prefix). This is due to the number of database changes that where performed to make SMF 2.0 work with multiple database systems.

They can share the same database if they have different prefixes though.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Threepwud

Alright, thanks for the reply.

So basically I've had to drastically alter my plan.

I have copied all of my /public html/ stuff into public html/old so it is a perfect copy.
I have copied entirely the contents of the forum's database into another database.

Now in public html/old (the new forum copy) I will edit the settings.php and point all paths to the new database and forum path.

Is this enough or have I missed something out? Should this not even work at all?

Thanks for all your help,
Stu

N3RVE

Threepwud,
That's exactly what has to be done :)
The Online manual and the search function should assist you if you experience any problems.
Let us know how it goes.

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

Threepwud

Hi mate and thanks for your interest. Mine didn't work out too smoothly but I got there in the end and this is how I did it.



I had 1.1.1 with lots of mods.  I needed to upgrade to version 1.5 before I jumped to version 2 so I copied the whole public_html into public_html/old. I made a sub domain in cpanel to match - old.hldrforum.com

Then I backed up my database and copied that then changing the settings.php file in the public_html/old folder I changed all the paths to the new database.

That copy worked perfectly - I created a second back up called forum.hldrforum.com and it was this that I was to be playing with (keeping old.hldrforum.com as a permenant 1.1.1). It upgraded well enough to 1.5 but died horribly whilst going to 2 beta 3. This was mostly due to the mods that had been previously installed, I imagined.



So I started again and exported certain tables from the database (that kept on timing out which was a nightmare) and installed a fresh copy of 1.5 into public_html/forum. Then I dropped the new database fields which I were going to import then imported my populated tables. That worked well - THEN I upgraded to version 2 beta 3 seamlessly.

The very original 1.1.1 (in public_html) was directed to forum.hldrforum.com (which is version 2 beta 3) whilst the copy of 1.1.1 (public_html/old) remains at old.hldrforum.com


Does this make sense?

It all seems to be working well now, though there are a few small members who can't find the site any more.  Upon trying http://www.hldrforum.com (which redirects them all to http://www.hldrforum.com/forum) she gets a connection error. Others have had a#to ask me to change their passwords also as they couldn't log in anymore. Other members could get in perfectly so I'm very confused.

Hope you all followed that! Any advice on the latter problems?

Many thanks,
Stu

Deprecated

Well... It's a bit fuzzy, but I'm happy if you're happy!

As long as you're happy with the setup you should focus solely on the members who can't get to the site. Tell everybody that they should set their bookmarks to the new site URL.

Anybody who has troubles getting in should first clear their browser cache and try again. If that doesn't work they should clear their cookies, clear the cache and try again. If that doesn't work you should reset their password, have them clear their cookies, clear their browser cache and try again. I'm not sure if all that cache clearing is required, but it can't hurt, and I know I've been clearing mine over and over today getting that .htaccess file debugged. Browsers can behave very weirdly when the server is changed and the browser doesn't know it.

Perhaps you will get some additional suggestions from the other folks following this thread.

Threepwud

Hmm, thanks mate. I've suggested a thousand things and clearing the cookies and cache was the first. Worryingly, she uses firefox so I asked her to try with IE and she got the same error.

I personally now believe the problem is on her end and not mine (but still intend to simplify my file structure by removing sub domains and such). Let you know how that goes!


Advertisement: