Errors after update

Discussion in 'Installation/Configuration' started by theWeird, May 12, 2014.

  1. theWeird

    theWeird Member

    I just updated to the latest version of ispconfig and activated some features like session timeout and remember me in the system settings.

    Now the login screen shows some wild errors like the one below and does not accept my admin user credentials for login.

    What can I do to be able to login again?
    What is the problem that causes this error?

    #0 db->query(INSERT INTO sys_session (session_id,date_created,last_updated,session_data,permanent) VALUES ('hf9imj46a3seb5p4ueom2g53i6','2014-05-12 08:34:26','2014-05-12 08:34:26','s|a:4:{s:2:\"id\";s:26:\"hf9imj46a3seb5p4ueom2g53i6\";s:5:\"theme\";s:7:\"default\";s:8:\"language\";s:2:\"de\";s:6:\"module\";a:4:{s:4:\"name\";s:5:\"login\";s:5:\"title\";s:14:\"top_menu_login\";s:8:\"template\";s:14:\"module.tpl.htm\";s:9:\"startpage\";s:15:\"login/index.php\";}}','n')) called at [/usr/local/ispconfig/interface/lib/classes/session.inc.php:103] #1 session->write(hf9imj46a3seb5p4ueom2g53i6, s|a:4:{s:2:"id";s:26:"hf9imj46a3seb5p4ueom2g53i6";s:5:"theme";s:7:"default";s:8:"language";s:2:"de";s:6:"module";a:4:{s:4:"name";s:5:"login";s:5:"title";s:14:"top_menu_login";s:8:"template";s:14:"module.tpl.htm";s:9:"startpage";s:15:"login/index.php";}}) #2 session_write_close() called at [/usr/local/ispconfig/interface/lib/app.inc.php:124] #3 app->__destruct()
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    There is either a column missing in the sys_session table or the table is corrupted. Checek that the sys_session table has the following columns:

    session_id,date_created,last_updated,session_data ,permanent

    in the dbispconfig database.
     
  3. theWeird

    theWeird Member

    There is a table sys_session in dbispconfig and all columns used by the query exist.

    I run analyze, optimize, repair and flush for this table.
    All finished with status 'OK'

    Afterwards I deleted all entries from it and reloaded the page.
    A new entry in the table is created and the page looks as attached.

    So it seems to be correct that this INSERT doesn't work.

    Could it work to use REPLACE instead of INSERT to update data of already started sessions?
    http://dev.mysql.com/doc/refman/5.0/en/replace.html
     
  4. theWeird

    theWeird Member

    Well,
    the errors all over the page are now gone.
    But now I see that the code handles the difference between INSERT and UPDATE of sessions.

    And I still cannot login with my admin credentials ...
    Seems, that my session is not assigned correctly.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    It is unlikely that there is a problem with that query in general as it works on so many servers. Maybe there is a problem with the php or mysql version. Which php and mysql version do you use on that server?
     
  6. theWeird

    theWeird Member

    Versions below

    As I remember, the errors occour since I set some of the new session-related options in system config.
    Maybe I used a combination of settings that ends up in this error?
    Where are these settings stored?
    In sys_config table I have only 2 lines:
    Code:
    mysql> select * from sys_config;
    +-----------+-----------------+---------+
    | group     | name            | value   |
    +-----------+-----------------+---------+
    | db        | db_version      | 3.0.3.2 |
    | interface | session_timeout | 60      |
    +-----------+-----------------+---------+
    2 rows in set (0.00 sec)
    
    PHP and MySQL versions:
    Code:
    # php -v
    PHP 5.3.28-1~dotdeb.0 with Suhosin-Patch (cli) (built: Dec 13 2013 01:38:56)
    Copyright (c) 1997-2013 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
        with Suhosin v0.9.33, Copyright (c) 2007-2012, by SektionEins GmbH
    
    mysql> select version();
    +-------------------+
    | version()         |
    +-------------------+
    | 5.5.31-1~dotdeb.0 |
    +-------------------+
    1 row in set (0.00 sec)
    
     
  7. theWeird

    theWeird Member

    Weird ...

    Does this session_timeout line in sys_config have any affect?
    I deleted this line from this table and now it works like a charm.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    The session_timeout is the time until a session ends, this time is in seconds. so 60 seconds means that your session is terminated within one minute. This most likel too short and might be the reason for the problem. I guess we should add some minimum value checking there to prevent that in future.
     
  9. mohib

    mohib New Member

    Hi Till Bro,

    I am facing same problem but i am not understand this solution please if possible say clearly.

    Thanks.
     

Share This Page