Author |
Topic  |
matko
New Member

54 Posts |
Posted - 24 May 2007 : 09:33:22
|
Bad news 
I changed config.asp as advised, deleted cookies again, tried different browser, nothing has changed 
Any other suggestions |
 |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 24 May 2007 : 09:56:16
|
If memory serves, there were two parts I had to add:
This line below the Response.Buffer line in Config.asp:
Response.AddHeader "P3P", "CP=" & chr(34) & "CAO PSA OUR" & chr(34) And this line of code into the inc_header.asp file (in the second spot where the <head> is written out):
The exact line numbers escape me, but it shouldn't be too hard to spot.  |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
matko
New Member

54 Posts |
Posted - 24 May 2007 : 12:29:00
|
You need to be an admin to see it clearly, if you register there, I will make you admin.
In the meantime I am going to try second modification AntonJr suggested... |
 |
|
matko
New Member

54 Posts |
Posted - 24 May 2007 : 12:45:27
|
I modified code around second instance of <head>, so the code looked like this:
Response.Write "<html>" & vbNewline & vbNewline & _
"<head>" & vbNewline & _
"<meta http-equiv=""CP"" content=""OTI DSP COR LAW CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT"">" & vbNewline & _
but again no help  |
 |
|
gary b
Junior Member
 
USA
267 Posts |
Posted - 24 May 2007 : 14:20:45
|
'Stubborn' has such negative connotations... I call it 'persistent'.
quote: That was initially my idea too, but why would it log you off even if you have remeber password chceked? During admin session it looks like log off is hapenning every minute or so, while during browsing is longer than that...
Doesn't "Remember password" pertain ONLY to the browser?? It is an aid to login. If this is correct, then "remember password" has nothing to do with maintaining logged-in status.
quote:
gary b: The difference is also that I was using IE in Win2k to access forum on localhost, while normaly I use IE & WinXP to browse forum.
So you say that accessing your forum/database on your local computer works while accessing forum/database on the web server does not work??? (OS/browser not a factor)
I would still edit forum.asp to include display of username, session variable(s), and cookies to isolate problem. No session variable or cookies after being dumped means host issue.
[Edit follows] In inc_header.asp, I added the following as lines 405 to 408: dim i For Each i in Session.Contents Response.Write(i & ": " & Session.Contents(i) & "<br />") Next This code caused display of three session variables immediately to right of "You are logged in as" I logged off and these variables disappeared. Logged back in and they were there. This simple test should help point out the problem, I believe.
No variables means host's server dropped session?? |
Edited by - gary b on 24 May 2007 15:13:29 |
 |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 24 May 2007 : 15:38:53
|
quote: Originally posted by gary b
Doesn't "Remember password" pertain ONLY to the browser?? It is an aid to login. If this is correct, then "remember password" has nothing to do with maintaining logged-in status.
Checking "Remember Password" sets the cookie so it doesn't expire when you close the browser, thus negating the need to log in the next day.
quote: Originally posted by gary b
In inc_header.asp, I added the following as lines 405 to 408: dim i For Each i in Session.Contents Response.Write(i & ": " & Session.Contents(i) & "<br />") Next This code caused display of three session variables immediately to right of "You are logged in as" I logged off and these variables disappeared. Logged back in and they were there. This simple test should help point out the problem, I believe.
No variables means host's server dropped session??
If it doesn't show any variables then there's nothing being stored in the session, and most likely some issues with the server.
I have a sneaky suspicion that it may be a combination of issues. Just trying to take care of one at a time. Usually 3rd party cookie blocking (or some other cookie issue) is a culprit in situations like this, and its relatively easy to fix. After that the next place to look is normally at the session variables and see what's going on there - so you are on the right track.  |
 |
|
matko
New Member

54 Posts |
Posted - 25 May 2007 : 06:44:23
|
I will try to chceck those variables and I will let you know. |
 |
|
gary b
Junior Member
 
USA
267 Posts |
Posted - 25 May 2007 : 09:33:15
|
quote: Checking "Remember Password" sets the cookie so it doesn't expire when you close the browser, thus negating the need to log in the next day.
AnonJr... you always seem to be able to state things better than I! I'm jealous!
What I was trying to say is that the 'Remember Password' checkbox is not a requirement for maintaining a login. Rationale: If this box is UNchecked, the User's current session will continue (under normal circumstances) until he/she logs off or closes browser. So I believe matko can ignore this aspect as a source of the problem.
gary b
|
 |
|
matko
New Member

54 Posts |
Posted - 25 May 2007 : 15:30:33
|
garyb: I have heavyly modded inc_header.asp from Image, can you please specify code around the lines you inserted, so I can find it in my file? Line numbers do not work. Thanks. |
Edited by - matko on 25 May 2007 15:31:35 |
 |
