database table migration

Hello i have 2 scripts both with simular databases both using mysql and are both written in php i have a understanding of both scripts and i also know abit of php  and mysql but heres for the quistion.
script one is my main database with my users and password information in the profiles database table field now this is on one server and i have script two on another server.
what i would like to be able to do is copy two fields and there corresponding information and columns from script one to script two so when an account is created on script one aka Dolphin i would like to copy two fields namely
NickName and Password from  server1_dolphin , Profiles to server2_script2db , members , password so that users of script one will be able to login to script two

is this possible i was thinking that it maybe possible via a cron php execution but i am unsure of the command to process.

it would be good if it was just a case of adding something to the login of say the script one join file but which ever if it is at all possible process would suffice

many thanks for any help you all may have with this problem.

Kind Regard
Wesley aka WESWAYS

Quote · 3 Mar 2010

If the processors can handle both sites, it would be better to place them both in the same box (server) and have seperate hard drives for them.  Keep in mind, you'll need to monitor both CPU & Memory usage limits to ensure your not overloading the machine. 

 

Your biggest trick would be to get both sites to utilize that same SQL DB.  Keep in mind here is your issue.  While you can stick the needed info to access the DB into the header.inc.php file for both sites, the Language Keys (Localization Strings) will be your biggest issues.  One of the sites will need to call a completely different set of Language Keys so you don't end up with both sites having the same site name, header/title information and more importantly the same exact site name all over the place when it comes to FAQ's, About US and so on and so forth. 

Can it be done?  Yes.  How much time?  Don't know.  Has anyone actually done it yet?  Not that we know of, but maybe they have.

 

 

Edit:  I had a brainstorm on this that might make it feasible.  Why not set up a cron job to run every so often to check for new Member ID's and migrate those accounts over.  I'm sure your not looking to pick up the blogs, comments and all of that.  It would require 2 seperate DB's but will enable you to do this alot quicker.  No, I don't know the cron to run for this off the top of my head.

Quote · 3 Mar 2010

ahh thanks sorry the other script i should of explained better is not dolphin  but an RPG Game see the RPG game needs Public_html access ie needs to be in the public_html  folder hence why i need to have them both on different servers i could change the script but its so inter weaven with being in root directory it would mean a rewrite and as its only a trial for the moment it does not seem logical.

 

thanks for your reply though i suppose what i am asking is if theres a way to copy or inject information to script2 which is the RPG

Quote · 3 Mar 2010

Dosdawg you wanna jump in on this one?  Seems he's a little confused about some server things here. 

 

I'm not a server guru, so I could be wrong, but with my limited knowledge you should be able to:

 

1.  Have some type of partition (sorta like a shared environment) that would have these both on the same machine & both in the root directory. 

2.  Dolphin does not have to be in the server's root directory.  Actually, Dolphin could be 20 or 30 sub-diretories deep from my understanding and still perform properly. 

 

It appears that a cron job running in dolphin with a correctly configured SQL file ordering the import to your RPG Script would work.  You'd need to study the DB tables of both scripts and line it all up, but it can be done.  In the end, you'd need a 2nd cron job on the RPG side that would execute and accept the data tables that Dolphin had exported and then align them correctly as it imports them in.

Suggestion:  Get a hold of eSASe and purchase his phpBB3 modification.  It literally does exactly what your looking for between Dolphin & phpBB3 so it would be a great place to start to learn how to do this.

Quote · 3 Mar 2010

thank you for your kind reply

yes i understand about Dolphin i am lets just say fully knowledgable with the script and layout but thnak you any how.

i have intergrated and wrote many intergration scripts within dolphin including tufats flash chat into dolphin my quistion was more of a import / injection and to find out if anyone has achieved this and if so how via a cron infact not only phpbb3 but almost any intergration script that handles the NickName and Password tags will help but they are normally all on the same servers.

i know normally i would install to the same server but my customer has there own reasons for wanting to keep the database information seperate as only two field and one encrypted will be sent accross

Many thanks for your imput.

Regards

We

Quote · 3 Mar 2010

So you would like to share user data between the two programs / sites?

Copying data between databases is not issue - in this case it should be done 'on join' - so that when members join - data is written to both databases.

Processing it via a cron will mean that there is some delay in the data appearing on the second site. (a cron job is usually simply a file that is parsed at a given interval)

There is a caveat, however. It is unlikely that sharing login information between databases will work unless both sites are dolphin based site, as the passwords are not stored in clear text - they are encrypted.

Dolphin - Ajax Masturbation
Quote · 3 Mar 2010

hhmm ok how would i be able to place and what code would i place in the join form please the secound site that needs the information and is also a none dolphin site ie the RPG is www.somesite.com ?

Many thank

Quote · 3 Mar 2010

Since these sites are not on the same server and have no integration, your going to be at the cron job level of doing things.  Either export or import.  Personally, I'd use the RPG site, set a script with a cron job, give it the proper DB login credentials and let it pull the profiles it needs, just set it to run every 5 or 10 minutes.  Heck, you could use a disclaimer and advise them it will update every hour or whatever.

Or wait, you want it so if they join either it updates the other.  You'll need the script at both ends with crons running in even intervals but staggered so neither server gets overloaded with the requests running back and forth.  With that in mind, I'd say every hour on the hour for one and every hour on the 1/2 hour for the other.  You will also need a verification to ensure that you do not pull dupicate profiles.  Yes, it has to search it's own DB and then the other one to look for new profiles. 

This is sounding funner and funner as I think about it.

Quote · 4 Mar 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.