Anonymous users and $_SESSSION

Please Note: All posts made on this section of the forum will also be sent a mailing list. Before posting ensure that this is the appropriate forum.

Tags

Hi Guys

Need some help here. I need to be able to store and read session variables as an anonymous user between pages. I have installed the cache_exclude module but still with no success. I have gone as far as to disable caching on the performance page but still no joy. Is there any working solution to this problem? I cant understand why Drupal does not allow you to read and write session vars as an anonymous user. This seems rather dumb unless I'm missing something here.

NOTE: Here is a strange one. As anonymous user I can read session vars with IE7 but not in Firefox and Safari. Now this makes absolutely no sense to me but perhaps someone knows a little more about this than me cause I'm stumpted???

Thanks
Rosso

Re: Anonymous users and $_SESSSION

Hi Anton

Thanks for the response dude. I tried cache exclude module with no luck. I excluded the pages specifically and with wildcards but it was stil caching. I rectified the problem by making use of webforms hidden fields to store the required values on posts which is working great. When I get a chance again I will play around with the cache exclude module again to see why it did not want to work.

Thanks again
Rosso

Anonymous users and $_SESSSION

You mentioned that you were seeing different results in IE than Firefox
and Safari. It would be worth double checking that the cached
information you're seeing isn't coming from the browser as opposed to
the server.

Also, check the cache exclude module's issue queue on drupal.org (if you
haven't already) to see if anyone else has experienced the same problem.

George

Re: Anonymous users and $_SESSSION

Hi George

Thanks for the reply. I'm in Bloemies this weekend and as soon as the father in law is watching rugby I will be at the desk trying to figure this out (Sharks will probably get their asses kicked again.....**Sigh**).

I tried clearing the browser cache for all three browsers when it was happening but still with no luck. I also tried disabling caching for the entire site but still the same effect. I have a feeling it might be that the pages I specified were not recognised in the cache exclude module due to the fact that I was testing the site using a relative URL. Anton did test it on his side and it worked.

Anyway, Ill check it out and get back to you.

Rosso

Anonymous users and $_SESSSION

On 22 Jul 2009, at 13:53, mwskuzzy [at] gmail [dot] com wrote:You need to exclude from the cache both the pages where you set the
session variable and where you use the session variable, otherwise it
uses a cached page for that.

I just tested it and then it works.

Anton

Built using Drupal. South African Web Design and Hosting by eConsultant.