Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
The place for more technical questions for those who want to create new pagetypes or bespoke functionality.
  • Page:
  • 1

TOPIC:

Tsugi configuration - warning ini_set() 5 years 3 weeks ago #6104

  • garyh
  • garyh's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 12
  • Thank you received: 1
Hi,
We recently upgraded our PHP version from 5.4.16 to 7.3.11, and we're now trying to install and configure TSUGI.

On Step 5 of the set up document (xot.xerte.org.uk/play.php?template_id=88)
when I go to the project properties, it reports the following error:

"Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time in /usr/local/projects/xerte/www/html/tsugi/vendor/tsugi/lib/include/setup.php on line 105"

Has anyone came across this issue? and is anyone using php 7.2+, as I've read invalid INI modifications are now checked and made to fail, perhaps due to the ordering of statements.

Thanks,
Gary
The following user(s) said Thank You: Alan

Please Log in or Create an account to join the conversation.

Tsugi configuration - warning ini_set() 5 years 3 weeks ago #6106

  • tom
  • tom's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 1297
  • Thank you received: 325
Yes, I've seen this, and I am working on a solution.

In the mean time, it doesn't seem to influence the workings of Xerte.
The following user(s) said Thank You: garyh

Please Log in or Create an account to join the conversation.

Tsugi configuration - warning ini_set() 5 years 2 weeks ago #6107

  • garyh
  • garyh's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 12
  • Thank you received: 1
I switched back to php 5.4.16 to test if it was related to the newer php version, but the same error occurred.

The error
"Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time in /usr/local/projects/xerte/www/html/tsugi/vendor/tsugi/lib/include/setup.php on line 105"

is complaining about the following code:
if ( isset($CFG->sessionlifetime) ) {
ini_set('session.gc_maxlifetime', $CFG->sessionlifetime);
} else {
$CFG->sessionlifetime = ini_get('session.gc_maxlifetime');
}

and the page will load successfully if I comment the above out and replace with:
$CFG->sessionlifetime = '3600';

Can you see an issue if I implemented the above?

Please Log in or Create an account to join the conversation.

Tsugi configuration - warning ini_set() 5 years 2 weeks ago #6108

  • tom
  • tom's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 1297
  • Thank you received: 325
Well, no, I don't see a direct problem with it, except I would like to find a solution where we do NOT need to patch the (third party) tsugi code.

But your solution will work.

Please Log in or Create an account to join the conversation.

Tsugi configuration - warning ini_set() 5 years 2 weeks ago #6109

  • garyh
  • garyh's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 12
  • Thank you received: 1
Thank you for confirming Tom, and yes, I agree that finding a solution will be much better than patching.

Please Log in or Create an account to join the conversation.

Tsugi configuration - warning ini_set() 5 years 2 weeks ago #6111

  • tom
  • tom's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 1297
  • Thank you received: 325
The best solution I can find now, is to set the following in tsugi/config.php around line 55:

unset($CFG->sessionlifetime);
The following user(s) said Thank You: Alan

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Moderators: JohnSmith
Time to create page: 0.052 seconds
Copyright © 2024 The Xerte Project.
Xerte logo Apereo logo OSI Logo

Search