Cann't logoff

5 posts by 3 authors in: Forums > CMS Builder
Last Post: March 5, 2009   (RSS)

By ITI - March 3, 2009

I've recently been experimenting with cms builder and have encountered a small problem.

I built a small interface on my dev computer and it worked fine so I moved it to my production computer.

On the production computer It won't logoff when you click the logoff link, just keeps coming back to the main page.

Has anybody encountered this problem?
Glen







http://www.CanadianDomainRegistry.ca







ITI Internetworking Technologies Inc.

Re: [Dave] Cann't logoff - The solution

By ITI - March 4, 2009 - edited: March 4, 2009

Well that makes sense then. My Dev machine is a windows 2003 server and production machine is still a windows 2000 server.

So I guess the quick fix is javascript:

if (@$_REQUEST['action'] == 'logoff') {
removePrefixedCookie('username');
removePrefixedCookie('passwordHash');
removePrefixedCookie('randNumber');
removePrefixedCookie('editorStates'); // I also added this.

$url = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'];
//header("Location: $url");
echo("<script type='text/javascript'>location.href='$url'</script>");
exit;
}

It appears that on the win 2000 if you don't actually exit the script the new cookie info isn't sent or deleted.
Using javascript to perform the redirection does the trick.

Glen
Glen







http://www.CanadianDomainRegistry.ca







ITI Internetworking Technologies Inc.

Re: [glenara] Cann't logoff - The solution

By ross - March 5, 2009

Hi Glen

I'll make sure Dave sees the fix you came up with. For now though, I just want to make sure this did in fact get things going for you.

If you are still running into trouble getting logged off, let me know and we'll keep at it :).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Cann't logoff - The solution

By ITI - March 5, 2009

No problems, this solution works perfectly. Javascript has to be on anyway and I shouldn't still be using the win 2000 machine. Regardless, if some one else should have a similar issue with an operating system this works. All the cookie data is completely removed and the login screen is displayed just as it's supposed to.
Glen







http://www.CanadianDomainRegistry.ca







ITI Internetworking Technologies Inc.