|
matko
New Member

54 Posts |
Posted - 28 May 2007 : 04:49:03
|
This constant log off is really making life miserable for me and for other users, any other suggestions that may help to solve this? Please. |
 |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 28 May 2007 : 05:59:00
|
Have you checked over at Image's forum to see if anyone else is having the same problem? Not being familiar with Image's code, I really can't say where to put the code to check the session variables.
The issue is related to either a cookie issue or a session variable issue (well, it could be both too). Have you asked your host if session variables are enabled? |
 |
|
matko
New Member

54 Posts |
Posted - 28 May 2007 : 09:08:31
|
I understand, that you are not familiar with Image's modifications, just send me code before and after the section you have added to trace those variables, I will find right place to put it in my files.
Maybe we should look at it from other side - how exactly is forum keeping user logged in? What will happen if I check Remember password and than close browser and reopen again? What will happen in the same situation if Remeber password is not checked?
If I will understand this fully I may narrow the problem little bit. |
Edited by - matko on 28 May 2007 09:09:37 |
 |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 28 May 2007 : 09:26:54
|
General overview (i.e. not entirely accurate but you get the point):
When you log in, a cookie is set that stores the user name and the encrypted password (as well as a few other things). If you check the "Remember Password" box the cookie won't expire at the end of the session (like if you were to close the browser). While you load a page, the forum checks the session variables to make sure you are logged in. If the session variables are empty, the form software checks for the cookie. If it finds it, you get logged in. If it doesn't find the cookie, you are not logged in.
Now, in order for session variables to work, the client needs to be able to accept cookies as that's part of how the server makes sure you're the same person. That's why I was trying to troubleshoot the cookie issue first - without cookies the session variables will never work.
Because similar issues have been the result of either a cookie issue or a session variable issue, I believe that the issue is related to either a cookie issue or a session variable issue (well, it could be both too). That's also why I ask if you have asked your host if session variables are enabled?
I was looking through a few resources this morning for a different issue and came across a couple articles that may be of help to you.
http://classicasp.aspfaq.com/general/why-do-my-session/application-variables-disappear.html
http://classicasp.aspfaq.com/general/why-won-t-my-session-variables-stick.html
You may also want to post this issue up at Image's forum because there could be a larger issue. I doubt it, but anything is possible, and he ought to be informed of odd issues like this. |
 |
|
gary b
Junior Member
 
USA
267 Posts |
Posted - 28 May 2007 : 09:56:28
|
matko... Here is the section used to insert the "list all session variables" code. Try inserting the code immediately before the red bold line. The red bold line closes the table column/row, so inserting the code there should make it appear to the right near the top of the page.
Lines 391 - 416 from unaltered inc_header.asp: if strAuthType="nt" then Response.Write "<b>" & Session(strCookieURL & "username") & " (" & Session(strCookieURL & "userid") & ")</b></font></td>" & vbNewLine & _ " <td> " else if strAuthType = "db" then Response.Write "<b>" & profileLink(ChkString(strDBNTUserName, "display"),MemberID) & "</b></font></td>" & vbNewLine & _ " <td>" if strGfxButtons = "1" then Response.Write "<input src=""" & strImageUrl & "button_logout.gif"" type=""image"" border=""0"" value=""Logout"" id=""submit1"" name=""Logout"" tabindex=""-1"">" else Response.Write "<input type=""submit"" value=""Logout"" id=""submit1"" name=""submit1"" tabindex=""-1"">" end if end if end if Response.Write "</td>" & vbNewLine & _ " </tr>" & vbNewLine & _ " </table>" & vbNewLine & _ " </td>" & vbNewLine & _ " </tr>" & vbNewLine if (mlev = 4) or (lcase(strNoCookies) = "1") then Response.Write " <tr>" & vbNewLine & _ " <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><a href=""admin_home.asp""" & dWStatus("Access the Forum Admin Functions...") & " tabindex=""-1"">Admin Options</a>" if mLev = 4 and (strEmailVal = "1" and strRestrictReg = "1" and strEmail = "1" and User_Count > 0) then Response.Write(" | <a href=""admin_accounts_pending.asp""" & dWStatus("(" & User_Count & ") Member(s) awaiting approval") & " tabindex=""-1"">(" & User_Count & ") Member(s) awaiting approval</a>") Response.Write "<br /><br /></font></td>" & vbNewLine & _ " </tr>" & vbNewLine end if ********** End of code quote **************
I really think this will help with your troubleshooting.
gary b
PS Sorry for the delay in responding. Lots of holiday activities here. |
 |
|
Topic  |
|