Users Sharing or Synchronisation between multiple sites
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
- columbusgeek
- Joomla! Apprentice
- Posts: 47
- Joined: Mon Jun 04, 2007 1:53 pm
- Location: columbus ohio
- Contact:
Re: Users Sharing or Synchronisation between multiple sites
Fixed it.
Be sure to grant full read/write permissions to your database's and tables.
master site a - access to site b, site c and site d
slave site b - access to site a, site c and site d
slave site c - access to site a, site b and site d
slave site d - access to site a, site b, site c
When setting the permissions up in cpanel, (in my case), my logic told me all the slave sites needed access to the master site, but not to each other. this is NOT correct. All the sites databases, need full read/write permissions to each others databases.
Simple enough fix. Too bad I pulled all my hair out before I found it.
Be sure to grant full read/write permissions to your database's and tables.
master site a - access to site b, site c and site d
slave site b - access to site a, site c and site d
slave site c - access to site a, site b and site d
slave site d - access to site a, site b, site c
When setting the permissions up in cpanel, (in my case), my logic told me all the slave sites needed access to the master site, but not to each other. this is NOT correct. All the sites databases, need full read/write permissions to each others databases.
Simple enough fix. Too bad I pulled all my hair out before I found it.
- kelecz
- Joomla! Apprentice
- Posts: 13
- Joined: Fri Nov 06, 2009 8:31 pm
- Location: Belgrade, Serbia
- Contact:
Re: Users Sharing or Synchronisation between multiple sites
Hello there,
can someone put video tutorial or pictures where to put and write something. I am tired of investigating this . Please!!!!!
THX!!!!!!!
can someone put video tutorial or pictures where to put and write something. I am tired of investigating this . Please!!!!!
THX!!!!!!!
- columbusgeek
- Joomla! Apprentice
- Posts: 47
- Joined: Mon Jun 04, 2007 1:53 pm
- Location: columbus ohio
- Contact:
Re: Users Sharing or Synchronisation between multiple sites
It's all clearly mapped out right here.
http://forum.joomla.org/viewtopic.php?f ... 6#p2015114
If that post confuses you in any way, this is not a good option for you to attempt. It is a pretty advanced technique.
http://forum.joomla.org/viewtopic.php?f ... 6#p2015114
If that post confuses you in any way, this is not a good option for you to attempt. It is a pretty advanced technique.
-
- Joomla! Apprentice
- Posts: 43
- Joined: Mon Feb 26, 2007 10:53 pm
Re: Users Sharing or Synchronisation between multiple sites
What are the tables for joomla 2.5?
-
- Joomla! Apprentice
- Posts: 26
- Joined: Fri May 14, 2010 11:56 am
Re: Users Sharing or Synchronisation between multiple sites
Yes i need this too... Can someone tell us what tables are involved for joomla 2.5??? For users and their account controll, user type and user groups... Thanks...
-
- Joomla! Fledgling
- Posts: 2
- Joined: Fri Apr 21, 2006 5:16 pm
Re: Users Sharing or Synchronisation between multiple sites
For Joomla 2.5, this is a *guess* (and appears to be working so far):
Instead of 'dropping' the table, I'm simply renaming existing ones with "_bak" so you don't lose data.
I'm syncing users (their notes, profiles), groups (their maps to users), and view levels. Not sure if that's inclusive of everything, but seems to work!
Instructions:
Find & Replace "josPrefix2" with the Joomla DB prefix you want to share TO
Find & Replace "josPrefix1" with the Joomla DB prefix you want to share FROM
Find & Replace "dbSite1" with the Joomla DB name you're sharing FROM
Please post if this works (or not) so I can fix up my code as well :P
- rp
Instead of 'dropping' the table, I'm simply renaming existing ones with "_bak" so you don't lose data.
I'm syncing users (their notes, profiles), groups (their maps to users), and view levels. Not sure if that's inclusive of everything, but seems to work!
Instructions:
Find & Replace "josPrefix2" with the Joomla DB prefix you want to share TO
Find & Replace "josPrefix1" with the Joomla DB prefix you want to share FROM
Find & Replace "dbSite1" with the Joomla DB name you're sharing FROM
Code: Select all
RENAME TABLE `josPrefix2_users` TO `josPrefix2_bak_users`;
RENAME TABLE `josPrefix2_session` TO `josPrefix2_bak_session`;
RENAME TABLE `josPrefix2_usergroups` TO `josPrefix2_bak_usergroups`;
RENAME TABLE `josPrefix2_user_notes` TO `josPrefix2_bak_user_notes`;
RENAME TABLE `josPrefix2_user_profiles` TO `josPrefix2_bak_user_profiles`;
RENAME TABLE `josPrefix2_user_usergroup_map` TO `josPrefix2_bak_user_usergroup_map`;
RENAME TABLE `josPrefix2_viewlevels` TO `josPrefix2_bak_viewlevels`;
CREATE VIEW josPrefix2_users AS SELECT * FROM dbSite1.josPrefix1_users;
CREATE VIEW josPrefix2_session AS SELECT * FROM dbSite1.josPrefix1_session;
CREATE VIEW josPrefix2_usergroups AS SELECT * FROM dbSite1.josPrefix1_usergroups;
CREATE VIEW josPrefix2_user_notes AS SELECT * FROM dbSite1.josPrefix1_user_notes;
CREATE VIEW josPrefix2_user_profiles AS SELECT * FROM dbSite1.josPrefix1_user_profiles;
CREATE VIEW josPrefix2_user_usergroup_map AS SELECT * FROM dbSite1.josPrefix1_user_usergroup_map;
CREATE VIEW josPrefix2_viewlevels AS SELECT * FROM dbSite1.josPrefix1_viewlevels;
- rp
-
- Joomla! Apprentice
- Posts: 17
- Joined: Thu Oct 07, 2010 5:00 am
Re: Users Sharing or Synchronisation between multiple sites
Hi All,
Birnik's solution looks very well explained and just what might work for me as well.
However I have a question, I have one main site and several subdomain sites where I plan to apply this solution and create VIEWS in all my subdomains site's DBs pointing to the DB of the main site.
But after that, will new users be able to register on my subdomains as well or will i have to redirect all new users to the main site to register ? Also if they can and do register on the subdomains, will they be created in the main site's main DB ?
Hope I am clear...
Thanks,
Sean.
Birnik's solution looks very well explained and just what might work for me as well.
However I have a question, I have one main site and several subdomain sites where I plan to apply this solution and create VIEWS in all my subdomains site's DBs pointing to the DB of the main site.
But after that, will new users be able to register on my subdomains as well or will i have to redirect all new users to the main site to register ? Also if they can and do register on the subdomains, will they be created in the main site's main DB ?
Hope I am clear...
Thanks,
Sean.
-
- Joomla! Fledgling
- Posts: 1
- Joined: Sun Jan 06, 2013 10:30 pm
Re: Users Sharing or Synchronisation between multiple sites
Hi all,
Thanks for this topic as it give a hope to accomplish my website.
I tested this on my MAMP and everything is working perfectly. However, when I tried this on godaddy server I'm stuck in this issue:
when you create on a database it has to be on its own URL with its unique credentials (i.e. username and password).
So when I'm trying to create VIEW TABLE command on SQL it returns an error (#1142 - ANY command denied to user 'USER'@'%' for table 'jos_users' ).
I tried to use FEDERATED Tables instead, which is similar to VIEW, then the tables is created but also not able to connect to the other database server. the error message is (#1429 - Unable to connect to foreign data source: Can't connect to MySQL server on 'IP Address' (111) )
Notes:
1- as per godaddy policy, you cannot import/create two databases on the same PHPMyAdmin credentials it has to be split. each database with its own username, password, hostname and URL.
2- The syntax i'm using:
CREATE TABLE jos2_users (
id INT(11) NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
username VARCHAR(150) NOT NULL,
email VARCHAR(100) NOT NULL,
password VARCHAR(100) NOT NULL,
PRIMARY KEY (id)
)
ENGINE=FEDERATED
DEFAULT CHARSET=latin1
CONNECTION='mysql://USERNAME:PASSWORD@HOSTNAME OR IP/DATABASE NAME/jos_users';
And as am writing this i figure out where is the problem.... my database password contains "@" which interfering with @ located in the syntax above. Oh MY God .....
So consider this as sharing experience .... rather than a problem
Thanks for this topic as it give a hope to accomplish my website.
I tested this on my MAMP and everything is working perfectly. However, when I tried this on godaddy server I'm stuck in this issue:
when you create on a database it has to be on its own URL with its unique credentials (i.e. username and password).
So when I'm trying to create VIEW TABLE command on SQL it returns an error (#1142 - ANY command denied to user 'USER'@'%' for table 'jos_users' ).
I tried to use FEDERATED Tables instead, which is similar to VIEW, then the tables is created but also not able to connect to the other database server. the error message is (#1429 - Unable to connect to foreign data source: Can't connect to MySQL server on 'IP Address' (111) )
Notes:
1- as per godaddy policy, you cannot import/create two databases on the same PHPMyAdmin credentials it has to be split. each database with its own username, password, hostname and URL.
2- The syntax i'm using:
CREATE TABLE jos2_users (
id INT(11) NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
username VARCHAR(150) NOT NULL,
email VARCHAR(100) NOT NULL,
password VARCHAR(100) NOT NULL,
PRIMARY KEY (id)
)
ENGINE=FEDERATED
DEFAULT CHARSET=latin1
CONNECTION='mysql://USERNAME:PASSWORD@HOSTNAME OR IP/DATABASE NAME/jos_users';
And as am writing this i figure out where is the problem.... my database password contains "@" which interfering with @ located in the syntax above. Oh MY God .....
So consider this as sharing experience .... rather than a problem
-
- Joomla! Enthusiast
- Posts: 148
- Joined: Sun Jan 13, 2008 12:41 am
Re: Users Sharing or Synchronisation between multiple sites
So did anyone get this working in joomla 2.5 here is what I want to do
1 Domain Name
3 joomla sites using the same user database
and then 1 forum (phpbb using jFusion)
so can this be done and if so how do I do it with jooml 2.5
Thanks Guys
tbarlow
1 Domain Name
3 joomla sites using the same user database
and then 1 forum (phpbb using jFusion)
so can this be done and if so how do I do it with jooml 2.5
Thanks Guys
tbarlow
-
- Joomla! Fledgling
- Posts: 1
- Joined: Thu Apr 18, 2013 8:41 am
Re: Users Sharing or Synchronisation between multiple sites
But if I wanted to share articles of a single category, this method can work?
-
- Joomla! Apprentice
- Posts: 6
- Joined: Tue Oct 08, 2013 8:15 pm
Re: Users Sharing or Synchronisation between multiple sites
Sorry to resurrect this but I need to ask something.rpertusio wrote:For Joomla 2.5, this is a *guess* (and appears to be working so far):
Instead of 'dropping' the table, I'm simply renaming existing ones with "_bak" so you don't lose data.
I'm syncing users (their notes, profiles), groups (their maps to users), and view levels. Not sure if that's inclusive of everything, but seems to work!
Instructions:
Find & Replace "josPrefix2" with the Joomla DB prefix you want to share TO
Find & Replace "josPrefix1" with the Joomla DB prefix you want to share FROM
Find & Replace "dbSite1" with the Joomla DB name you're sharing FROM
Please post if this works (or not) so I can fix up my code as well :PCode: Select all
RENAME TABLE `josPrefix2_users` TO `josPrefix2_bak_users`; RENAME TABLE `josPrefix2_session` TO `josPrefix2_bak_session`; RENAME TABLE `josPrefix2_usergroups` TO `josPrefix2_bak_usergroups`; RENAME TABLE `josPrefix2_user_notes` TO `josPrefix2_bak_user_notes`; RENAME TABLE `josPrefix2_user_profiles` TO `josPrefix2_bak_user_profiles`; RENAME TABLE `josPrefix2_user_usergroup_map` TO `josPrefix2_bak_user_usergroup_map`; RENAME TABLE `josPrefix2_viewlevels` TO `josPrefix2_bak_viewlevels`; CREATE VIEW josPrefix2_users AS SELECT * FROM dbSite1.josPrefix1_users; CREATE VIEW josPrefix2_session AS SELECT * FROM dbSite1.josPrefix1_session; CREATE VIEW josPrefix2_usergroups AS SELECT * FROM dbSite1.josPrefix1_usergroups; CREATE VIEW josPrefix2_user_notes AS SELECT * FROM dbSite1.josPrefix1_user_notes; CREATE VIEW josPrefix2_user_profiles AS SELECT * FROM dbSite1.josPrefix1_user_profiles; CREATE VIEW josPrefix2_user_usergroup_map AS SELECT * FROM dbSite1.josPrefix1_user_usergroup_map; CREATE VIEW josPrefix2_viewlevels AS SELECT * FROM dbSite1.josPrefix1_viewlevels;
- rp
The solution you posted seems to work pretty well for J! 2.5.14, I iintend to use it on a number of subdomains of a master site.
I am however encountering one problem, I have setup 2 sites linked so far. if I have site A as master and site B as linked, logged in status of either is not preserved for visiting the other. I mean if you log in on A and visit B you are shown logged out, and the reverse is true too.
I have tried setting the cookie domain in both sites, clearing session data and cache data but to no avail.
Should logged in status be preserved or have I missed the point here?
-
- Joomla! Fledgling
- Posts: 3
- Joined: Wed Dec 04, 2013 10:21 pm
Re: Users Sharing or Synchronisation between multiple sites
I agree,Should logged in status be preserved or have I missed the point here?
I have just used this in Joomla 3.1.6:
Site2 is a subdomain of site1
Site1 = public
Site2 = Login required for acces
On public (site1) users can login and are redirected to memberssite (site2) But they have to login again.
Other aspects of synchronise is succesful, I can make user, notes, groups in site 1 wich apear in site 2.
Just this one critical details of login session.
Wich line have I forgotten?
-
- Joomla! Fledgling
- Posts: 1
- Joined: Wed Feb 12, 2014 4:59 pm
Re: Users Sharing or Synchronisation between multiple sites
Same Problem as you: Joomla 1.5 + Mysql 5.1 + PHP5 > 1 database sharing 2 websites.
It works perfectly on a local server. Can register on both server and can Log in on server 1, it logs me on serve 2.
Online, I tried and tried again ... I can make account etc, but I have to log on both website. I'm host at OVH, sqlpro + one main domain + one subdomain.
Did someone found his way ?
It works perfectly on a local server. Can register on both server and can Log in on server 1, it logs me on serve 2.
Online, I tried and tried again ... I can make account etc, but I have to log on both website. I'm host at OVH, sqlpro + one main domain + one subdomain.
Did someone found his way ?
- Per Yngve Berg
- Joomla! Master
- Posts: 30881
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: Users Sharing or Synchronisation between multiple sites
Do both sites have the same $secret in configuration.php?
-
- Joomla! Apprentice
- Posts: 37
- Joined: Thu Feb 26, 2009 5:17 pm
- Location: Northeast Florida
- Contact:
Re: Users Sharing or Synchronisation between multiple sites
Thanks for the great how-to
I got the "create views" to work so far with Kunena and JomSocial. I'll be trying it with JDownloads.
However, right now, with my site still being developed, I have my site locked with Site Lock.http://extensions.joomla.org/extensions ... line/18971
I am using Joomla 3.3, PHP 5.3 and MySQL 5.1. What do I need to do to have Site Lock linked through all of my domains - I have the one "main" and 3 sub-domains. I'm not sure which tables to edit.
I'm trying to make it so that what is enabled on one site is enabled on all and the same for whatever is disabled.
Any help is greatly appreciated.
thanks in advance,
Mickey & Flip
I got the "create views" to work so far with Kunena and JomSocial. I'll be trying it with JDownloads.
However, right now, with my site still being developed, I have my site locked with Site Lock.http://extensions.joomla.org/extensions ... line/18971
I am using Joomla 3.3, PHP 5.3 and MySQL 5.1. What do I need to do to have Site Lock linked through all of my domains - I have the one "main" and 3 sub-domains. I'm not sure which tables to edit.
I'm trying to make it so that what is enabled on one site is enabled on all and the same for whatever is disabled.
Any help is greatly appreciated.
thanks in advance,
Mickey & Flip
Last edited by imanickam on Thu Jun 26, 2014 9:46 am, edited 1 time in total.
Reason: Removed the session id from the Extension's JED URL
Reason: Removed the session id from the Extension's JED URL
Flip,
The Blind wana be webmaster
The Blind wana be webmaster
- Per Yngve Berg
- Joomla! Master
- Posts: 30881
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: Users Sharing or Synchronisation between multiple sites
This is the Joomla 1.5 forum. I will not recommend this procedure for J3.x. You will have problems with the assets table.
-
- Joomla! Apprentice
- Posts: 12
- Joined: Tue Feb 07, 2006 8:44 am
Re: Users Sharing or Synchronisation between multiple sites
I'm sorry but i need to resume this old topic....Per Yngve Berg wrote:This is the Joomla 1.5 forum. I will not recommend this procedure for J3.x. You will have problems with the assets table.
I have tried this procedure for joomla 3.7., everything works ok except the login.... users must log on both websites....
The 2 sites have different domains, but they have the same db...
My question is: which problems with the asset table? despite the login problem, all seems to work...
And... is there any different solution for joomla 3.x.x if i cannot use this (jfusion is no longer developed....)