1
Drgn2480
Sharing one mySQL database between multiple xoops sites
  • 2004/5/29 14:59

  • Drgn2480

  • Just popping in

  • Posts: 1

  • Since: 2003/8/6 1


Hi;

I've looked at the threads concerning multi-sites (multiple sites, multi sites, etc.), and none of them really address what I'm trying to do, so here it is;

I have an account with a host, and I have two mySQL databases included in my plan. I want to run three or four XOOPS sites, and they are to be completely independent sites, no sharing of any tables or data. I'm just trying to avoid buying additional mySQL databases if it isn't necessary.

It seems to me that multiple XOOPS installations could use the same mySQL database so long as the prefix is different, as in "site01-" and "site02-". That is the approach I am taking by the way, multiple XOOPS installs in different directories, but sharing the same database.

I've tried to do this already. I set up my first XOOPS site, and it works fine. Then I set up the next XOOPS site in a different directory, using a different prefix (I left the first site using the prefix "xoops"), and it installs fine. Checking the database with phpMyAdmin, and the tables from both sites are there. The installation of the second site completes, I can login to the second site, and this is where the problem starts; the site will load, and then I get the "This is your first time administering...", and I can't get past that point. The first site continues to work properly, and the second site works so long as I don't attempt to administer it.

Any thoughts? I haven't edited any mainfile.php or database.php files.

-Drgn2480

2
Dave_L
Re: Sharing one mySQL database between multiple xoops sites
  • 2004/5/29 15:07

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


The cookies or sessions might be "colliding". You might need to shut down your browser when switching from one XOOPS instance to another, and possibly delete any XOOPS cookies.

3
Mithrandir
Re: Sharing one mySQL database between multiple xoops sites

I have no problems with multiple XOOPS installations on one database.

Are you sure you are not blocking HTTP Referer on site #2? Doing that will prevent the administration javascript menu from being written into the cache folder and you will be in the "this is the first time..." loop.

4
intel352
Re: Sharing one mySQL database between multiple xoops sites
  • 2004/5/29 17:28

  • intel352

  • Module Developer

  • Posts: 824

  • Since: 2003/11/23


dave_l was referring to the fact that the user has 2 installs on the same url

it'd be like http://www.example.com and http://www.example.com/xoops


i would think cookies are colliding as well

5
jw716
Re: Sharing one mySQL database between multiple xoops sites
  • 2004/5/29 17:58

  • jw716

  • Just popping in

  • Posts: 64

  • Since: 2004/5/1 2


I have 3 XOOPS sites running.
Have no problem switching to different sites.
Most of the time have more than one running in different browsers at the same time.
One I use just for testing. SQL prefix "X_DEMO_"
I use the same Admin username and password for all.
No Problem at all.

6
JMorris
Re: Sharing one mySQL database between multiple xoops sites
  • 2004/5/29 19:09

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


From what I gathered from your post, the two installs are default. Is this correct? If so.....

1. Drop the tables for the second site
2. Dump the schema
3. Do a find and replace and replace (using an ASCII text editor [Notepad]) the default prefix with something other than xoops_
4. Import the edited schema
5. Reinstall the second site with a prefix other than xoops_

I seem to recall having a similar problem once, and, if I remember correctly, the above steps fixed it.

If not, let me know and I'll look into it further.

Login

Who's Online

319 user(s) are online (278 user(s) are browsing Support Forums)


Members: 0


Guests: 319


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits