Search

Thanks for clearing that up Dutch, Buzz, which extension?

As creativedutchmen said above, my problem seems to be completely different from his and a few others. I described yesterday what seems to be causing my logout problem. I have been continuously logged in for about 24 hours since I made that change.

I can’t see how the test session_id() != "" can ever produce a true result in Session::start. A new session is started only when session_id() == "". This logic says that you can set the session parameters and not start a new session or you can start a new session without setting the session parameters.

In an earlier Symphony version the session parameters are set without the condition. I verified that the current 2.1.0 version on github does indeed have the session_id() != "" condition on setting the session parameters (to ensure that I hadn’t somehow inadvertently changed it).

The hack described by buzzomatic had no effect on the problem I was having.

Checking into this further I found that the test was translated incorrectly in moving from 2.0.8RC3 to 2.1.0.

In 2.0.8RC3 it is coded as

if (!session_id())

In 2.1.0 it is coded as

if (session_id() != "")

It should be

if (session_id() == "")

I’m referring to line 29 of class.session.php. I have made this change and it solved my logout problems.

I posted this on the bug tracker.

Does anyone know why the session check has been changed?

The session check was wrong. If you read the manual it returns an empty string on failure, not boolean.

So really, I’m to blame for this issue :(

Nice catch @wisolman.

Thanks Brendan, that makes sense.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details