View Issue Details

This issue affects 1 person(s).
 14
IDProjectCategoryView StatusLast Update
09916Bug reportsSurvey takingpublic2016-03-03 15:02
Reporterduvemyster Assigned ToLouisGac 
PriorityhighSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.06+ 
Summary09916: Sessions are getting confused on PHP 5.6.7-1 / MySQL 5.5.43 / Apache 2.4
Description

A user has multiple persistent tokens in surveys set to groups at the same domain. They work on one of them and progress to a different group. Then, without closing their browser, they switch to a different persistent token link, then upon progressing to a different group, they will be met with:

"Error

We are sorry but your session has expired.

Either you have been inactive for too long, you have cookies disabled for your browser, or there were problems with your connection.

Please contact..."

Steps To Reproduce

We migrated to PHP 5.6.7-1, MySQL 5.5.43 and Apache 2.4 all at the same time, so I'm not sure which of of these needs to be setup to reproduce this.

In this environment a shorter way to reproduce something similar is to log in as an administrator and then clicking on any "do survey" link in a token table. The "do survey" link will result in the same session expiration error message on load.

Additional Information

See also issue 09914 -- https://bugs.limesurvey.org/view.php?id=9914

TagsNo tags attached.
Bug heat14
Complete LimeSurvey version number (& build)150911
I will donate to the project if issue is resolvedYes
BrowserFirefox 41.0 and Google Chrome 45.0
Database type & versionMySQL 5.5.43
Server OS (if known)Linux (RedHat)
Webserver software & version (if known)Apache 2.4
PHP Version5.6.7-1

Relationships

has duplicate 09920 closedc_schmitz Question Index Jumping bypassing "empty" mandatory fields deletes data on Apache 2.4 / PHP 5.6.7-1 

Users monitoring this issue

stefanverweij

Activities

duvemyster

duvemyster

2015-09-24 01:18

reporter   ~33146

Is this related? -- http://httpd.apache.org/docs/2.4/upgrading.html#run-time

DenisChenu

DenisChenu

2015-09-25 13:08

developer   ~33166

We must have "You already have a token, but seems not the same than the session : click here to start the survey again".

I have it sometimes with apache2.2 and make test.

duvemyster

duvemyster

2015-09-25 13:44

reporter   ~33168

It seems to be happening every time with Apache 2.4, not just sometimes -- at least I haven't not run into it in Apache 2.4. 1st click on do survey link from token table opens the survey, but the 1st use of next to move to the next group results in the error. The same happens if logged out but follow two different token links without exiting browser in between.

duvemyster

duvemyster

2015-09-25 13:45

reporter   ~33169

Maybe related to 9914?

duvemyster

duvemyster

2015-09-25 22:16

reporter   ~33175

Do the following have any bearing on this? (from the "Is this related?" link above) --

  • mod_cache: CacheIgnoreURLSessionIdentifiers now does an exact match against the query string instead of a partial match. If your configuration was using partial strings, e.g. using sessionid to match /someapplication/image.gif;jsessionid=123456789, then you will need to change to the full string jsessionid.

  • mod_cache: The second parameter to CacheEnable only matches forward proxy content if it begins with the correct protocol. In 2.2 and earlier, a parameter of '/' matched all content.

duvemyster

duvemyster

2015-09-26 06:08

reporter   ~33178

The php respect module that handles where session data is stored wasn't loading, and addressing that resolved our logout issue. But the issue reported in this ticket is still occurring.

duvemyster

duvemyster

2015-09-26 08:40

reporter   ~33179

Last edited: 2015-09-26 08:41

A curl -v to a valid token link on the environment DC leads to:

About to connect() to [domain] port 80

  • Trying [ip]... connected
  • Connected to [domain] ([ip]) port 80

    GET [path to token link] HTTP/1.1
    User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
    Host: [domain]
    Accept: /

    < HTTP/1.1 302 Found
    < Server: Apache/2.4
    < Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    < Content-Type: text/html; charset=UTF-8
    < Date: Sat, 26 Sep 2015 06:10:25 GMT
    < Location: https://[token_link]
    < Expires: Thu, 19 Nov 1981 08:52:00 GMT
    < Pragma: no-cache
    < Connection: Keep-Alive
    < Set-Cookie: X-Mapping-nfcoiaoj=836D90EBE8A0978A86DDCAE83F09BF73; path=/
    < Set-Cookie: PHPSESSID=n9sedg30jvntu6uem198kf21l6; path=/; HttpOnly
    < Content-Length: 0

  • Connection #0 to host [domain] left intact
  • Closing connection #0
