Can someone explain how sessions work in embedded mode so I can resolve problems?
toastmaster
Joined: 2003-05-01
Posts: 219 |
Posted: Fri, 2006-05-19 09:07 |
When I FIRST visit my site, via a direct link to an embedded album, it kicks me back to the main page. But it then adds a session variable, eg: I'm wondering now about what the different type of sessions mean, and how gallery works etc. For example, from other postings, it seems that Gallery should have it's own sessions directory somewhere under my "root level" g2albums. With the cookies section setup to be / and .digitaltoast.co.uk in gallery, if I look in cookies in my browser, I get: If I delete both cookies, then refresh the page, then the whole lot is appended to the url! NOW - if I blank out the cookies section in the galleries preferences, then all I get under digitaltoast.co.uk is the google analytics cookies, and under www.digitaltoast.co.uk I now have "PHPSESSID" and "blog GALLERYSID", neither of which bear any relation to what's in the session directory. The WPG2 people have told me that this is nothing to do with WPG2, and when running gallery in standalone mode, this doesn't happen. If I could get more info about how sessions in embedded mode work, then perhaps I could try and resolve this. Gallery version = 2.1.1 core 1.1.0.1 |
|
Posts: 8601
I don't really understand what the problem is, but I can tell you this: Gallery tries to determine whether your browser allows cookies.. when you first visit G2 there is no cookie, so G2 is uncertain if you don't allow cookies or just don't have one yet. So it sends back a cookie AND adds the session id to URLs on that page. When you click a link the next request will either get the cookie (now G2 sees you allow cookies and won't add the sessionid to all the URLs anymore) or if cookies aren't allowed then it gets the sessionid from the URL and will continue adding the id to future URLs.