2 different database running on same xaseco

Discuss everything about Xymph's Aseco flavoured server control scripts for TM Forever / classic TMN and for TM² Canyon.

Moderators: Xymph, TM-Patrol

Post Reply
User avatar
FoxShadow
smooth traffic navigator
smooth traffic navigator
Posts: 247
Joined: 03 Nov 2006 20:37
Owned TM-games: TMNF, TMUF
Location: Puerto Esperanza, Misiones, Argentina
Contact:

2 different database running on same xaseco

Post by FoxShadow » 26 Nov 2010 12:33

Hi all

Because I don´t want to do a mess with the original database.
I´m trying to do another database works on same xaseco, i´ve duplicated and renamed like "2" localdatabase.xml and plugin.localdatabase.php, i´ve created a new database inside phpMyAdmin and put his name in localdatabase2.xml.
All this because I want to conditione the recs on the second database.
But I can´t do they work at same time, xaseco can´t start no errors are shown in the console, it just restarts (because I have it in a loop).

Code: Select all

# initialize XASECO #############################

[XAseco] PHP Version is 5.2.4 on WINNT
[XAseco] Load settings [config.xml]
[XAseco] Load admin/ops lists [adminops.xml]
[XAseco] Load banned IPs list [bannedips.xml]
[XAseco] Load plugins list [plugins.xml]
[XAseco] Load plugin [plugin.localdatabase.php]
[XAseco] Load plugin [plugin.localdatabase2.php]

(here xaseco restarts)
If I put only one (localdatabase or localdatabase2) in plugins.xml xaseco starts normally.

What I´m trying to do is not possible ? Or I´m making a bad mistake somewhere ?
I´m a less than a noob programmer, so please be nice with me. :mrgreen:
Image
Image
Image

jamie_macdonald
TM-Patrol
TM-Patrol
Posts: 1612
Joined: 10 Jul 2008 19:48
Owned TM-games: TMUF, TMNF, TMS
Manialink(s): ET
Location: London, UK
Contact:

Re: 2 different database running on same xaseco

Post by jamie_macdonald » 26 Nov 2010 13:01

I would say that running two databases for the same functions would be asking for it not to work, you could run the 2nd database and comment out the 1st one in the plugins.xml quite easily. then change back when needed.

You would have to look deep into the database (local) plugin to see why this clashes with 2 instances, i cannot see anyone wanting to put in the effort to rewrite it for you. as it's not something people would need.

the database is used for records, karma, playerinfo storage for pulling up into widgets and menu's in the server, there is no reason to run two. jsut turn number one off until you have played with number two enough.

if you need the records transferring over after you will have to learn to merge databases i guess.

sorry to be little help, but its really more effort than the purpose warrants.

User avatar
FoxShadow
smooth traffic navigator
smooth traffic navigator
Posts: 247
Joined: 03 Nov 2006 20:37
Owned TM-games: TMNF, TMUF
Location: Puerto Esperanza, Misiones, Argentina
Contact:

Re: 2 different database running on same xaseco

Post by FoxShadow » 26 Nov 2010 13:35

jamie_macdonald wrote:I would say that running two databases for the same functions would be asking for it not to work, you could run the 2nd database and comment out the 1st one in the plugins.xml quite easily. then change back when needed.
I already made that before, but what i´m looking now is store some recs in the second database (by some rules) without interfere the players or server (by keeping the original database running).
jamie_macdonald wrote:You would have to look deep into the database (local) plugin to see why this clashes with 2 instances, i cannot see anyone wanting to put in the effort to rewrite it for you. as it's not something people would need.
I don´t want someone do the job for me, i´m just looking for some help. :)
jamie_macdonald wrote:the database is used for records, karma, playerinfo storage for pulling up into widgets and menu's in the server, there is no reason to run two. jsut turn number one off until you have played with number two enough.
I already know that, thanks.
jamie_macdonald wrote:if you need the records transferring over after you will have to learn to merge databases i guess.
sorry to be little help, but its really more effort than the purpose warrants.
This is not the case.

Thank you jamie for your interest, but I will wait for other advices before give up. :D
Image
Image
Image

jamie_macdonald
TM-Patrol
TM-Patrol
Posts: 1612
Joined: 10 Jul 2008 19:48
Owned TM-games: TMUF, TMNF, TMS
Manialink(s): ET
Location: London, UK
Contact:

Re: 2 different database running on same xaseco

Post by jamie_macdonald » 26 Nov 2010 15:28

Hehe i didn't ask you to give up, and i am sure there will be plenty of nice people here to give you some pointers, just saying its alot of work for something only specific to your cause.

If i have more knowledge on the plugin i would of course, oblige :thumbsup:

