incompatibility with PHP 7.2

Bug #1803121 reported by Andre Santos on 2018-11-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
queXS
Medium
Adam Zammit

Bug Description

since php 5.6 EOL is near, I've upgraded the server PHP to version 7.2

Since then this errors constantly appear:

PHP Warning: session_set_cookie_params(): Cannot change session cookie parameters when session is active in /auth-interviewer.php on line 45
PHP Warning: session_name(): Cannot change session name when session is active in /auth-interviewer.php on line 43

PHP Warning: session_set_cookie_params(): Cannot change session cookie parameters when session is active in /auth-interviewer.php on line 45
PHP Warning: Use of undefined constant DEFAULT_LOCALE - assumed 'DEFAULT_LOCALE' (this will throw an Error in a future version of PHP) in /lang.inc.php on line 65

PHP Notice: Undefined index: tryanother in /functions/functions.operator.php on line 2223

since then queXS is unusable.

The questionnaires don't load right at first try (it always gives an error on invalid token), but, after a reload, it loads.

After the first numbers drawn, it stops working for saying that there is no new numbers available (when there are..) This "error" always happens at the same time that the warning "undefined constant DEFAULT_LOCALE" appears in the logs.

I think that each time the user enters the page, a new session is created. Is this the expected functionality?

Related branches

Andre Santos (andre-ars) wrote :

Also, if a questionnaire starts, in the middle of it, it may stop working, giving an error that the token as been used.

from that moment on, stops working.

#### log ####
PHP Warning: session_name(): Cannot change session name when session is active in /auth-interviewer.php on line 43
PHP Warning: session_set_cookie_params(): Cannot change session cookie parameters when session is active in /auth-interviewer.php on line 45
FAILED in get_case_id for case
FAILED in get_case_id for case
FAILED in get_case_id for case
.
.
.

Adam Zammit (adamzammit) wrote :

Thanks for this report.

I haven't had a chance to test with 7.2, but I do know Limesurvey and some other systems had some troubles with anything above 7.1. Can you please try with 7.1 now (which I believe works without error) and then I'll get on to debugging what has changed in 7.2 that is causing these issues.

Adam

Changed in quexs:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Adam Zammit (adamzammit)
Andre Santos (andre-ars) wrote :

Dear Adam,

I've just changed PHP to version 7.1 and with almost the same results:

[02-Jan-2019 13:58:19 UTC] FAILED in get_case_id for case
[02-Jan-2019 13:58:19 UTC] FAILED in get_case_id for case
[02-Jan-2019 13:58:19 UTC] FAILED in get_case_id for case
[02-Jan-2019 13:58:19 UTC] FAILED in get_case_id for case
[02-Jan-2019 13:58:20 UTC] FAILED in get_case_id for case
[02-Jan-2019 13:58:20 UTC] FAILED in get_case_id for case
[02-Jan-2019 13:58:20 UTC] FAILED in get_case_id for case
[02-Jan-2019 13:58:20 UTC] FAILED in get_case_id for case
[02-Jan-2019 13:58:31 UTC] PHP Notice: Use of undefined constant DEFAULT_LOCALE - assumed 'DEFAULT_LOCALE' in /lang.inc.php on line 65
[02-Jan-2019 13:58:33 UTC] FAILED in get_case_id for case
[02-Jan-2019 13:58:33 UTC] FAILED in get_case_id for case
[02-Jan-2019 13:58:33 UTC] FAILED in get_case_id for case
[02-Jan-2019 13:58:33 UTC] FAILED in get_case_id for case

In this version there's no PHP warning

Adam Zammit (adamzammit) wrote :

I have fixed the warnings so it should work with php 7.2/7.3 now. A new session should not be created - but the existing one should be continued.

Please see how you go with the applied fixes.

Adam

Changed in quexs:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers