Guest views

Discussion in 'Technical Support' started by bajaboy1, Feb 5, 2010.

Thread Status:
Not open for further replies.
  1. seymourjames All Hands On Deck

    Sorry to be direct but have you actually upgraded to version 4.1.8 . This was a an issue with 4.1.7 which was updated within an hour or so to 4.1.8

    Make sure you have the 4.1.8 file Login.php . To be sure

    Open includes/classes/kernel/Login.php and check the _init function is like this:

    Code:
    function _init()
    {
    if ( ! empty($_SESSION['logged'])) {
    if (!$this->_checkSession()) {
    $this->_logout();
    }
    } elseif ( ! empty($_COOKIE[$this->_cookieName])) {
    if (!$this->_checkRemembered($_COOKIE[$this->_cookieName])) {
    if ($this->msg == 'Invalid cookie') {
    $this->_logout();
    }
    }
    } else {
    $this->session_defaults();
    }
    }
  2. boots New Member

    4.1.8 is the one I purchased and installed. So It should be there.....
  3. nzyan Customer

    I checked it - I do have V 4.1.8 with exactly the code you provided.

    Best regards
    Andreas
  4. Lhotch curmudgeon

    If you have your user groups set to all show the same fields, then why would it matter if there is a cookie set or not? Logged in or not, registered user or not IF all user groups are set to display the same exact fields then it shouldnt matter what user group the forum thinks you belong to the fields should still be displayed. This is why I think there is something else going on.
  5. seymourjames All Hands On Deck

    have you all done the obvious - clear browser cache and cookies. Clear the templates_c folder as well.

    Please post links to your sites rather than screenshots - some of the urls do not even come at all unless I am mistyping.
  6. nzyan Customer

    Here's the link to my 68Classifieds :

    Leica Forum Classifieds

    One of the pages in question:
    Leica Forum Classifieds Leica M System M Equipment Packages

    - Please register and login in.
    - Quit browser without having logged out
    - Visit page above

    Right now I'm playing around with the Login.php code - so don't wonder if you get empty pages form time to time.

    I think I found a gap in your logic - what if:
    - No Session
    - Cookie is not empty
    - CheckRemembered returns FALSE
    - msg is NOT "Invalid Cookie"

    What if the msg is something different? "Incomplete cookie" or "User banned"?

    Until now I wasn't able to find out what happens exactly in the _checkRemembered function - will continue digging tomorrow.

    Andreas

  7. seymourjames All Hands On Deck

    Not my logic. This is part of the Login file distributed with 4.1.8 if I am not incorrect.

    What I can tell you is if you are not logged in I see no issue in firefox or safari. However , it is clear you changed the template but you may not have introduced prior changes to your template. That is why you must test on the default template first.

    So in firefox and safari I logged in and had no problems with the showlistings. When i logged out - you have changed the code I did get a white screen. Nonetheless, the showlistings will display again.

    It is a strange problem because I do not have any issues on 24 templates across 3 different systems.
  8. bowers01 Genius At Work

    That fixes the problem(but we shouldnt have to do it at all
    This has no effect

    @nzyan
    Doing that does indeed make it happen, you dont even have to register just logon.
    Cheers,
    Nick
  9. nzyan Customer

    Not what I suggested - please:

    - Please register and login in.
    - Quit browser without having logged out
    - Visit page above

    I have this issue in Firefox, Safari and Camino on the Mac.
    Same on IE and FF on Windows XP.
    Same with default templates.

    Andreas

    PS.: The bold red edited code is the logical hole IMHO, not the original code
  10. seymourjames All Hands On Deck

    Works fine for me. Logged in. Immediately quitted without logging out. Fired up the browser again and no issues except it kept me logged in which I always think is a bad idea in general. I have the browsers set to always accept cookies.
  11. seymourjames All Hands On Deck

  12. bowers01 Genius At Work

    That might be were the problem lies, did you tick the remember my password?
    Cheers,
    Nick

    EDIT:
    I just checked you site, even without ticking i remember it still keeps you logged in, mine does not do that.
    But no it does not do it on your site.
  13. seymourjames All Hands On Deck

    Please be clear Nick.

    Are you on a 4.0.9 system or 4.1.8?

    On our demo site at least , I get this behavior (cookies allowed)

    1. If I login and logout normally then I have to log in again whatever I do.
    2. If I log in and then just kill the window but not the Firefox application itself then it keeps me logged in.
    3. If I log in and then kill the Firefox application then it is necessary to login again.
    4. If I login in, click the remember me checkbox and then kill the application it is necessary to login.
    5. If I login in, click the remember me checkbox and then logout normally it is necessary to login.

    Is that what you are getting on our demo and on your system - where is the difference?

    On Nzyan's site and on our test sites using the default template, I get the same behavior but no other problems. It looks like the remember me check box is not working as it should. It also looks like when you kill the application it does not remember a cookie because in our system when you have set a template in our template switcher it should be remembering the last template selected.
  14. bowers01 Genius At Work

    Hi,
    I am on 4.18, my templates were originaly made for 4.09 but i have since made them work for 4.1 and i was able to reproduce this with the default template.
    1. Correct
    2. Correct
    3. Correct, this is when the issue occors. If you then do a search it only shows the viewlisting link

    Cheers,
    Nick
  15. seymourjames All Hands On Deck

    This is strange as the behavior with Safari is not the same as with Firefox. I do not think this is template related as the same behavior is present with the default as you have said.

    3. If I log in and then kill the Safari application then it is not necessary to login again. In Firefox it is necessary to login. I see no difference in how the browsers are set up either.

    What does number 3. do in I.E 7 and 8?


    What does differ is with TemplateCodes deployed is we don't get the problem of listings getting screwed up. This indicates to me that one of framework module is partially correcting the issue that you have but not all of the issue (i.e the remember me checked in is not behaving as expected).

    I just took a look at a 4.09 site which has no Templatecodes modules or anything else. A clean system in effect.

    3. Both in Firefox and in Safari, it is necessary to login after killing the application (both FF and Safari).

    but it is still necessary to login even if the checkbox to remember ID is clicked.

    Now I am getting confused.
  16. bowers01 Genius At Work

    on windows safari is exactly the same as ie7/8 and firefox.

    In ie8 you have to log back in, also have the problem.

    Nick
  17. seymourjames All Hands On Deck



    Lenny Kravitz springs to mind?
  18. seymourjames All Hands On Deck

    Now I just did a virgin install of 68C on a test domain. I get identical behavior to our demo system.

    This is suggesting that something is either happening on the server side or in the core files. It is not template related. One thing I have noticed is that my web host has recently installed a new version of php and perhaps the php.ini settings are slightly different. It seems difficult to get to the bottom of this issue.
  19. Lhotch curmudgeon

    create a directory on your own server space and set your session.save_path to point at the new folder on your own disk space and I bet things will work much differently.

    My guess is that you guys are relying on the web servers default session.save_path variable and its too small to accomidate the number os sessions its asked to store so they are getting cleaned out and therefor not available when you open the browser and go back to the site.
  20. John Snyder Staff

    The way its designed you should only have the possibility of 3 values for msg, '' i.e. message never set, 'Invalid cookie' - meaning parts are missing from cookie i.e. manipulated by user or the hash and username do not match what his stored in the database, or 'User banned'

    The method _checkRemembered only returns false when a message is set, and it will either be 'Invalid cookie' or 'User banned'. Banned members are not logged out as to keep them limited to banned permissions, otherwise it should be 'Invalid cookie' which should then log them out and destroy the session and cookie, and redirect to the login form.

    So the initialization process works like this:

    If they are logged in, check their session, if its not valid log them out, ie destroy session + cookie and redirect to login. If they are logged in and have a valid session do nothing.

    Else If they are not logged in check the cookie, if its valid and they are banned or valid user do nothing

    Else if they are not logged in via session or the cookie is not set, make a default session.
Thread Status:
Not open for further replies.

Share This Page