Why would you want a player selective DB though? can you not jsut flush out the other players another way? or is it for a private server to use that database and not see the others scores? (like a training server).

Wish you luck Fox :D

User avatar
FoxShadow
smooth traffic navigator
smooth traffic navigator
Posts: 247
Joined: 03 Nov 2006 20:37
Owned TM-games: TMNF, TMUF
Location: Puerto Esperanza, Misiones, Argentina
Contact:

Re: 2 different database running on same xaseco

Post by FoxShadow » 26 Nov 2010 16:24

Thanks :D

The idea is for some kind of tournament: the registered players should be able to store their records on the secondary database but I want to keep the server public with its original localdatabase running, and I don´t want to add tables or anything to the original database in order to don't mess it.
Image
Image
Image

jamie_macdonald
TM-Patrol
TM-Patrol
Posts: 1612
Joined: 10 Jul 2008 19:48
Owned TM-games: TMUF, TMNF, TMS
Manialink(s): ET
Location: London, UK
Contact:

Re: 2 different database running on same xaseco

Post by jamie_macdonald » 26 Nov 2010 16:29

Ahh cool, sounds like a nice idea

When you get it working i'll take a peek at how it's done for curiositys sake. :)

User avatar
FoxShadow
smooth traffic navigator
smooth traffic navigator
Posts: 247
Joined: 03 Nov 2006 20:37
Owned TM-games: TMNF, TMUF
Location: Puerto Esperanza, Misiones, Argentina
Contact:

Re: 2 different database running on same xaseco

Post by FoxShadow » 26 Nov 2010 16:36

When is finished surely will be public. :)
But I continue stuck in "the begining of the begining". :(
Image
Image
Image

jamie_macdonald
TM-Patrol
TM-Patrol
Posts: 1612
Joined: 10 Jul 2008 19:48
Owned TM-games: TMUF, TMNF, TMS
Manialink(s): ET
Location: London, UK
Contact:

Re: 2 different database running on same xaseco

Post by jamie_macdonald » 26 Nov 2010 16:41

I have allways been stuck there young sir :lol:

jouko100
speedy pilot
speedy pilot
Posts: 375
Joined: 10 Mar 2007 09:33
Location: finland

Re: 2 different database running on same xaseco

Post by jouko100 » 26 Nov 2010 17:05

what about this in localdatabase.xml and make 2 databases aseco and aseco2.Not tested.maybe somehere is said what database is used
<!-- MySQL Server Settings -->
<mysql_server>localhost</mysql_server>
<mysql_login></mysql_login>
<mysql_password>/mysql_password>
<mysql_database>aseco</mysql_database>
<!-- Do you want XASECO to display newly driven records? -->
<display>true</display>
<!-- Limit the highest record that will be displayed to all? -->
<!-- If lower than $maxrecs, records above this limit will -->
<!-- only be displayed to the pertaining player -->
<limit>50</limit>
<!-- MySQL Server Settings -->
<mysql_server>localhost</mysql_server>
<mysql_login></mysql_login>
<mysql_password></mysql_password>
<mysql_database>aseco2</mysql_database>
<!-- Do you want XASECO to display newly driven records? -->
<display>true</display>
<!-- Limit the highest record that will be displayed to all? -->
<!-- If lower than $maxrecs, records above this limit will -->
<!-- only be displayed to the pertaining player -->
<limit>50</limit>

User avatar
FoxShadow
smooth traffic navigator
smooth traffic navigator
Posts: 247
Joined: 03 Nov 2006 20:37
Owned TM-games: TMNF, TMUF
Location: Puerto Esperanza, Misiones, Argentina
Contact:

Re: 2 different database running on same xaseco

Post by FoxShadow » 26 Nov 2010 17:37

I think that wouldn´t work, because only the last variables will be taken.
Thanks anyway.

I´m reading about this: http://ar2.php.net/manual/en/function.m ... ect-db.php
Image
Image
Image

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: 2 different database running on same xaseco

Post by Ant » 26 Nov 2010 17:58

Wouldn't it be easier to create a second server and run that for your tournaments ? That way you can keep the first server public and then password the second server and give that password to your participants.

User avatar
FoxShadow
smooth traffic navigator
smooth traffic navigator
Posts: 247
Joined: 03 Nov 2006 20:37
Owned TM-games: TMNF, TMUF
Location: Puerto Esperanza, Misiones, Argentina
Contact:

Re: 2 different database running on same xaseco

Post by FoxShadow » 26 Nov 2010 18:07

Yes, that is the easy way, and I´m actually doing that.
But that's not the case, I want keep the server public, so the players can see the tournament running and maybe join to participate.
Also I´m planning more things about the rules to put a record in the second database. ;)
Image
Image
Image

Post Reply