hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : [PHP] Sync users table in databases between 2 portal sites
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

[PHP] Sync users table in databases between 2 portal sites

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 09-18-2004, 05:55 PM
Georgecooldude Georgecooldude is offline
Web Hosting Master
 
Join Date: Aug 2004
Location: London
Posts: 883

[PHP] Sync users table in databases between 2 portal sites


I run a website using a webportal system phpwebthings.

I want to setup another website but not make users re-register as it would be great to have shared logins.

I only need to share the table called wt_users and its only a few rows within that table that need to be shared. Now how would you suggest I go about making a script that updates the wt_users tables in the other sites database everytime a new user registers? I would like it so a user could register on either site and then the member info would be replicated to the other databases via a master database.

At the moment I am thinking of having a master database that only contains user info I want shared from wt_users. Assume Jimbo registered on site 1 i then want that data sent to the master database containing user info and replicated to site 2 - This option I think requires modifiying the portal code. Or the master database could read the databases on sites 1 and 2 but that could create slow down and lag as it Don't want something continually checking for updates.

As the websites are built using a portal system I don't want to have to modify any code within the portal as it makes upgrading a pain.



Any suggestions to how I should go about this? I think Mambo portal already has this feature? How did they go about it? I am a a new programmer so some explanation would be great. Thanks

Reply With Quote


Sponsored Links
  #2  
Old 09-18-2004, 08:00 PM
Barti1987 Barti1987 is offline
Web Hosting Master
 
Join Date: Mar 2004
Location: USA
Posts: 4,342
Add an include in where the registration occurs on one system, include a file at which is will also register the user realtime..

it wont be a pain upgrading because all you will need to do is just remove the incliude line..
You will need to connect to the other host of the database and then just insert the user information.

Peace,

__________________
Testing 1.. Testing 1..2.. Testing 1..2..3...

Reply With Quote
  #3  
Old 09-18-2004, 08:40 PM
Georgecooldude Georgecooldude is offline
Web Hosting Master
 
Join Date: Aug 2004
Location: London
Posts: 883
Thats a good idea!

Ok. so if a user registered on site 1 or site 2 the data can be sent to the master database holding the users.

But how does it get from site 1 to master database to site 2?

At the moment were only creating links to the master database right?

Reply With Quote
Sponsored Links
  #4  
Old 09-19-2004, 03:15 AM
mixDev mixDev is offline
WHT Addict
 
Join Date: Aug 2004
Posts: 109
if i understand things correctly, azizny's Idea is pretty good as you dont want to change any code. Connecting to a different server wont be that troublesome. Add a user with proper domain and table permissions in the mysql db 1. Then use this user to connect to the db1.

All the best.

__________________
HostAccord Affordable Hosting

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
BitTorrent to Launch Cloud Storage Service Web Hosting News 2013-01-25 15:39:23
File Sync Software Provider ownCloud Secures $2.5M Funding Round to Grow Partner Channel Web Hosting News 2012-11-26 14:20:54
ScaleXtreme Provides Open Source Code for Customers to Create Self Service Cloud Portal Web Hosting News 2012-09-25 10:28:21
Apple Confirms Discontinuation of iWeb, MobileMe Hosting in 2012 Web Hosting News 2011-06-24 20:15:37
Web Host U-SYNC Launches CM4all OnlineDrive-Powered Cloud Storage Web Hosting News 2011-06-22 20:54:21


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?