Menu

Direct logout after login

Help
2008-02-10
2016-01-07
  • Thomas Prommer

    Thomas Prommer - 2008-02-10

    Hey,

    I am trying to get this chatbox installed. The problem I am having is that somehow the Session is not stored on the server side. Everytime I try to login (guest or adminaccount) I immediately receive a logout request after the initial page load. When browsing and debugging the php sources it seems the session is not stored on the server side. I noticed that my Apache configuration had KeepAlive set to off, but even after changing that property to true and restarting Apache I still get the same issue.

    Any thoughts?

    Thanks,
    severe80

     
    • Tetex

      Tetex - 2008-10-02

      Firstly installed chat on production server. Everything works fine. Except another --- local installation.

                                                *     *     *
      I have locally made fresh installation phpBB3. Thereafter AJAX Chat. Now when I login (no matter which way) I see direct logout.

      I pinpointed the location where inappropriate logic decision happens:

      in line 63 inside "chat/lib/class/CustomAJAXChat.php" file.

      something here goes wrong:
      ($this->getUserID() === $user->data['user_id'])

      I don't have enough time to explore it further, so if anyone could contribute it would be really great.

       
    • Sebastian Tschan

      AJAX Chat uses plain PHP sessions. Best write a simple PHP session test page to ensure your PHP setup is capable to use PHP sessions.

       
    • Levente Szente

      Levente Szente - 2008-02-16

      I had the same error, after I installed the chatbox.
      My problem was that I was behind a proxy when I was trying to login.
      When I logged in without the proxy - it worked like a charm.

      Regards,
      Levente

       
    • Sebastian Tschan

      There is a security feature built into the chat code which logs you out if your IP changes while logged in to the chat.
      You can disable it by editing lib/config.php:
      ---
      // If true, checks if the user IP is the same when logged in:
      $config['ipCheck'] = false;
      ---

       
    • BobP

      BobP - 2008-02-29

      Same issue.

      PHP Sessions support enabled and in use by other apps - see below.
      ipCheck flag set to false.

      Issue continues.
      Please advise.

      Thanks.

      Excerpt from phpinfo() execution relating to sessions:

      Session Support     enabled
      Registered save handlers     files user

      Directive    Local Value    Master Value
      session.auto_start    Off    Off
      session.bug_compat_42    Off    Off
      session.bug_compat_warn    On    On
      session.cache_expire    180    180
      session.cache_limiter    nocache    nocache
      session.cookie_domain    no value    no value
      session.cookie_lifetime    0    0
      session.cookie_path    /    /
      session.cookie_secure    Off    Off
      session.entropy_file    no value    no value
      session.entropy_length    0    0
      session.gc_divisor    1000    1000
      session.gc_maxlifetime    1440    1440
      session.gc_probability    1    1
      session.name    PHPSESSID    PHPSESSID
      session.referer_check    no value    no value
      session.save_handler    files    files
      session.save_path    /var/lib/php/session    /var/lib/php/session
      session.serialize_handler    php    php
      session.use_cookies    On    On
      session.use_only_cookies    Off    Off
      session.use_trans_sid    Off    Off

       
    • billuh

      billuh - 2008-02-29

      I had this problem too.  What was happening for me is that I didn't have a correct .htaccess file.  So when I'd go to www.website.com it would change to website.com.  Which messes with the session stuff.

       
      • BobP

        BobP - 2008-02-29

        Further testing to isolate the cause of issue shows that it appears to be browser-specific, or at least browser-setting-specific.

        The issue is observed when using Firefox 2.0.0.12 with default settings and cookies accepted for the session only.  No further testing with Firefox yet.

        The issue is not seen when using IE 6.0.x which is only used here for compatibility testing.  At first, this issue appeared to be a server-side effect but it now appears to be an incompatibility with Firefox and/or a setting therein.  Hopefully, the developer will have more information as IE is far from our chosen browser.

         
        • Massimiliano Polito

          I'm having the same problem, I've just installed the chat (phpBB3 customized version) and I can see the problem both with Firefox and IE.

          I login on the chat login page, I'm redirected to the phpBB3 "login OK" page, I can see for a couple of seconds the chat page but then I'm redirected to the chat login page and the URL is http://localhost:8080/gol/chat/?logout=true.

          I've modified the timerRate variable in config.js to "5000", just to test, but the logout happens again after a couple of seconds.

          I also set "$config['ipCheck'] = false;"  as suggested, but nothing changed.

          The problem is only experienced when a login through phpBB3 is used, if I login to the chat without specifying a password I don't see this problem.

          I can't see any .htaccess file in the chat directory to play with, so I have not tried what suggested by billuh.

          My Firefox setting for cookies is "keep until they expire".

          The web server runs on this machine, so I don't have any proxy problem.

          PHP sessions seems to be OK as I can work with my phpBB3 forum without any problem.

          Any help would be appreciated as I can't proceed installing the chat on the production site as long as don't solve this problem.

          Bye,
          Max

           
    • BobP

      BobP - 2008-02-29

      Under IE 6.0.x, the session does not abruptly and immediately terminate with a logout as it does under Firefox 2.0.0.12 but no submit is made of entered text and the logout function does not function.

       
    • Sebastian Tschan

      I'm developing this chat application using Firefox.
      As a Firefox extension developer (Secure Login & Autofill Forms) and GNU/Linux user (Xubuntu) I can assure you that AJAX Chat does definitely work with Firefox.
      I've tested it successfully with all major browsers: Firefox (1.5 - 3), IE6, IE7, Safari, Opera, Konqueror.

      If your setup fails on Firefox it might be related to XML parsing errors (which do not show on IE):
      http://ajax-chat.wiki.sourceforge.net/XML+Parsing+Errors

      Or it could be related to the following:
      http://ajax-chat.wiki.sourceforge.net/Cannot+modify+header+information

      Best try an unmodified version of the chat setup to sort out errors caused by editing the template files, etc.

       
  • Anonymous

    Anonymous - 2009-12-12

    Hi, i have this problem.  My . I can't fix this problem. Please help.

      : http://chat.dominikmatus.cz/phpinfo.php

     
  • CaptainJack

    CaptainJack - 2016-01-07

    Hi,same problem from my side.How to fix it.I am using a stand alone version.everytime when i try to login,it logouts.Its brain bursting.Please give solution.Thanks in advance.

     

Log in to post a comment.