, Guest!
Already a Member? Login or Register.





Menu



Clients



Showcase



Rate FlexCMS

ScriptSearch.com Rating:

Hotscripts Rating
Excellent!
Very Good
Good
Fair
Poor



FlexCMS eNews

To subscribe to our enewsletter, please enter your email address in the box below and click the "Subscribe" button.


Note:  You may easily remove yourself from the newsletter list at any time by following the instructions included with every mailing.

LATEST DEVELOPMENT NEWS:  FlexCMS 2.5 has been released!!! Click here to read the official announcement!

Home > FlexCMS Support Forum > User Help > General Support Requests > Stay logged in across browser sessions

FlexCMS Support Forum


Stay logged in across browser sessions
Started November 20, 2007 @ 11:04am by Wolf
Post Message 
Wolf


Posts: 47
 
Stay logged in across browser sessionsNovember 20, 2007 @ 11:04am
Is there something I can do to tweak this...

I noticed this when I login and check the "Stay logged in across browser sessions" option on the login page.

I login, do some stuff and then close my browser session.

Launch a new browser window and enter the following:

http://www.-my-domain-name-.com and I'm sucessfully back in my site without re-logging in.

When I launch a new browser window and enter the following:

http://-my-domain-name-.com and I am forced to re-login to my site.

Notice the second time I didn't specify the "WWW."

Is there a way to tweak the cookie so that I can return either way and still stay logged in?

Thanks! Smile
 
Wolf


Posts: 47
 
Domain parameter of php setcookie() functionNovember 20, 2007 @ 11:54am
Would something like this work?

http://209.85.165.104/search?q=cache:1i2SkOO7bgIJ:www.w3schools.com/php/func_http_setcookie.asp+cookie+%22www.example.com%22+%22example.com%22&hl=en&ct=clnk&cd=116&gl=us

setcookie(name,value,expire,path,domain,secure)

Where "domain": Optional. Specifies the domain name of the cookie.
To make the cookie available on all subdomains of example.com then you'd set it to ".example.com". Setting it to www.example.com will make the cookie only available in the www subdomain

setcookie("TestCookie", $value, time()+3600*24, "/", ".mydomain.com");





 
DCSun
Administrator

Posts: 421
 
November 20, 2007 @ 1:23pm
Yes, I believe that would work if you need to make that change for your site.

The other thing that's worth noting, and may solve your problem, is that although the initial page you hit shows you as not being logged in, if you click on any link on that page you'll return to the site's main URL (with the www.), which will have you logged in again.


David
 
Wolf


Posts: 47
 
ThanksNovember 20, 2007 @ 8:57pm
Hi David,

Thanks for your speedy reply!

I'm thinking in terms of users, who someimtes might use "www" and other times not -- they may think they are not still logged in.

Flex rocks!

Cheers,
Wolf
 
DCSun
Administrator

Posts: 421
 
November 21, 2007 @ 2:35pm
Wolf,

If you're concerned about people using one instead of the other, you can also tweak your site's DNS settings to redirect users to the www. when they enter the domain without it. You'd have to talk to your hosting company about that, though, since it's not really FlexCMS related and depends on the exact setup of the server.


David
 
Wolf


Posts: 47
 
:-)November 21, 2007 @ 3:14pm
Great, thank you!
 

Post Message 







All Contents, Code, Scripts and Technologies Copyright 2003-2007 FlexCMS.
All Rights Reserved. Software License Agreement

Processing Time: 0.14660 seconds.
 

Powered By FlexCMS
Powered By FlexCMS


Valid CSS!