1 btreece Jul 08, 2016 19:26
3 fplanque Jul 08, 2016 22:04
You are not experiencing an "issue" with multiple domains use. This is how cookies work: they are specific to a single domain. They cannot be shared between domains.
The php.net examples are not representative because they are all on the same domain: php.net !
What you are asking for is more like if I log in on php.net, I also want my cookies to be sent to microsoft.com and to apple.com.
For security reasons, all browsers restrict cookies to a single domain like xyz.com
(sometimes they even require 3 parts in the domain, like xyz.co.uk
).
What you want to do is beyond what cookies can do.
Regarding instance name: it should never be empty. B2evo is not designed to work without an instance name.
4 btreece Jul 08, 2016 23:06
It's my understanding that b2e uses index.php in the root to route requests to specific controllers. If this is the case, it has access to all requests on the single root domain before the request is processed (which is where b2e outputs the destination domain). If I'm not mistaken (limited exp with their multi-domain setup), Bolt CM does exactly this with cookies.
So is that a limitation of cookies, or a limitation of b2e? (no offense intended)
Back to the instance name: what I enter should be represented in the cookie, then, should it not? If I enter an instance name of xyz, the cookie must start with sessionxyz, right? It's acting as if the instance name is hard-coded into the core somewhere (probably _advanced.php), in which case, why is the setting in the back office at all? And fyi, it's empty and the site is working as expected in all other areas. Further supports the setting isn't being used somehow. Maybe it's not supposed to? idk
5 fplanque Jul 08, 2016 23:31
All domains will call index.php indeed, but Your browser will not pass the cookies from one domain when calling another domain.
See http://b2evolution.net/man/troubleshooting-cookies for an example of looking at what cookies your browser is sending or not sending. You can see for yourself that your browser will not send the cookie from one domain to another domain.
Regarding the instance name, yes it is in the configurations files. It is NOT in the backoffice. What you set in the bakcoffice is NOT the instance name (you probably refer to the site code, which is a code that is only for visually identifying the backoffice when you are running a few dozens of b2evolution installs, as some of us do...)
6 btreece Jul 08, 2016 23:35
THANK YOU! Yes, site code. My mistake.
This is getting annoying... I type replies, press send, and it disappears.
Anyway, short version this time. The cookie being set on the above setup has two issues.
1) I've changed the instance name to ss, but the cookie still shows the default b2evo instance name on all domains. I've unset that instance name, realizing I don't need it in my single install setup, no changes.
2) The single underscore that's supposed to separate the instance name and domain in the cookie name is actually coming across as a double underscore. Doubled checked _advanced.php and it's only calling for 1 underscore.
Could any of that be causing the issue I'm experiencing with multiple domain use?