News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Cannot Stay Logged in (Cookie problem?)

Started by Terragen, April 10, 2004, 12:31:17 PM

Previous topic - Next topic

CP

I have a user at my site with the same issue. He cannot stay logged in for more than 24 hours.

"Ever since the switch to SMF, I've had to log-in every day, in spite of using "forever" while signing in.

Is the cookie set to expire after 24 [or so] hours, or do I have to enable something?

Session cookies and persistent cookies are enabled. Third party cookies and many of the vulnerable functions are disabled [ActiveX, Web Bugs, Mobile Code & etc].

I don't have this problem with Vbullletin, Phpbb, Snitz nor Invision."

[Unknown]

Do you have local cookies or global cookies set?

-[Unknown]

CP

I have neither one of these checked
Enable local storage of cookies
(SSI won't work well with this on.)
   
Use subdomain independent cookies
(turn off local cookies first!)

[Unknown]

The cookie it is setting expires on Friday, May 28, 2010 9:20:51 PM.

-[Unknown]

CP

Seems this was most likely another software issue causing this.
Those of you still having this issue may wish to loo at your Zone Alarm settings.
For those of you using this that is.
Here is a quote from user with that issue:
"I think I found the problem. Self inflicted....

If my thinking is correct, it involves the ZA Pro "cache cleaner" [set to run daily] and a slight change in the name of the cookie.

My ZA "cookies to save" list included cpfools.com. Apparently this was the cookie generated by Invision.

There was another cookie, www.cpfools.com. This may be the cookie made by SMF.  I added it to the "cookies to save" list, last night.

I didn't have to log-in this morning.

I think we can rule out any "date change" problems with the cookie. If I make it through the day, we can rule out any "24 hour" problems."
So, at least this could be something for others to review. 

npeelman

For those of you with this type of problem please remember to take a look at the following:

php.ini
---------

session.cookie_domain ""

...

Make sure that this is set to reflect your domain name... easily added to Apache config as:

php_value session.cookie_domain "www.yourdomain.com"

p.s. especially if you use virtual hosts.

Norm
www.easyavatar.com [nofollow]

[Unknown]

You shouldn't need to change that, though - only if you're using redirection or something.

-[Unknown]

npeelman

Quote from: npeelman on July 23, 2004, 12:39:11 PM
For those of you with this type of problem please remember to take a look at the following:

php.ini
---------

session.cookie_domain ""

...

Make sure that this is set to reflect your domain name... easily added to Apache config as:

php_value session.cookie_domain "www.yourdomain.com"

p.s. especially if you use virtual hosts.

Norm
Quote from: Hector Gonsales on July 23, 2004, 09:58:33 PM
You shouldn't need to change that, though - only if you're using redirection or something.

-[Unknown]

Not sure if you were replying to me but I use Opera the most (99.9%) and used it's cookie functions to warn me of invalid cookies and that was the problem. The cookie domain did not match the current domain (of my virtual host). Setting the value in my Apache2 httpd.conf file fixed all the problems I was having (ie: couldn't logout, delete messages, etc.) Now it works like a charm.
www.easyavatar.com [nofollow]

gijs

#48
I have the same problem:

windows IIS 5.1 / php etc etc

can log in fine, browse, post etc, but next time people always have to log in again (stay logged in forever not possible).

tried changing php.ini in several way, but no success yet.

I also tried this test:

<?php
$userid 
1;
$passwd "passwordstring";

setcookie("project4_userid""$userid$passwd"time()+365*24*60*60); 

if (isset(
$_COOKIE['project4_userid'])) {
echo 
"cookie set: ".$_COOKIE['project4_userid'];
}
else {
echo 
"The cookie is not set";
}
?>



and it returns the first time a 'The cookie is not set'  and after refreshing: 'cookie set: 1, passwordstring'

any ideas??

[Unknown]

Can I see a phpinfo.php, please?

-[Unknown]

roboter88

Btw i think upgrading to rc1 should fix this issue.

cheers

gijs

#51
 :o

Although I tried everything before, I doubledoubledouble-checked today the permissions for the 'session.save_path = ' in php.ini....
Pretty sure that I have looked at that before, but I found that IUSR had no permissions there.... wooooooooooops

That solved everything for me :-)

Giving IUSR full permissions in the session.save_path-folder and with these settings in php.ini things are working for me:

[Session]
session.save_handler = files
session.save_path = "c:\php4\php4\tmp"
session.use_cookies = 1
session.use_only_cookies = 0
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 10000000
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor     = 100
session.gc_maxlifetime = 1440
session.bug_compat_42 = 1
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="



Prone

Quote from: -Garion- on April 24, 2004, 06:34:58 PM
I want to point out that while I have the same problem, I found a temp solution (which in truth isn't really a solution).  If you were logged in before, and after either closing the browser or visiting another website, and upon re-entering the forum visitors will have been logged out and shown as guests.  But I discovered that by just clicking the home button, or attempting to view any of the boards will automatically log you back in (without having to type in username & pass)!  Weird.. so basically, if you have this problem, all you need to do is re-click the HOME button and it'll reload the page and log you in at the same time.

Same here too. Always clicking the Home button when I come back. I don't have any problems coming back to the forums from an email notification though.

AND NO: I'm not running IIS or anything, SMF runs on Apache. All YaBB versions have been there before, never encountered the problem before.
Webmaster http://www.syndicate-1.com

SyndicateOne - For All your gaming needs

LostProphecy

*sighs*

i'm still having this cookie problem, i've created a thread on my site and try and gather information about when, how, why, what... with the problems...

so far i've tried  with a few ppl's help (unknown, andrea)
....turning off local and global cookies
....renaming cookie
....using different browers

still the same issues, session verification failures on replying to topics but not posting new topics... accessing admin center....inability to log out

our last attack of fixing things only seemed to last for a day before the same problems came back...

strangely enough some of my members have stated that if they post in one board in particular their problems seem to go away :-\... it sounds pretty bogus to me but if it's right it sure is bizarre...
Angelus Ex Quo Nox

gijs

I also still experience the same problem....  :-\

zagor

I have same problem wirh user can't stay logged in, they must relogin each time they visit forum.
Clicking on home, profile and other buttons seems to fix this, so I assume there must be a refresh problem or something like that.

[Unknown]

Quote from: zagor on March 06, 2005, 09:12:31 AM
I have same problem wirh user can't stay logged in, they must relogin each time they visit forum.
Clicking on home, profile and other buttons seems to fix this, so I assume there must be a refresh problem or something like that.

Are you using subdomain independent cookies?

-[Unknown]

zagor

I tried either local or subdomain and nothing worked.
I also can't logout. Clicking on logout takes me to index forum page.
I converted from yabb 1.3 sp1
check it out: hxxp:stripovi.net/forum [nonactive]
you can register without email verification.

[Unknown]

Sorry, zagor, for taking so long to respond.  I suggest you post new topics if you have new support requests.

Works fine for me?  Try clearing your cookies.

-[Unknown]

Advertisement: