Two sites using the same forum database user list

Discussion in 'Programming' started by joshtb, Dec 10, 2006.

  1. #1
    I know it's possible for TWO different sites to use the same database.

    Let me explain.

    I have siteA and it runs a forum. Through the site, users of the forum can login using their forum ID. I now create siteB on a different domain, but on the same hosting service. I want users from siteA to be able to login with their name from that site on siteB.

    How would I do this? I'm using myBB as my forum software.
     
    joshtb, Dec 10, 2006 IP
  2. Austars

    Austars Active Member

    Messages:
    1,437
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    95
    #2
    What's the other software? Depending on that it could be easy or difficult to do.
     
    Austars, Dec 10, 2006 IP
  3. joshtb

    joshtb Active Member

    Messages:
    186
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #3
    MyBB is the only software. I uploaded MyBB on the other site as well, though I didn't install because I assume it would run off the other site's database as well.

    These are the only software/scripts running. I hope that answered your question.
     
    joshtb, Dec 10, 2006 IP
  4. Austars

    Austars Active Member

    Messages:
    1,437
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    95
    #4
    If its the same software, then in the scripts config you should be able to just specify the same database and have it work. Hypothetically of course ;)
     
    Austars, Dec 10, 2006 IP
  5. joshtb

    joshtb Active Member

    Messages:
    186
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #5
    Nope. I don't think that would work, well I know it won't cause I tried. I don't think it works because they are two seperate domains so they're somewhat seperated but on the same server.

    SiteA has the database joshb_forum. I put that in the config file and I get this:

    Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/joshtb/public_html/forum/inc/db_mysql.php on line 313
    MySQL error:
    Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/joshtb/public_html/forum/inc/db_mysql.php on line 314


    Query:

    Any ideas?
     
    joshtb, Dec 10, 2006 IP
  6. Austars

    Austars Active Member

    Messages:
    1,437
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    95
    #6
    Try searching for how to move MyBB from different hosts on google, because you should be able to find info on how to use a pre-existing database for your script.
     
    Austars, Dec 10, 2006 IP
  7. joshtb

    joshtb Active Member

    Messages:
    186
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #7
    I've been searching Google for hours. No luck, this is why I came here. ;)
     
    joshtb, Dec 10, 2006 IP
  8. Austars

    Austars Active Member

    Messages:
    1,437
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    95
    #8
    Ohh, sorry.
     
    Austars, Dec 10, 2006 IP
  9. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #9
    Sounds pretty easy to me, talk to me on msn msngr....
     
    krakjoe, Dec 11, 2006 IP
  10. falcondriver

    falcondriver Well-Known Member

    Messages:
    963
    Likes Received:
    47
    Best Answers:
    0
    Trophy Points:
    145
    #10
    yeah should be quite easy if you have both sites on the same shared webspace. would be more tricky if you had this sites on 2 different servers, most providers dont allow remote calls for databases.
     
    falcondriver, Dec 11, 2006 IP
  11. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #11
    every cpanel server does, and you wouldn't have to use the database, you could create a "server" script, that echos data in a way that a "client" script can turn into pretty html....
     
    krakjoe, Dec 11, 2006 IP
  12. joshtb

    joshtb Active Member

    Messages:
    186
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #12
    Turns out my host seperated my two sites onto two different servers.

    All is well now. Thanks though!
     
    joshtb, Dec 11, 2006 IP
  13. Austars

    Austars Active Member

    Messages:
    1,437
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    95
    #13
    Glad you got it working. Good luck with the rest of the site.
     
    Austars, Dec 11, 2006 IP