PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Wed Nov 22, 2017 10:58 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Mon Aug 05, 2013 2:37 am 
Offline
Forum Contributor
User avatar

Joined: Tue Jun 11, 2013 10:47 am
Posts: 103
Location: England, United Kingdom
Hello, I am currently making different sites, (similar to heavengames), and I was wondering.Should I have all the sub domain sites on different databases, or should I have every site through one?

Any comments would be appreciated thanks.


Top
 Profile  
 
PostPosted: Mon Aug 05, 2013 4:11 am 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6587
Location: WA, USA
Maybe. What are all these subdomains for? What's the difference between one and another?


Top
 Profile  
 
PostPosted: Mon Aug 05, 2013 5:06 am 
Offline
Forum Contributor
User avatar

Joined: Tue Jun 11, 2013 10:47 am
Posts: 103
Location: England, United Kingdom
I am making a Stronghold fansite, and so far, I have a main site, (similar to heavengames), and a stronghold 2 subdomain, as well as a stronghold crusader one.(Not on the web YET) At the moment, I have them all through one database, and since I only have one forum, I was wondering what to do.

A.) Should I split them up to a forum for each subdomain site?

B.) Should I keep it the same?

C.) Should I keep the forum through a seperate one altogether?

Which would be the best way top lay it out?


Top
 Profile  
 
PostPosted: Mon Aug 05, 2013 12:20 pm 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6587
Location: WA, USA
a) If you want to keep them separate from each other, yes, but most commonly there'll just be one forum for an entire site and you have subforums for the subdomains.
b) What I was trying to find out is whether the database structures would be the same. Same tables and same code with just different branding? Or do the subdomains behave differently with different purposes?
c) Separate what?


Top
 Profile  
 
PostPosted: Tue Aug 06, 2013 3:33 am 
Offline
Forum Contributor
User avatar

Joined: Tue Jun 11, 2013 10:47 am
Posts: 103
Location: England, United Kingdom
Yes, all the database structures would be the same, because I would just be using the same scripts for them.The sub domains would probably behave the same.They would have different purposes though.

By "seperate", I meant: Should I keep all the forums through a seperate subdomian altogether?

I.E. http://forums.YOURDOMAIN.com


Top
 Profile  
 
PostPosted: Tue Aug 06, 2013 1:49 pm 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6587
Location: WA, USA
chris98 wrote:
Yes, all the database structures would be the same, because I would just be using the same scripts for them.The sub domains would probably behave the same.They would have different purposes though.

I'm inclined to say you should not use separate code, and that the subdomains work like internationalization where scripts rewrite like
Code:
sub.example.com/rewritten/path -> /script.php?file=rewritten/path&subdomain=sub

Then your code can include that "sub" in its queries and whatnot when determining exactly what content to show.

chris98 wrote:
By "seperate", I meant: Should I keep all the forums through a seperate subdomian altogether?

I.E. http://forums.YOURDOMAIN.com

If you want. I myself probably would.


Top
 Profile  
 
PostPosted: Tue Aug 06, 2013 2:04 pm 
Offline
Forum Contributor
User avatar

Joined: Tue Jun 11, 2013 10:47 am
Posts: 103
Location: England, United Kingdom
Right, thanks, I might try that.But wouldn't it make it easier for an attacker then, if it's all through one database?


Top
 Profile  
 
PostPosted: Tue Aug 06, 2013 3:16 pm 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6587
Location: WA, USA
You're running the same code. If there's a flaw on one site then it'll show on the other site too. And if you literally run the exact same code then it's actually better: you fix the bug for one site and it's fixed for all the others.

No net difference.


Top
 Profile  
 
PostPosted: Wed Aug 07, 2013 2:39 am 
Offline
Forum Contributor
User avatar

Joined: Tue Jun 11, 2013 10:47 am
Posts: 103
Location: England, United Kingdom
Right, thanks for your advice.I was just wondering what other people might think.If I need any help on it, I'll post back here.

Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group