duvemyster

duvemyster

2015-09-27 21:44

reporter   ~33180

Uncommenting table-based sessions lines in config.php resulted in a white screen with nothing loaded at the admin login page. Any suggestions?

Also, adding "Set the cookie via SSL" to config.php from https://manual.limesurvey.org/Optional_settings#Update_LimeSurvey_config resulted in: Internal Server Error
Property "LSYii_Application.session" is read only. Any thoughts on additional Yii settings, or is this barking up the wrong tree?

DenisChenu

DenisChenu

2015-09-28 08:42

developer   ~33184

<q>Internal Server Error
Property "LSYii_Application.session" is read only. Any thoughts on additional Yii settings, or is this barking up the wrong tree? </q>

? Strange if the config is OK. Session start in phpinfo ?

duvemyster

duvemyster

2015-09-28 19:53

reporter   ~33195

<q 33180> Uncommenting table-based sessions lines in config.php resulted in a white screen with nothing loaded at the admin login page. Any suggestions?</q>

I was so focused on finishing building a replica under Apache 2.2 that I had also uncommented the comment line -- "// Uncomment the following line if you need table-based sessions". Applying that correctly resolved the sessions state issues in the item reported here under Apache 2.4.


<q 33184> ? Strange if the config is OK. Session start in phpinfo ?</q>

The way I had attempted to test this was a straight copy-paste of the "// Set the cookie via SSL lines" from https://manual.limesurvey.org/Optional_settings#Session_settings, pasting them in just above "// Use the following config variable to set modified optional settings copied from config-defaults.php". However, it also with the table-based session section fully commented.

Should I re-try that differently now that session states are working with the table-based session configuration properly applied?

DenisChenu

DenisChenu

2015-09-29 08:16

developer   ~33200

q 33184 : due to "LSYii_Application.session" .... But if your config.php is broken : anything can happen.

the 'session' must be at same place than 'urlManager'

c_schmitz

c_schmitz

2015-09-30 11:26

administrator   ~33244

Starting the same survey with different tokens at the same time on the same browser is currently not supported.

duvemyster

duvemyster

2015-09-30 23:16

reporter   ~33269

Last edited: 2015-10-01 19:35

Prior to changing to table-based sessions, the problem reported here was occurring when logging in as an administrator and clicking on any "do survey" link in a token table and progressing to a 2nd group, or when re-launching the same token link received via email more than once without closing the browser-in-between.

However, after changing to table-based sessions all is operating normally once again.

duvemyster

duvemyster

2015-09-30 23:19

reporter   ~33270

(Also prior to changing to table-based sessions, the issue reported here was occurring when used token links from two different surveys received via email without closing the browser in-between. All is well after switching to table-based sessions.)

Issue History

Date Modified Username Field Change
2015-09-24 01:08 duvemyster New Issue
2015-09-24 01:18 duvemyster Note Added: 33146
2015-09-25 13:08 DenisChenu Note Added: 33166
2015-09-25 13:44 duvemyster Note Added: 33168
2015-09-25 13:45 duvemyster Note Added: 33169
2015-09-25 22:16 duvemyster Note Added: 33175
2015-09-26 06:08 duvemyster Note Added: 33178
2015-09-26 08:40 duvemyster Note Added: 33179
2015-09-26 08:41 duvemyster Note Edited: 33179
2015-09-27 21:44 duvemyster Note Added: 33180
2015-09-28 08:42 DenisChenu Note Added: 33184
2015-09-28 19:53 duvemyster Note Added: 33195
2015-09-29 08:16 DenisChenu Note Added: 33200
2015-09-30 11:26 c_schmitz Note Added: 33244
2015-09-30 23:16 duvemyster Note Added: 33269
2015-09-30 23:19 duvemyster Note Added: 33270
2015-10-01 19:35 duvemyster Note Edited: 33269
2015-12-09 09:18 c_schmitz Relationship added has duplicate 09920
2015-12-17 10:15 stefanverweij Issue Monitored: stefanverweij
2016-03-03 15:02 LouisGac Status new => closed
2016-03-03 15:02 LouisGac Assigned To => LouisGac
2016-03-03 15:02 LouisGac Resolution open => fixed
2021-08-02 19:51 duvemyster Bug heat 12 => 14