Session issue when trying to log into ispconfig admin interface

Discussion in 'General' started by Zahak, May 10, 2016.

  1. Zahak

    Zahak New Member

    This is an environment that has been up for a couple of years, currently consisting of (virtual machines) 1 web (14.04 LTS Ubuntu), 1 db (12.04 LTS Ubuntu) and finally 1 mail (14.04 LTS Ubuntu). All servers have db for ispconfig, otherwise all db is on db-server.
    Tonight I couldn't log into ispconfig admin interface (https:// server: 8080), I can access the site but not log in. This is not directly connected to any new updates etc, a couple of days ago everything worked fine.

    I get following error in apache error log:
    mod_fcgid: stderr: PHP Warning: session_start(): Failed to decode session object. Session has been destroyed in /usr/local/ispconfig/interface/lib/app.inc.php on line 104, referer: xxxxxx

    So looking at the handling of sessions for ispconfig web interface, it's rather special. Anyway, it seems that a new row is written in sys_session, and session_id is same as actual session id in browser. The issue seems to be the session_data field, where I think that the serialized data somehow cuts off (or it's just me getting tired).
    EDIT: That was probably just me getting tired, once removed s| at start that part worked just fine.

    I couldn't find any topics regarding this issue, and I don't really know how to solve it. Any tips would be nice.

    Ps. In a rather desperate move I tried to update web server, including updating ispconfig (from p8 to p9 using update script, so nothing really changed). But it didn't help.

    Ps2. Everything else on server seems to work just fine.
     
    Last edited: May 10, 2016
  2. Zahak

    Zahak New Member

    I kind of have given up after many hours of testing, comparing files, etc.
    My solution is now to go around the problem, by simple removing the part in app.inc.php that defines custom session callbacks. Using php default it simply works.

    I've tried (among many many other things) to fiddle around with different serialize handlers, and using php_serialize removes the error message, and it did work to log in once. But other than that it just silently fails as well.

    So to sum up, currently using php default session handler. Probably not a perfect solution, but at least it works.
     
  3. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

  4. Zahak

    Zahak New Member

    Tried different browsers, OS and networks. No difference (and it shouldn't as changing php handler for sessions made difference).
     
  5. edooze

    edooze Member

    I'm fairly sure I'm having this exact problem, and it's driving me 'round the bend. What did you work out with it?
     
  6. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

  7. Zahak

    Zahak New Member

    Removed (commented out) session_set_save_handler() in /usr/local/ispconfig/interface/app.inc.php and added a note to self so I don't forget why.
     
  8. Zahak

    Zahak New Member

    Trying to repair session table was among the first things I tried, but didn't work anyway. Still quite confused about the problem, but haven't spend any more time to figure it out. For now the php default session handler works well enough.
     
  9. edooze

    edooze Member

    Thanks for the reply.
    I have commented out the following lines in app.inc.php:

    // 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'));

    it seems to have worked, so I will post back if that changes.
     
  10. Zahak

    Zahak New Member

    Hi everyone!
    Just wanted to let you know that today when I updated ispconfig to latest version, everything just suddenly started to work (without my ugly quickfix above). Still don't know what went wrong, but hopefully it will keep working without any problems.
    Ps. I had to remove cookies etc in browser after updating ispconfig, but after that it worked like a charm.
     
    edooze, Jesse Norell and ahrasis like this.
  11. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I always do this if login has some problem. Most of the time it fixes the login problem.
     
  12. Zahak

    Zahak New Member

    Yes, though it didn't solve the original issue that occurred before my latest upgrade.
     

Share This Page