Jump to:
| Project: | Domain Access |
| Version: | 6.x-2.0-rc8 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Can't seem to make any progress. I'm hoping to set up an newspaper franchise arrangement also, so this would be pretty great!
Drupal 6.10
MySQL 5.0.67
PHP 5.2.6
I realize that DA is not optimized for shared hosting, but I did saw one issue where a site was successfully run on Dreamhost. I've set up my primary sites pointing to the same address, which on DH is home/username/mywebsite.com. So I'm trying to work with two sites, both pointing to same folder. I've also designated to have the domain point to either www or not. Not sure which is best. (I can have it force the www)
My set up is:
mywebsite.com/sites/all/default/settings.php
mywebsite2.com
So I set the settings.php to: $cookie_domain = '.mywebsite.com'; as per my understanding of instructions.
Not sure if that makes sense, since my other site is not a subdomain. I've also not set a base url, because I've seen in issue posts that that could cause a problem. But I can't log into mywebsite2.com. I'm always redirected to mywebsite.com.
I've tried the Single Signon module, but I can't get it working. It takes me to a page not found. I've tried a lot of different configurations. Sometimes it was "access denied". And if I don't have the base url established in the settings file, I get a redirect loop error page.
If it's a shared hosting thing, I'll concede defeat, or consider the better option. But if there's any way you can help me sort this out would be great.
Comments
#1
You can run DA on shared host, here are my instructions for running it on Dreamhost - http://blog.theoriginalnetbaby.com/blog/09/05/installing_drupal_domain_a...
Are you using any other modules (such as Domain User Default) in addition to DA that would redirect user to his default domain?
When you get redirected to mywebsite.com is there a status message?
#2
You would have to use Single Sign On, since you cannot share cookies between mysite.com and mysite2.com.
Single Sign On has a configuration option for integrating with DA, which I believe solves the $base_url issue, so make sure that is enabled.
#3
Thanks to you both for taking the time to answer my question. It seems I didn't understand the instructions properly. So, as I understand it, having to sign on to each site is a normal function of the module. The instructions suggest that, to avoid having to do so, one CAN set the cookie url with a ".", but that is in case it it working with subdomains. I wasn't. So I shouldn't have been setting the cookie url. Sorry if that seems obvious, but only call myself a Drupal themer, and am duly indebted to the skills of you Drupal programmers. The instructions also say "OR" use the Single Signon module. So that's what I could use if I want to avoid repeated log-ins. I get it!!
Thanks again
#4
See http://en.wikipedia.org/wiki/HTTP_cookie for some background on why this is the case. You can share cookies among the following:
example.com
one.example.com
this.example.com
But you cannot share between:
example.com
example2.com
This is a security feature of the cookie specification. Single Sign On helps route around this feature.
#5
Hello, I activated this issue again, since I have a problem of logging into secondary domains as well.
Several domains on one server, sharing one database.
Drupal 6.12
Domain Access 6.x-2.0-rc8 (domain strict and domain user not activated)
Contents appears correctly on the assigned secondary domains and rewrite is working well too.
The administrator and other users ARE assigned to the secondary domains in admin/user/user/list, but still there is no way to sign in at any of the domains. No error message though, nor sent to the main domain, just back to the page you were with still the login block appearing.
I tried with adding roles dynamically and adding roles to the administrator, but no difference. As if you were hitting F5....
When activating Shared Sign On (6.x-1.3) I get into a redirect loop, mentioning that "this may be caused by cookies that are blocked". I really DON'T (<- correction, sorry..) understand the whole cookie stuff, but I have the impression that is not really the problem. And it seems contradictory to #4...
Any suggestion anyone? Thanks!
#6
I suspect that really is the problem. SSO has an 'integrate with DA' option that needs to be enabled.
Are you using subdomains or unique domains? Did you set $cookie_domain in settings.php?
#7
Hi Agentrickard,
thanks for your fast answer.
Maybe I didn't explain clearly, I DID try SSO both with and without 'integrate with DA'.
Actually SSO with 'integration' seems to be the worst option, goes in a loop and leads to error message. Without SSO or SSO without 'integration' at least the page appears, although not possible to sign in.
settings.php says: $cookie_domain = '.primarydomain.com';
there is also some: ini_set('session.use_only_cookies', 1);
Anything needed to be done with them??
I've been trying to 'master' Drupal for over two years now and I still feel like an absolute newbie. It's desparing and profoundly frustrating. The more I try to do the more I get the impression I'd better had stuck to plain HTML.... At least one understands what he is doing.
Oh, we're talking unique domains.
#8
If using unique domains, then comment out the $cookie_domain line. You can't set a cookie for '.primarydomain.com' on, say, 'thisotherdomain.com', which probably leads SSO into its infinite loop of fail.
#9