Help - Search - Members - Calendar
Full Version: Remember Me
Movable Type Community Forum > Other Product Discussion > Bugs and Odd Behavior
Woody
Any ideas on what I can check for when the "Remember Me?" check box seems to have no effect for me to log in to MT? I tried deleting all cookies to no affect - it just never remembers who I am.

My browser, apache, and MT are installed on the same machine, could this be an issue in remembering?

Woody
girlie
If I had to take a wild guess, I'd say that mt.cgi is located somewhere like this:

http://www.yourdomain.com/cgi-bin/mt.cgi

but you're using this URL to access it:

http://yourdomain.com/cgi-bin/mt.cgi

Possible?
Woody
Whoa, excellent guess! I'm using
http://woody.myhomeserver.com

But if I use http://www.woody.myhomeserver.com, it still doesn't work. It isn't a big deal and if I get time today I may try and look into it deeper. I just checked and it doesn't appear to be setting a cookie at all, which may be by design if the server/browser are on the same machine?

Woody
girlie
Are you also using the "www" in your CGI Path in mt.cfg?

I never use the Remember Me feature for my MT login, so I have no idea where/what the cookie looks like.

If you set your browser to prompt you before setting cookies, do you get prompted at all?
Woody
QUOTE
Are you also using the "www" in your CGI Path in mt.cfg?


I wasn't using www in mt.cfg, so I added it but still no go. If I turn the security settings to the max on IE, it tells me it is blocking a cookie from mt, but if I move it back I get no such warning.


Ok, a little testing:

I log in with remember me checked and I see a cookie has been set. It has a good future expiration date (2013). But as soon as I click log out the cookie is deleted.

If I just exit the window, the cookie remains but it still doesn't remember me when I open a new window to connect.

Woody
Woody
QUOTE
Are you also using the "www" in your CGI Path in mt.cfg?


Well it turns out you were VERY close in why the remember me wasn't working for me. My configuration has mt.cfg at MT/mt.cgi. I was accessing it as mt/mt.cgi (all lowercase).

I renamed the directory to be all lower case and corrected the mt.cfg and it now remembers me smile.gif

Thanks girlie!

Now if I could just get it to run under mod_perl...

Woody
shacker
I seem to have a variant of this problem. I am remembered on all .cgi pages (comment popups) but not on .php pages (individual archives). So when I click a link from an MT-generated email that links to an archive, I have to type in my info again. The problem is consistent across browsers.

My domain is not accessible without the www, so that's not an issue. No upper vs. lowercase in mt.cfg discrepancy.

In Safari's cookie manager I see cookies for mt-comments.cgi but nothing else.  What else can I check?
girlie
Try removing the OpenComments function from the HEAD section of your Individual Archive Pages. It's not needed on those pages, because you're not using popup comments there, plus I believe it's causing a Javascript error, which might be interfering with your remember me function.
shacker
Hi girlie - Thanks but no dice. Here is a page with the OpenComments function removed from the head.

http://www.birdhouse.org/blog/archives/000694.php

If you post a comment, will it remember you when you reload the page? It won't remember me. I can delete a test post if you like.

Thanks,
Scot
girlie
Duhhhh....you don't have any of the Javascript functions you *do* need at the top of the page!

CODE
var HOST = '<$MTBlogHost$>';

// Copyright (c) 1996-1997 Athenia Associates.
// http://www.webreference.com/js/
// License is granted if and only if this entire
// copyright notice is included. By Tomer Shiran.

function setCookie (name, value, expires, path, domain, secure) {
   var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "");
   document.cookie = curCookie;
}

function getCookie (name) {
   var prefix = name + '=';
   var c = document.cookie;
   var nullstring = '';
   var cookieStartIndex = c.indexOf(prefix);
   if (cookieStartIndex == -1)
       return nullstring;
   var cookieEndIndex = c.indexOf(";", cookieStartIndex + prefix.length);
   if (cookieEndIndex == -1)
       cookieEndIndex = c.length;
   return unescape(c.substring(cookieStartIndex + prefix.length, cookieEndIndex));
}

