| Author |
Message |
peaceV
Corporal


Joined: Feb 15, 2003
Posts: 50
Location: USA
|
Posted:
Sun Feb 16, 2003 12:13 pm |
  |
i m wondering if it's possible to have a few websites using phpnuke to use the same database.
so lets say i have site1, site2, site3, will i be able to have them using 1 single database so people only have to register in site1 be able to have accounts in site2 and site3 automatically? |
|
|
   |
 |
chatserv
General


Joined: Jan 12, 2003
Posts: 3128
Location: Puerto Rico
|
Posted:
Sun Feb 16, 2003 12:27 pm |
  |
If all sites will have different content just create database tables for each new site by using a prefix other than the one being used by site one, as an example if you used nuke.sql to create site 1's tables then they most likely start with nuke (nuke_authors, nuke_blocks, etc...) so let me give you a fast method that'll save you from having to edit the nuke.sql file multiple times.
Download NukeSQL.php for the version of nuke you have, upload all sites files and edit config.php for each, make $prefix and $user_prefix for site 2 something like nuke2, nuke3 for site 3, etc..., now upload NukeSQL to each site's main dir (where config.php is) and run it on each, when done reopen each site's config.php file and change $user_prefix to the same value site 1 has, this way each site will have their own content but will all share the same users. |
_________________ Feed a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
ScriptHeaven | NukeResources |
|
    |
 |
peaceV
Corporal


Joined: Feb 15, 2003
Posts: 50
Location: USA
|
Posted:
Sun Feb 16, 2003 5:43 pm |
  |
thx alot, i will try that out
this way, i can have one site for each topic, because some of the topics are really unrelated to each other in my site now.
like music and pc hardware and sports |
|
|
   |
 |
gornyhuy
Nuke Soldier


Joined: Feb 15, 2003
Posts: 11
Location: USA
|
Posted:
Sun Feb 16, 2003 8:02 pm |
  |
I am trying to do something similar to this: have multiple topic sites that share common resources and users, but which have unique content and a unique header/footer, etc.
My question is: do I have to make a complete copy of all the PHPNuke files in a separate subdirectory for each "topic area" or is there a more efficient way to implement this?
Thanks! |
|
|
   |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Sun Feb 16, 2003 10:31 pm |
  |
You cannot have multiple domains pointing to the same database and expect members to register once and browse all. This isn't how cookies work. When a member registers at domainX.com, they are logged into only domainX.com and not domainY.net. Doesn't matter if they use the same database. Its the simple fact that they are different domains.
Even if you did link multiple domains to the same database, the database has only a single URL in it for cookie information. |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
peaceV
Corporal


Joined: Feb 15, 2003
Posts: 50
Location: USA
|
Posted:
Sun Feb 16, 2003 11:18 pm |
  |
but will the user be able to use the same account for all the sites connected to a single db?
| Zhen-Xjell wrote: |
You cannot have multiple domains pointing to the same database and expect members to register once and browse all. This isn't how cookies work. When a member registers at domainX.com, they are logged into only domainX.com and not domainY.net. Doesn't matter if they use the same database. Its the simple fact that they are different domains.
Even if you did link multiple domains to the same database, the database has only a single URL in it for cookie information. |
|
|
|
   |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Sun Feb 16, 2003 11:28 pm |
  |
In theory I don't think so, but you will have to test it to see. Remember the cookies being set are guided by the data in the DB as well as the domain name. |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
chatserv
General


Joined: Jan 12, 2003
Posts: 3128
Location: Puerto Rico
|
Posted:
Sun Feb 16, 2003 11:36 pm |
  |
Zhen does have a point but what this method does is allow your users to have an account on all your sites with the same username & pass, obviously they will need to login at all sites since they would still be considered separate sites. |
_________________ Feed a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
ScriptHeaven | NukeResources |
|
    |
 |
peaceV
Corporal


Joined: Feb 15, 2003
Posts: 50
Location: USA
|
Posted:
Mon Feb 17, 2003 12:13 am |
  |
ok, i think as long as they can use the same account name/password then my problem should be solved.
one more question, how long does that cookie stay in the user's computer? so if all they have to do is log on each site once, and dont have to do that again, then the problem is not that huge.
might be more troublesome to have them log on each seperate site each time they come back though.
| chatserv wrote: |
| Zhen does have a point but what this method does is allow your users to have an account on all your sites with the same username & pass, obviously they will need to login at all sites since they would still be considered separate sites. |
|
|
|
   |
 |
gornyhuy
Nuke Soldier


Joined: Feb 15, 2003
Posts: 11
Location: USA
|
Posted:
Mon Feb 17, 2003 6:52 am |
  |
What if the multiple topic sites are all on the same domain?
Will this technique work? Is there a more efficient way to acheive the same effect of "separate" sites with the same username/passwords?
 |
|
|
   |
 |
ArtificialIntel

Joined: Jan 31, 2004
Posts: -88
|
Posted:
Mon Feb 17, 2003 6:55 am |
  |
u can't have more than 1 site on a pure domain. U can seperate them by sub-domains / host names / virtual host names which would work (common method) or use different ports (not common).
ArtificialIntel |
|
|
   |
 |
Zhen-Xjell
Nuke Cops Founder


Joined: Nov 14, 2002
Posts: 5939
|
Posted:
Mon Feb 17, 2003 7:33 am |
  |
You should read the RFC on cookies. Check out this subsection:
4.3.2 Rejecting Cookies
http://www.ietf.org/rfc/rfc2109.txt |
_________________ Paul Laudanski, Microsoft MVP Windows-Security
CastleCops: [de] [en] [wiki] |
|
     |
 |
gornyhuy
Nuke Soldier


Joined: Feb 15, 2003
Posts: 11
Location: USA
|
Posted:
Mon Feb 17, 2003 8:33 am |
  |
| ArtificialIntel wrote: |
u can't have more than 1 site on a pure domain. U can seperate them by sub-domains / host names / virtual host names which would work (common method) or use different ports (not common).
ArtificialIntel |
Thanks, AI... Did you get my private message?
The solution is to put multiple "subsites" each into a separate subdomain?
Would these subdomains be able to share the same database of users/logins as discussed above?
Would subdirectories work, or only subdomains?
topic1.mysite.com/index.php
versus
mysite.com/topic1/index.php
???? |
|
|
   |
 |
ArtificialIntel

Joined: Jan 31, 2004
Posts: -88
|
Posted:
Mon Feb 17, 2003 9:57 am |
  |
subdirectories might work to a point. Might be easier cause they'd be sharing a cookie.
Artificialintel |
|
|
   |
 |
Debar
Nuke Soldier


Joined: Feb 15, 2003
Posts: 12
Location: USA
|
Posted:
Mon Feb 17, 2003 10:09 am |
  |
Nice thread, just what the doctor ordered.
Ive started a few projects, but this one peaks my interest since it is what I am trying to do as well. This is what im trying to do, and so far, with little success.
DOMAIN: www.mydomain.net (my main news site)
Subdomain www.topic1.mydomain.net (my topic on World of Warcraft)
Subdomain2 www.topic2.mydomain.net (my topic on Shadowbane)
and so on.
this is possible yes, I dont want any help, i want to try and get this working on my own, but if any of you know that this could work, ill get started. if its most likley that it wont. Suggest another method maybe?
Thanks guys
Debar |
|
|
   |
 |
|
|