Servers table

Started by bjornredtail, August 10, 2004, 02:53:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bjornredtail

 Ok, I have a bit of a question about this. Say I want to run two "servers" (ie. Turbo and Regular), of RWL:BAXX or it's derivitatives on one HTTP server, with one copy of the code, and one Database. 1. Is that possable? 2. Just how would I go about doing it?
0==={=B=J=O=R=N=R=E=D=T=A=I=L==>
AKA, Nevadacow
First person to ever play RWL

"Program testing can be used to show the presence of bugs, but never to show their absence!"-Edsger W. Dijkstra

Visit http://frostnflame.org today!

Retto

 We use one database, and two sets of code.
let's see...to do it with just one, it's possible, I'm sure. Maybe you log a cookie of which const.php to use?

two sets of code is easier, I find. then you can have things like buying land on one server.
For that, you just set them up with different table names, and put them both on the servers table. That's how we run it, but we've actually got three sets of code (one for Commanders, which is more often than not hidden)
The 'ittle otter,
Retto

Veranor

 
Quote from: RettoWe use one database, and two sets of code.
let's see...to do it with just one, it's possible, I'm sure. Maybe you log a cookie of which const.php to use?

two sets of code is easier, I find. then you can have things like buying land on one server.
For that, you just set them up with different table names, and put them both on the servers table. That's how we run it, but we've actually got three sets of code (one for Commanders, which is more often than not hidden)
In theory you could still have server-specific type stuff with just one set of code (like buying land) but it would just get complicated with all the ifs and stuff.

And yeah the cookie switch for const.php would be easy.

Something in header like

if($_COOKIE['server'] == 0) {
  include("const1.php");
}
or what not.

And you could do a switch in const.php if you only wanted one const.php file... but why I can't think of.
Really it's just an illusion.


EDIT:

Actually since const1.php and each thereafter would have some redundancy (server path) ... that would be the only advantage to the switch that I can think of. But then const would get reallly ugly.
#127.0.0.1 rovl.org