<![CDATA[ New in 2.2.1: Session-less Contexts - My Forums]]> https://forums.modx.com/thread/?thread=75651 <![CDATA[Re: New in 2.2.1: Session-less Contexts]]> https://forums.modx.com/thread/75651/new-in-2-2-1-session-less-contexts?page=3#dis-post-564563
- http: //mydomain /membership/paths ... -> membership context
- http: //mydomain /video/paths ... -> video context

$context = 'web'; //default context

$parse = parse_url($_SERVER['REQUEST_URI']);
if (preg_match("/^\/(membership|video)\//", $parse['path'], $matches)) {
    $context = $matches[1];
}

/* Initialize the default 'web' context */
$modx->initialize($context);
]]>
lokamaya Mar 23, 2019, 02:25 PM https://forums.modx.com/thread/75651/new-in-2-2-1-session-less-contexts?page=3#dis-post-564563
<![CDATA[Re: New in 2.2.1: Session-less Contexts]]> https://forums.modx.com/thread/75651/new-in-2-2-1-session-less-contexts?page=3#dis-post-564562 Quote from: opengeek at Apr 05, 2012, 04:19 PM
We added a cool new feature in 2.2.1 for sites that have no need for delivering personalized content. It's called Session-less Contexts, can improve front-end performance ~40 times, and you can read about it here.

Hi Jason,
I created several contexts in frontend: web, membership, video. I add session_enabled for each context.

- web: NO
- membership: YES
- video: YES

But whenever I disable session in web context, all session in other contexts has been disabled.]]>
lokamaya Mar 23, 2019, 01:30 PM https://forums.modx.com/thread/75651/new-in-2-2-1-session-less-contexts?page=3#dis-post-564562
<![CDATA[Re: New in 2.2.1: Session-less Contexts]]> https://forums.modx.com/thread/75651/new-in-2-2-1-session-less-contexts?page=3#dis-post-481773 Quote from: dantarifa at Nov 04, 2013, 10:59 AM
Enabling this will no longer allow you to view unpublished resources from the front-end right?
That is correct, but you could try the pre-release version of my Revise extra which includes a built-in Preview. Or something similar.]]>
opengeek Nov 04, 2013, 01:53 PM https://forums.modx.com/thread/75651/new-in-2-2-1-session-less-contexts?page=3#dis-post-481773
<![CDATA[Re: New in 2.2.1: Session-less Contexts]]> https://forums.modx.com/thread/75651/new-in-2-2-1-session-less-contexts?page=2#dis-post-481749 dantarifa Nov 04, 2013, 10:59 AM https://forums.modx.com/thread/75651/new-in-2-2-1-session-less-contexts?page=2#dis-post-481749 <![CDATA[Re: New in 2.2.1: Session-less Contexts]]> https://forums.modx.com/thread/75651/new-in-2-2-1-session-less-contexts?page=2#dis-post-465662 Quote from: acidrat at May 07, 2013, 09:50 AM
UPDATE: i have found out that if i set session_enabled 0 in the web context then i dont get the session cookie in all context's. Could the http://rtfm.modx.com/display/revolution20/Using+One+Gateway+Plugin+to+Manage+Multiple+Domains Gateway plugin be the cause of the problem?
Yes. Whatever context is initialized handles the session. If you need different sessions for different Contexts, you should look into using a custom gateway per Context, or a custom index.php that initializes the correct Context for the request (vs. switching to it like the plugin solutions would).

Also, keep in mind that each domain has a separate session, since session cookies are stored in the browser by domain. Exception being if you specify all sub-domains in the session_cookie_domain setting (or session.cookie_domain PHP ini config), e.g. .domain.tld.]]>
opengeek May 08, 2013, 07:34 AM https://forums.modx.com/thread/75651/new-in-2-2-1-session-less-contexts?page=2#dis-post-465662
<![CDATA[Re: New in 2.2.1: Session-less Contexts]]> https://forums.modx.com/thread/75651/new-in-2-2-1-session-less-contexts?page=2#dis-post-465560 Quote from: opengeek at Apr 25, 2013, 06:27 PM
Are you sure you are not using the same browser session you are logged into the manager with?

positive. even using different browser, loged out of manager -> still gettings session cookie

UPDATE: i have found out that if i set session_enabled 0 in the web context then i dont get the session cookie in all context's. Could the http://rtfm.modx.com/display/revolution20/Using+One+Gateway+Plugin+to+Manage+Multiple+Domains Gateway plugin be the cause of the problem?]]>
acidrat May 07, 2013, 04:50 AM https://forums.modx.com/thread/75651/new-in-2-2-1-session-less-contexts?page=2#dis-post-465560
<![CDATA[Re: New in 2.2.1: Session-less Contexts]]> https://forums.modx.com/thread/75651/new-in-2-2-1-session-less-contexts?page=2#dis-post-464370 opengeek Apr 25, 2013, 01:27 PM https://forums.modx.com/thread/75651/new-in-2-2-1-session-less-contexts?page=2#dis-post-464370 <![CDATA[Re: New in 2.2.1: Session-less Contexts]]> https://forums.modx.com/thread/75651/new-in-2-2-1-session-less-contexts?page=2#dis-post-464315 Quote from: AMDbuilder at Apr 25, 2013, 02:33 AM
Did you clear the site cache?

Yep, even the cache files. Still getting the Session Cookie and a new entry in modx_session db.]]>
acidrat Apr 25, 2013, 04:03 AM https://forums.modx.com/thread/75651/new-in-2-2-1-session-less-contexts?page=2#dis-post-464315
<![CDATA[Re: New in 2.2.1: Session-less Contexts]]> https://forums.modx.com/thread/75651/new-in-2-2-1-session-less-contexts?page=2#dis-post-464256 AMDbuilder Apr 24, 2013, 09:33 PM https://forums.modx.com/thread/75651/new-in-2-2-1-session-less-contexts?page=2#dis-post-464256 <![CDATA[Re: New in 2.2.1: Session-less Contexts]]> https://forums.modx.com/thread/75651/new-in-2-2-1-session-less-contexts?page=2#dis-post-463861
I have set the session_enabled to 0 and it still initializes new session. Modx 2.2.7]]>
acidrat Apr 22, 2013, 08:21 AM https://forums.modx.com/thread/75651/new-in-2-2-1-session-less-contexts?page=2#dis-post-463861