Search

I’ve run into a strange problem with Symphony 2.1.0 that involves being logged out constantly and somewhat randomly.

The same behavior is showing up in an upgraded installation from 2.0.7 -> 2.0.8RC3 -> 2.1.0 and in a fresh 2.1.0 installation froom github.

Patterns:

If I follow a link to the index page, the next link followed (whether in admin area or front end) logs me out.

After logging in, and after following 1-5 different links on the front end (this seems completely random), I am logged out. But if I follow 1 link over and over, I am never logged out.

Less frequently I am logged out randomly in the admin area.

Examples:

  • Log In -> Blog page -> Logged Out
  • Log In -> Blog page (link followed 15 times consecutively) -> remain Logged In
  • Log In -> Contact page -> Blog page -> Profile page -> Logged Out
  • Log In -> root/?debug does not display -> Logged Out

Is there something obvious I failed to do, or is this a bug?

Hrmm we had this on a site recently but I believe it was fixed. But perhaps it exists in 2.1.0 still. From recall this is down to over-zealous garbage collection in the sym_sessions table.

Hmm yeah I thought we fixed this too Nick.

What extensions are you running BBQbrains?

I’m attaching a screen shot of my extensions.

alt text

Attachments:
extensions-2.1.0.gif

I started seeing this too on a site I recently upgraded.

I have been experiencing this as well, with a brand new install of 2.1.0. I was attempting to implement a site using a ThemeForest template that had a significant amount of jQuery/javascript.

I’m developing on Vista with WAMPSERVER using Firefox. I have one tab open for the front end and one tab for the back end. What I have found is that anytime I refresh on the front end, then click on a navigation (e.g. Blueprints—>Components) I would be sent to the login screen to login again.

This would occur every time I refresh the front end. So far, the only thing I have found to prevent it from happening was to comment out the javascript in the template. I haven’t had time to investigate what particular code in the javascript might be causing the problem. Does this help? Is there a logical reason why javascript would cause the admin to logout like this?

I just finished developing another site with 2.0.8RC3 on the same box without this issue (not using any javascript on that site).

Hmm the javascript. I don’t believe we’ve looked there for any potential issues.

Perhaps something is unsetting/corrupting the cookie.

BBQbrains could you try disabling JavaScript in your browser and trying again. Are you still logged out continuously?

Had a quick once over on the Javascript, can’t seem to see anything unusual in there.

This one’s got me stumped to be honest.

The JavaScript is interacting with a protected content page (admin only) while fetching the system translation strings. Maybe this is related?

@nickdunn: I disabled JavaScript, but there was no change in behavior.

@nils: The same problem exists even when no admin pages are open in the browser.

a mystery! this is so exciting.

I am certain this is down to over-zealous garbage collection from the sessions table. I just don’t know how to resolve it :-/

I’m with this problem too.. Refresh the front and be logged out in the backend.

I usually get the symphony’s releases from github, but when I get this error, I made a test: I downloaded the 2.1.0 release from the symphony’s website, installed and open some sections, created new data, etc.. as if it was my site.

…and this error didn’t happen!

Then, I’ve added some extensions and, then, the error came back!

Extensions I’m using:

Attachments:
ext.png

My experience with this problem:

I get logged out only after not visiting the site for a few hours and only on my public site. My local development site never logs me out unless the two-week cookie expiration time has passed. Both sites are running the exact same Symphony code (2.1).

My local site never has more than one session stored in the session table. My public site accumulates dozens of sessions whether I’m actively browsing the site or not. But it keeps using the same session when I log out and in several times to test it. All the others seem to be unused and the session_data field is always: sym-|a:0:{}

It’s curious to me that the session_expires field in the session table is being set to the time at which the session is created rather than some time in the future. I don’t know if there’s any connection between the session expiration time and the cookie expiration time.

It’s curious to me that the session_expires field in the session table is being set to the time at which the session is created rather than some time in the future. I don’t know if there’s any connection between the session expiration time and the cookie expiration time.

I thought this when I first saw the values, but I think it’s just that the column name is poorly named. If you’re logged in, each time you refresh a page the date in the row that represents your session will be updated. It’s like a “last seen” date of your active session.

I experienced the same with another CMS. Maybe it’s a browser issue. I’m using the latest Safari on 10.6. What browsers/OS/versions are you using?

I’m using these and get the same problems with each.

Windows XP & Vista

Firefox 3.6.8

IE8

Opera 10.6

Chrome 5.0.375.125

Safari 5.0

I was able to narrow down the problem on my site to a single line of javascript in my front end template:

Offending code:

jQuery('<img style="margin-right:4px;" src="images/transparent.png" alt="" width="14" height="14" class="slider_preview_img" />').each(function() {
  jQuery(this).appendTo('#slider_preview_img');
});

Changed the src= of the img tag to:

src="http://localhost/blue/workspace/images/transparent.png"

Basically correcting the path to the transparent.png

This eliminated the problem for me. I am longer being logged out of the admin every time I refresh the front end.

That’s an important discovery, @bluecube.

I’m starting a new website now, and I’ll give another chance to Symphony 2.1.0, but paying attention to this details.

If I have any news about it, I’ll post here.

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