function deleteCookie (name, path, domain) {
   if (getCookie(name))
       document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
}

function fixDate (date) {
   var base = new Date(0);
   var skew = base.getTime();
   if (skew > 0)
       date.setTime(date.getTime() - skew);
}

function rememberMe (f) {
   var now = new Date();
   fixDate(now);
   now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
   setCookie('mtcmtauth', f.author.value, now, '', HOST, '');
   setCookie('mtcmtmail', f.email.value, now, '', HOST, '');
   setCookie('mtcmthome', f.url.value, now, '', HOST, '');
}

function forgetMe (f) {
   deleteCookie('mtcmtmail', '', HOST);
   deleteCookie('mtcmthome', '', HOST);
   deleteCookie('mtcmtauth', '', HOST);
   f.email.value = '';
   f.author.value = '';
   f.url.value = '';
}

//-->


That's from the default Individual Entry Archive - you need to put that between the script tags (right after the OpenTrackBack function would be a good place).

There wasn't any "remember me" function for your page to use.

Sorry I didn't notice that the first time around, hehe.
shacker
Aha ... of course that would block up the pipes pretty good. Duh myself, must have inadvertently left that out during redesign.

Unfortunately... inserting the rememberme and related functions have not fixed  the problem. Still can't get it to remember me on any of the individual archive pages. The functions and function calls appear to be exactly the  same as in MT's Individual Archive template, unless I'm missing something.
girlie
I just posted a test comment to your blog (which you'll want to delete) - and it remembered me!
shacker
Hmm.. this is getting more curious by the minute. IE/Mac remembers me fine. If I delete all my Safari cookies and re-remember, it does store cookies for me, but doesn't populate the form with my data when I revisit the page. It does however work with .cgi comment pages.

Thanks for your suggestions and your testing. At least I know now the problem isn't with my site.
shacker
Experimenting now with other people's blogs... I am not remembered on .HTML or .PHP pages at other people's blogs when surfing with Safari. Any other Safari users encountering this?
adamrice
I'm having similar problems.

I recently moved servers. Since the move, I occasionally get dumped out to the login screen after writing a post. This behavior seems unpredictable, and (at a guess) seems cookie-related.

Cookies for commenting seems to be off completely: MT is making no attempt to set cookies when I post comments. I've tried clearing all cookies associated with my domain, but no change.

I believe all my paths are set correctly, so I don't think that should be it.
adamrice
More info:

1. For some reason, the nominal path to MT and the actual path are different. I tried playing around with my mt.cfg file, and found that if I put in the "obvious" path, I couldn't log in. The only thing that works is
mydomain.com/~myaccountname/cgi-bin/mt/mt.cgi
The "obvious" path would be
mydomain.com/cgi-bin/mt/mt.cgi

2. If I hit the MT editing interface at the "obvious" path, it brings up an "invalid login" screen and invites me to log in again.

I suspect this has something to do with the cookie problem, somehow.

Also: I know a few other people posting on these forums host their site at DR2.net. That's where I'm at. I've found the support to be excellent, but I've had some configuration problems. I'm wondering if other people with the cookie issue are hosted at DR2 as well.
shacker
FWIW, this bug has been fixed in Safari  beta v60, released by Apple today. MT now remembers me on all page types.

Later... sorry false alarm there. This bug is still present in Safari v60.
dale
QUOTE (shacker @ Jan 24 2003, 09:11 AM)
Experimenting now with other people's blogs... I am not remembered on .HTML or .PHP pages at other people's blogs when surfing with Safari. Any other Safari users encountering this?

Using Safari, I am remembered some places, but my own site never remembered me.
http://66.46.177.46/bm/
I've never been able to solve this problem (it works in IE 5 Mac).
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.