ISPConfig keeps me logged out

Discussion in 'General' started by sandorfarkas, May 24, 2016.

  1. sandorfarkas

    sandorfarkas New Member

    Hi,

    When I log in to my ISPConfig website, it keeps me log out. I pass authentication for sure (checked in logs), but it seems my session discontinues while the page is loaded. Mostly some part of the page loads after login, but eg. I receive a Log In button instead of the navigation menu and if I choose any links I am redirected to the login page. I tried to kill ispconfig process and remove sessions from DB, but the problem persist. Could you please assist me with some hints how to troubleshoot as currently I don't have control over my hosting service.

    Thank you!
    Sandor
     

    Attached Files:

  2. sandorfarkas

    sandorfarkas New Member

    I've truncated sys_session table, replaced the files in /usr/local/ispconfig/interface/web/ with the ones from the installer tar.gz, deleted cookies and still not able to stay logged in. Any ideas what else can I check?

    Code:
    ispconfig_update.sh
    There are no updates available for ISPConfig 3.0.5.4p9
    /var/log/ispconfig/auth.log
    Code:
    Successful login for user 'admin' from 94.xx.xx.xx at 2016-05-25 22:21:43 
    Code:
    ps auxww | grep ispconfig
    5003      9219  0.0  0.4 238736 13552 ?        Ss   00:08   0:00 /usr/bin/php-cgi -d magic_quotes_gpc=off -d session.save_path=/usr/local/ispconfig/interface/temp
    5003      9221  0.0  0.5 246052 18540 ?        S    00:08   0:00 /usr/bin/php-cgi -d magic_quotes_gpc=off -d session.save_path=/usr/local/ispconfig/interface/temp
    5003      9241  0.0  0.4 238736 13552 ?        Ss   00:08   0:00 /usr/bin/php-cgi -d magic_quotes_gpc=off -d session.save_path=/usr/local/ispconfig/interface/temp
    5003      9242  0.0  0.4 238736 13552 ?        Ss   00:08   0:00 /usr/bin/php-cgi -d magic_quotes_gpc=off -d session.save_path=/usr/local/ispconfig/interface/temp
    5003      9246  0.0  0.6 246296 18808 ?        S    00:08   0:00 /usr/bin/php-cgi -d magic_quotes_gpc=off -d session.save_path=/usr/local/ispconfig/interface/temp
    5003      9247  0.0  0.5 244168 17332 ?        S    00:08   0:00 /usr/bin/php-cgi -d magic_quotes_gpc=off -d session.save_path=/usr/local/ispconfig/interface/temp
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you test it with another browser?
     
  4. sandorfarkas

    sandorfarkas New Member

    Yes, Chrome and Firefox on different platforms (win/linux/android). All the same.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Try to open the file /usr/local/ispconfig/interface/web/login/index.php and comment out the line 233:

    session_regenerate_id();
     
  6. sandorfarkas

    sandorfarkas New Member

    I commented out the line (guess no apache restart is required), and tried to log in from Chrome incognito mode. For the fracture of a second I saw the attached error.

    Also auth log looks like this now:
    Code:
    Successful login for user 'satya' from 94.x.x.x at 2016-05-25 22:37:22
    Successful login for user 'satya' from 94.x.x.x at 2016-05-25 22:37:22
    Successful login for user 'admin' from 94.x.x.x at 2016-05-25 22:37:31
    Successful login for user 'admin' from 94.x.x.x at 2016-05-25 22:37:32
    Successful login for user 'admin' from 94.x.x.x at 2016-05-26 12:01:57
    Failed login for user 'admin' from 94.x.x.x at 2016-05-26 12:01:57
    Successful login for user 'admin' from 94.x.x.x at 2016-05-26 12:02:47
    Failed login for user 'admin' from 94.x.x.x at 2016-05-26 12:02:47
    Successful login for user 'admin' from 94.x.x.x at 2016-05-26 12:03:01
    Successful login for user 'admin' from 94.x.x.x at 2016-05-26 12:03:01
    Successful login for user 'admin' from 94.x.x.x at 2016-05-26 12:03:20
    Failed login for user 'admin' from 94.x.x.x at 2016-05-26 12:03:20
    Successful login for user 'admin' from 94.x.x.x at 2016-05-26 12:07:53
    I reset the password via mysql, but the problem still persist.
     

    Attached Files:

  7. sandorfarkas

    sandorfarkas New Member

    Found a workaround for the issue, by checking the similar threads. I've found this.

    The workaround is to comment out the lines 97-102 in /usr/local/ispconfig/interface/lib/app.inc.php
    Code:
    session_set_save_handler( array($this->session, 'open'),
    array($this->session, 'close'),
    array($this->session, 'read'),
    array($this->session, 'write'),
    array($this->session, 'destroy'),
    array($this->session, 'gc'));
    Don't know what side effect does it bring up (at first glance nothing), but currently I am able to stay logged in and use ISPConfig.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    This means that sessions are not stored in the ispconfig database anymore, so you probably had a database problem like a corrupted session table.
     
  9. sandorfarkas

    sandorfarkas New Member

    I've run a mysqlcheck and everything is OK. Do you think I should recreate the sys_session table? Does it cause any issues if I don't store the sessions in the database?
     

Share This Page