 | |  | | | ReviewPost How do I...? Wondering how to do something in ReviewPost? |
November 2nd, 2010, 11:11 AM
|
#1 (permalink)
| | Member Verified Customer
Join Date: Jan 2007
Posts: 61
| 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!
|
| |
November 2nd, 2010, 12:44 PM
|
#2 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,071
| Cookies and Login Problems!!
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.
|
| |
November 2nd, 2010, 01:01 PM
|
#3 (permalink)
| | Member Verified Customer
Join Date: Jan 2007
Posts: 61
|
I checked the cookie using during persistent log in, and there were no problems. However, for the regular cookie:
Before-
bblastvisit 1288720723
bblastactivity 0
vbet_sessionUsed 1
__utma 179007781.360412241.1288720724.1288720724.1288720724.1
__utmb 179007781.9.10.1288720724
__utmc 179007781
__utmz 179007781.1288720724.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
__qca P0-1042254700-1288720723800
bbsessionhash a9cc1d60e1e739cd5066fd30d0177c9b
vbseo_loggedin yes
vbulletin_collapse
bbreferrerid 0
bbuserid 0
bbpassword
bbthreadedmode
bbstyleid 0
bblanguageid 0
After opening another RP page:
bblastvisit 1288720723
bblastactivity 0
vbet_sessionUsed 1
__utma 179007781.360412241.1288720724.1288720724.1288720724.1
__utmb 179007781.12.10.1288720724
__utmc 179007781
__utmz 179007781.1288720724.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
__qca P0-1042254700-1288720723800
bbsessionhash 5e110205ffe955791a7fb35ff5e6df3b
vbulletin_collapse
bbreferrerid 0
bbuserid 0
bbpassword
bbthreadedmode
bbstyleid 0
bblanguageid 0
As you can see, the session hash changed. Is the new cookie being assigned by RP?
|
| |
November 2nd, 2010, 05:15 PM
|
#4 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,071
|
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.
|
| |
November 2nd, 2010, 05:31 PM
|
#5 (permalink)
| | Member Verified Customer
Join Date: Jan 2007
Posts: 61
| |
| |
November 2nd, 2010, 05:52 PM
|
#6 (permalink)
| | Member Verified Customer
Join Date: Jan 2007
Posts: 61
|
I looked into vb3.php, as that's where the authenticate function is.
Commented the queries out here: Code: Content visible to verified customers only.
The problem was gone.
Any idea why, and possibly what change needs to be made for this not to reset the hash?
|
| |
November 2nd, 2010, 05:54 PM
|
#7 (permalink)
| | Member Verified Customer
Join Date: Jan 2007
Posts: 61
|
Another update: it seems that just removing the SET lastactivity part does the trick. I will try to trace it.
|
| |
November 2nd, 2010, 06:04 PM
|
#8 (permalink)
| | Member Verified Customer
Join Date: Jan 2007
Posts: 61
|
With the SET lastactivity part commented out, I did an export of location and lastactivity right after the update query:
'/lensreviews/index.php?cat=1,1288738844'
5 seconds later:
'/lensreviews/index.php?cat=1 1288738849'
Seems that vBulletin is internally handling lastactivity.
Furthermore, $julian is empty for some reason: Code: Content visible to verified customers only.
'false'
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.
Thanks!
|
| |
November 2nd, 2010, 06:09 PM
|
#9 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,071
|
why would $julian be empty? Code: Content visible to verified customers only.
what version of php are you using?
|
| |
November 2nd, 2010, 06:17 PM
|
#10 (permalink)
| | Member Verified Customer
Join Date: Jan 2007
Posts: 61
|
5.2.14
Let me upload a quick test script to check this out.
|
| |
November 2nd, 2010, 06:26 PM
|
#11 (permalink)
| | Member Verified Customer
Join Date: Jan 2007
Posts: 61
|
In reviewpost, julian is still false, even though all the variables from the localtime() call are populated: Code: Content visible to verified customers only.
1288710000
--
1288740093
--
Array ( [0] => 33 [1] => 21 [2] => 18 [3] => 2 [4] => 10 [5] => 110 [6] => 2 [7] => 305 [8] => 1 ) Code: Content visible to verified customers only.
'30 25 18 2 11 110 2 305 1'false
Looks like a problem with the year?
|
| |
November 2nd, 2010, 07:50 PM
|
#12 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,071
|
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.
|
| |
November 2nd, 2010, 07:53 PM
|
#13 (permalink)
| | Member Verified Customer
Join Date: Jan 2007
Posts: 61
|
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.
|
| |
November 2nd, 2010, 09:05 PM
|
#14 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,071
|
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.
|
| |
November 2nd, 2010, 09:13 PM
|
#15 (permalink)
| | Member Verified Customer
Join Date: Jan 2007
Posts: 61
|
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.
|
| |
November 2nd, 2010, 09:22 PM
|
#16 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,071
| PHP: time - Manual
Yeah time simply should return the unix timestamp from EPOCH etc etc etc.
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | |
Similar Threads | | Thread | Thread Starter | Forum | Replies | Last Post | | cookie issue | wampforum | Photopost Pro How Do I...? | 3 | April 13th, 2010 10:39 AM | | Cookie issue | vaguard | Photopost Pro How Do I...? | 1 | December 11th, 2009 07:12 PM | | New forum users aren't logged into gallery? | pistils | Photopost Pro Bug Reports | 6 | July 1st, 2008 09:31 AM | | Cookie issue | CaddisNJF | ReviewPost Installation & Upgrades | 3 | September 16th, 2005 04:53 PM | | Cookie Issue | Big Kahuna | Photopost Pro How Do I...? | 4 | August 31st, 2005 02:26 PM | All times are GMT -5. The time now is 04:13 PM. | |