I've spent all day on this, and I'm turning to the community for some more ideas. Here is my situation:

I'm currently running a site on Drupal 5.15, which until this weekend, was working without issue. The site uses Views, Panels, Contemplate, CCK, TAC-Lite, among others. Here is what happens -

I log into the site as User 1 (or any other user), and things appear as normal. When I navigate to any given page, aside from "Page Not Found", I run the risk of being logged out. The logout doesn't appear right away - the theme thinks that I am logged in, but on the next page, my user object is gone. Currently, the theme uses a form present on all pages for login, and it checks for $user->uid == 0 before it prints the login box. Well, I've tried logging in from the standard login form... and nothing changes. Also, caching is NOT turned on (the site is still in development).

I've tried changing the base_url in the settings.php, and it made no difference. I've also tried disabling Panels (which originally I thought was the culprit), TAC-Lite, Subscriptions, and Contemplates. None of those modules is doing the trick. I've searched my template.php file for any reference to global $user, thinking that perhaps it was being unset by mistake... and nothing.

My question is, has anyone experienced something like this? I'm using Mosso as my host, and I don't know enough about session ids, but perhaps this has something to do with the host? If that were the case, why would this not be happening all along? I've verified this bug across multiple browsers (Chrome, FF3, Safari 3, IE7) and the behavior is the same, so I know its not a browser issue.

I have a feeling that people will want more information - please let me know, and any help is greatly appreciated.

Comments

phacts’s picture

Also, I've searched and struggled to find a pattern... the closest I can get is this:

If I load a page with a View on it, the chances of being logged out are very high (90%), but not consistent enough for me to pin this on views. If I load a regular page node, usually things are fine, however if I reload the page node, I have a 40% chance of being logged out.

Oh my, this is making me crazy.

phacts’s picture

To follow up on this, I've disabled my custom theme and I'm using Garland, and that has solved nothing. Any ideas as to where to look next would be great. I'm slowly disabling all modules and testing for the condition, and so far no luck.

phacts’s picture

Project: Drupal core » Views (for Drupal 7)
Version: 5.15 » 5.x-1.6
Component: user system » Code

I've found that when I disable the Views module, I stop getting logged out.

When I turn Views back on (and only Views, no extras), anytime I go to a page with a View on it, I run the risk of getting logged out. I wish it happened every time, so it would make some sense, but instead it happens 75% of the time. Its almost guaranteed that if I go to a page with a View on it, and then go to another page with a View on it, I will get logged out.

For some reason, my $_COOKIE variable disappears when I am logged out (after displaying a page with a View), and _drupal_bootstrap_full() ends up getting called twice. I'll post more when I find more, but if anyone has any ideas, I'll be excited to hear them!

phacts’s picture

Status: Active » Closed (fixed)

Ok, well the problem mysteriously went away. I had mosso restore the database to the state it was in 2 days ago (when it WAS broken, by the way), and the problem literally disappeared. At this point, I have no explanation, but I don't really care, I'm just glad its gone. Of course... I would love to know, and if I ever find out, I'll update this post.