Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By hus- on
Hey guys, was just wondering how I would go about setting up my Single Sign on with no modules in Drupal 7. I had it running in Drupal 6 but some things were changed in the settings.php file and I'm having a hard time figuring this out.
You can also use a reference to a schema/database as a prefix. This maybe * useful if your Drupal installation exists in a schema that is not the default * or you want to access several databases from the same code base at the same * time. * Example: * @code * 'prefix' => array( * 'default' => 'main.', * 'users' => 'shared.', * 'sessions' => 'shared.', * 'role' => 'shared.', * 'authmap' => 'shared.', * ); * @endcode * NOTE: MySQL and SQLite's definition of a schema is a database.
This is the code I need to set this up, I just don't know where to put it in my settings.php file. Any ideas?
Comments
bump - still have not solved
bump - still have not solved this problem
Single Sign On Drupal 7
Hi There,
To setup single sign on using no module is simple.
For example you have two sites on the same domain (site1.example.com and site2.example.com)
Lets assume that site1.example.com stores shared data and settings.php for this site is:
For site2.example.com settings.php will look like this:
Note that database user should have access to both databases (db_site1 and db_site2)!
This works
This is great Piece of information!
Dont work for me!
Thanks brohter for the tutorials, but im execute step by step but i cant see single sign on,
im configuring the main and slave sites but dont work sso, in drupal 6 im using similar code in settings, but drupal 7 dont work, im ussing openpublish, Olmpikus
Yes is only my error
Look, the tutorial iis very good, im not shure of how database can connect, and yes need create database for all with same user of database, thanks.
different host
Hello, how about on different hosts?
I just want to share user datas, content and others will use a local database,
such as:
site1.example.com-->192.168.0.1, with local database db_site1,
site2.example.com-->192.168.0.2, with local database db_site2,
Now I want site2 to use site1's user data, Is that possible? can any one give an example?
Thanks.
THANK YOU!!!!
I've been burning my eyes reading lots of tutorials that didn't work for D7 and then I found you!!!!!
I did what it is written here and I could log in site2 and site3 with user accounts from site1. the problem was that now site1 was not accepting any login... (I don't know why)
I have erased these lines
$base_url = 'http://site1.example.com';
$cookie_domain = '.example.com';
on site1 settings.php and now it works perfectly on every page.
Thanks again!!!
Installation...
This looks like it's exactly what I'm looking for (I have a main site http://example.com and a subsite http://sub.example.com), but I am running into issues with it actually accepting the settings.php. I wipe out the existing settings.php file, run the installation, but the installation ends up getting rid of the 'prefix' values. How were you able to accomplish this without the prefix being wiped out?
Does this apply to my site as well?
Will this apply to my site if it is setup as www.example.com (for the main site) and a sub site of www.example.com/training? We have two separate builds of D7 performing 2 separate functions and would like to link the two sites together with just a simple login for the main. Keep in mind I set the sub "/training" site up as a virtual directory in IIS7.
Thanks! it works for me.
Thanks! it works for me.
failed to share images
Thanks for your sample, now my http://v9zz.com and http://bbs.v9zz.com can share users with this setting. I sitll have some questions, how to share the avatars?
And my http://down.v9zz.com launched on another host, how can I share users with the main site? Thanks, very much.