Cookie issue- forum users logged out
On all my reviewpost installations, when a user uses a non-persistent cookie (i.e the user didn't check the "remember me" box when logging in) and tries to access the item listings (showcat), he is logged out.
Also, when I try logging into the reviewpost admin panel, I am myself logged out of the forum.
Why ideas as to where the problem could be?
My cookie prefix is bb, path /, domain .pentaxforums.com
In vb, the path is the same, and the domain is blank
I tried making both domains blank, and both .pentaxforums.com, but neither helped.
RP currently installed at ./lensreviews
forums currently installed at ./forums
Any ideas as to what could be wrong?
Thanks for your help!
To my knowledge if you set your cookie as noted in the actual tutorial you should have no issues.
cookie path /
cookie prefix ?? whatever yours is
cookie domain .pentaxforums.com
That should fine if you have to login with reviewpost again then my suggestion would be to look at both cookies and see where the differences are because there should be no differences if both applications are set the same.
I checked the cookie using during persistent log in, and there were no problems. However, for the regular cookie:
After opening another RP page:
As you can see, the session hash changed. Is the new cookie being assigned by RP?
we should only reset a sessionhash if you login from reviewpost.
If you go to your reviewpost after logging in from vb what are the cookies.
I may need to see a url and test login to check out cookies. See we simply grab a userid from the session table if there is no vbuserid.
You may try the testuser account, password is test.
Comprehensive Pentax Lens Listings - Pentax Lens Review Database
I looked into vb3.php, as that's where the authenticate function is.
Commented the queries out here:
Any idea why, and possibly what change needs to be made for this not to reset the hash?
Another update: it seems that just removing the SET lastactivity part does the trick. I will try to trace it.
With the SET lastactivity part commented out, I did an export of location and lastactivity right after the update query:
5 seconds later:
Seems that vBulletin is internally handling lastactivity.
Furthermore, $julian is empty for some reason:
This might be a server issue, as time_nanosleep doesn't work in PHP, and I'm not on a windows box.
In any case, I am going to accept my fix. Let me know if anything is not kosher here.
why would $julian be empty?
Let me upload a quick test script to check this out.
In reviewpost, julian is still false, even though all the variables from the localtime() call are populated:
Array (  => 33  => 21  => 18  => 2  => 10  => 110  => 2  => 305  => 1 )
Looks like a problem with the year?
Has to be something in your specific php setup as time(); should work just fine unless there is some php bug in your version.
You can use your alterations thats fine.
Yes, I believe there might be some small problems in PHP- it's been upgraded / compiled / modified so many times that I'm sure some issue must exist somewhere.
In any case, thanks for your help! This will do until we upgrade to php 5.3/6.
Yeah mktime was the old way of doing time in PHP and in most PHP 5 that I know of time(); should work let me know what 5.3 does for you.
It'll post an update once the upgrade is completed. Likely won't be for a while though, as I don't think there's a package for centos yet.
PHP: time - Manual
Yeah time simply should return the unix timestamp from EPOCH etc etc etc.
|All times are GMT -5. The time now is 07:45 AM.|
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0