The place for more technical questions for those who want to create new pagetypes or bespoke functionality.

Tsugi configuration - warning ini_set()

More
6 years 8 months ago #6104 by GeeDV
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.

More
6 years 8 months ago #6106 by tom
Replied by tom on topic Tsugi configuration - warning ini_set()
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: GeeDV

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

More
6 years 8 months ago #6107 by GeeDV
Replied by GeeDV on topic Tsugi configuration - warning ini_set()
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.

More
6 years 8 months ago #6108 by tom
Replied by tom on topic Tsugi configuration - warning ini_set()
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.

More
6 years 8 months ago #6109 by GeeDV
Replied by GeeDV on topic Tsugi configuration - warning ini_set()
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.

More
6 years 8 months ago #6111 by tom
Replied by tom on topic Tsugi configuration - warning ini_set()
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.

Moderators: JohnSmith
Time to create page: 0.138 seconds
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo