create new account | forgot password


posted by dennisn on October 19th, 2008 at 12:05PM

There's no /absolute/ way to tell what's unread, but I think it's a reasonable tradeoff. It's a pain in the ass to program, since it involves (number of users) * (number of posts) extra variables, and only to cover extreme cases.

I've decided to make this cms more of a blog. History has clearly tended towards this pattern of usage--rarely, if ever, has anyone resurrected an old discussion in an old post. Pretty much 99.9% of the time, people only debated in the most recent stories (listed at the top of the front page) for a few days. MF has always tended to be a "recent local news" aggregator.

So, in the event that you are an infrequent reader (not the target audience of the site), you can be reasonably assured that simply paging through the stories until you hit one you remember reading, you'll have read all the unread content.

As for the logging-out problem--I'm not sure what's causing it. (I haven't been able to reproduce it yet.) I suspect it's something to do with apache's multiple-threads thingy, which I remember us having a problem with before--but don't remember the details of. For single-user testing, it does work--cookies are created and set to expire a long time from now, and only deleted during logout (which I don't think the old CMS was doing.)
Link | Parent


 
 

posted by dennisn on October 19th, 2008 at 12:34PM

To debug, confirm (in your browser's cookie manager) that you have one (just one) from this domain, with NAME=PHPSESSID, and place it's content (the actual session id).

(Ie. My session id is currently 7d18...2c, and is set to expire in October of 2009).

posted by dennisn on October 23rd, 2008 at 9:55AM

Hrm. This morning I got logged out, both from this site, and from my testing (single-user) site. But the same cookie is still there. So, somehow, the $_SESSION['uid'] variable got deleted.

There is an option in php.ini to control the (garbage collector's) maxlifetime of session variables, but it's set to 1440s (24min), so it can't be that, since if it were, I'd have been logged out every morning.

Ideas?

posted by dennisn on October 23rd, 2008 at 10:45AM

Ok. I /think/ I fixed it. The problem does indeed seem to be with the garbage collector. The default configuration is to "mark" all session data over 24 minutes old as garbage, and then there is a default probability of 1% that it will get deleted "some time" after this period.

I changed the session data maxlifetime to over a year, roughly the age of the cookie, and had to restart apache, so all your sessions got deleted :)--you'll have to log in again :|... hopefully for the last time.