Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Cookie question

Asked Modified Viewed 5,746 times
S
Skeeve
S
Skeeve 10
"The world is my country, and do good is my religion." - Thomas Paine
  • Member, joined since
  • Contributed 81 posts on the community forums.
  • Started 19 threads in the forums
  • Started this discussions
asked
Member

This isn't one of those "I can't login" or "I keep getting logged out" threads.

I've looked in Search but there are quite a lot of cookie threads.

My issue is the length of time a member is logged in. Before the upgrade, I could login to my site and stay logged in for a week, and all my New Posts worked just fine. Every Monday or so, I'd have to actually click Login and New Posts worked fine.

But since upgrading, I have to login multiple times a day if I leave the site, and New Posts aren't highlighted like they should be.

I seem to remember a couple years ago that I set the length of the cookie expiration somewhere. I think. Or am I misremembering I did?

It's a pain to have to look at the post date/time to figure out if I've read a thread or not.

Thanks.
0 replies

16 posts

P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

And your version now?
0 replies
S
Skeeve
S
Skeeve 10
"The world is my country, and do good is my religion." - Thomas Paine
  • Member, joined since
  • Contributed 81 posts on the community forums.
  • Started 19 threads in the forums
  • Started this discussions
answered
Member

7.02.03
0 replies
P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

Maybe something wrong with time on your server/PC?

Is there any errors in admin->errors?
0 replies
S
Skeeve
S
Skeeve 10
"The world is my country, and do good is my religion." - Thomas Paine
  • Member, joined since
  • Contributed 81 posts on the community forums.
  • Started 19 threads in the forums
  • Started this discussions
answered
Member

Let me rephrase my problem. I want to login and stay logged in until I actually click Logout.

It was set this way before I upgraded to the latest version. Also, my "new posts since last visit" isn't working correctly. When I log in, the new post indicator icons are showing no new posts, yet looking at the post times, I can see there are new posts.

Merged on Dec 24 2011 at 21:02:41:
Is it still considered bumping if I wait 3 months?

I still have this cookie issue. :(
Edited by Skeeve on 25-12-2011 05:02,
0 replies
— 2 months later —
P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

Problem with date/time on your/server side?
0 replies
S
Skeeve
S
Skeeve 10
"The world is my country, and do good is my religion." - Thomas Paine
  • Member, joined since
  • Contributed 81 posts on the community forums.
  • Started 19 threads in the forums
  • Started this discussions
answered
Member

No, everything is correct. It started with the last core update. 7.02.03

I have to login each day, I'm assuming the cookie is set to 12 hours, because I can come back during the day and be logged in, but longer than that and I have to login again. Once I do log in, Threads Since Last Visit doesn't show previous posts. It only works after I have logged in and someone posts afterwards.
0 replies
A
Ankur
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
answered
Veteran Member

Try looking it in the function includes\classes\Authenticate.class.php :
function setUserCookie($userID, $salt, $algo, $remember = false, $userCookie = true)

May be you will get some idea from there B)
0 replies
S
Skeeve
S
Skeeve 10
"The world is my country, and do good is my religion." - Thomas Paine
  • Member, joined since
  • Contributed 81 posts on the community forums.
  • Started 19 threads in the forums
  • Started this discussions
answered
Member

// Set User Cookie
   public static function setUserCookie($userID, $salt, $algo, $remember = false, $userCookie = true) {

      global $_COOKIE;

      $cookiePath = COOKIE_PATH; $cookieName = COOKIE_USER;

      if ($remember) {
          $cookieExpiration = time() + 1209600; // 14 days
      } else {
          $cookieExpiration = time() + 172800; // 48 hours
      }

      if (!$userCookie) {
         $cookiePath = COOKIE_PATH."administration/";
         $cookieName = COOKIE_ADMIN;
         $cookieExpiration = time() + 3600; // 1 hour


Here?
0 replies
R
Rush_
R
Rush_ 10
  • Junior Member, joined since
  • Contributed 34 posts on the community forums.
  • Started 3 threads in the forums
answered
Junior Member

 if ($remember) {
$cookieExpiration = time() + 60*60*24*365; // one year if u want)
} else {
$cookieExpiration = time() + 172800; // 48 hours
}


just use remember checkbox to stay logged in for a long time.
0 replies
S
Skeeve
S
Skeeve 10
"The world is my country, and do good is my religion." - Thomas Paine
  • Member, joined since
  • Contributed 81 posts on the community forums.
  • Started 19 threads in the forums
  • Started this discussions
answered
Member

thanks, i'll try that

Merged on Dec 28 2011 at 08:33:32:
Didn't help, I still have to login every morning. I always check "Remember Me". Even here, I've had to login every day I visit. :(

Merged on Dec 30 2011 at 08:02:26:
OK, I'll try Google. I was really hoping for some support here, I've always gotten it in the past.

When I find the answer, I'll come back and post it here so you can help the next person.

smh

Merged on Jan 02 2012 at 09:10:22:
UPDATE:

So, turns out it wasn't the cookies after all.

The User Info Panel has a problem. I remembered that when I updated, I also switched back to the basic User Info Panel. Once I re-enabled the Enhanced User Info Panel and got rid of the basic version, my cookies started working correctly.

I'll assume something within the code defining the "Remember Me" is screwed up...?

Merged on Jan 16 2012 at 07:58:58:
Apparently I was mistaken. After changing the User Info panel, I was on my site quite a bit and stayed logged in. As soon as I let a day go by, I was being logged out again.

Why isn't Remember Me working?

On a side note, I have bragged about php-fusion since I first started using it, but lately the cms support has been lacking and I'm not so inclined to recommend it to others. Have you lost members who would always step up and try to find solutions to these issues or has interest in helping others waned?
Edited by Skeeve on 16-01-2012 15:58,
0 replies
M
miskith
M
My projects:
PHP-Fusion Czech | miskith portfolio | theConnex (In preparation) | Online game (Future project)
  • Member, joined since
  • Contributed 117 posts on the community forums.
  • Started 2 threads in the forums
answered
Member

I don't know, if PHPFusion is using session_set_cookie_params(), but i think it isn't. And you are using SESSION? SESSION without these params has expiration time to the first browser shutdown (I don't know, how it's called in English, but in Czech it's "Na konci relace"->"At the end of session"wink.
0 replies
S
Skeeve
S
Skeeve 10
"The world is my country, and do good is my religion." - Thomas Paine
  • Member, joined since
  • Contributed 81 posts on the community forums.
  • Started 19 threads in the forums
  • Started this discussions
answered
Member

I don't know. I only know that Remember Me doesn't work at my site, this site and Craigs site. :@
0 replies
M
miskith
M
My projects:
PHP-Fusion Czech | miskith portfolio | theConnex (In preparation) | Online game (Future project)
  • Member, joined since
  • Contributed 117 posts on the community forums.
  • Started 2 threads in the forums
answered
Member

Oh, "remember me" isn't working on this site for you? Then, check into your browser settings, if you have enabled deleting cookie(s) after browser shutdown.
0 replies
S
Skeeve
S
Skeeve 10
"The world is my country, and do good is my religion." - Thomas Paine
  • Member, joined since
  • Contributed 81 posts on the community forums.
  • Started 19 threads in the forums
  • Started this discussions
answered
Member

Remember me works on every site I visit, except for php-fusion sites.
0 replies
M
miskith
M
My projects:
PHP-Fusion Czech | miskith portfolio | theConnex (In preparation) | Online game (Future project)
  • Member, joined since
  • Contributed 117 posts on the community forums.
  • Started 2 threads in the forums
answered
Member

Has your browser any cookie(s) manager? If so, could you look at expiration time after singin?
0 replies
S
Skeeve
S
Skeeve 10
"The world is my country, and do good is my religion." - Thomas Paine
  • Member, joined since
  • Contributed 81 posts on the community forums.
  • Started 19 threads in the forums
  • Started this discussions
answered
Member

I just logged in and left the site. Here are my cookies:

atheiststoday.com/images/visitedwww.jpg

atheiststoday.com/images/visitednowww.jpg

atheiststoday.com/images/lastvisit.jpg

atheiststoday.com/images/user.jpg


Merged on May 13 2013 at 21:39:28:
This is still an issue. And it only affects php-fusion sites I visit.
Edited by Skeeve on 14-05-2013 04:39,
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 16 posts
  • Votes 0 votes
  • Topic users 5 members

5 participants

S
S
Skeeve 10
"The world is my country, and do good is my religion." - Thomas Paine
  • Member, joined since
  • Contributed 81 posts on the community forums.
  • Started 19 threads in the forums
  • Started this discussions
P
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
M
M
My projects:
PHP-Fusion Czech | miskith portfolio | theConnex (In preparation) | Online game (Future project)
  • Member, joined since
  • Contributed 117 posts on the community forums.
  • Started 2 threads in the forums
A
A
Ankur 10
Hi! Its me, Ankur Thakur! smile
  • Veteran Member, joined since
  • Contributed 1,277 posts on the community forums.
  • Started 60 threads in the forums
R
R
Rush_ 10
  • Junior Member, joined since
  • Contributed 34 posts on the community forums.
  • Started 3 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet