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

Tsugi configuration - warning ini_set()

Plus d'informations
il y a 6 ans 8 mois #6104 par GeeDV
Tsugi configuration - warning ini_set() a été créé par 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
Les utilisateur(s) suivant ont remercié: Alan

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 6 ans 8 mois #6106 par tom
Réponse de tom sur le sujet 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.
Les utilisateur(s) suivant ont remercié: GeeDV

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 6 ans 8 mois #6107 par GeeDV
Réponse de GeeDV sur le sujet 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?

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 6 ans 8 mois #6108 par tom
Réponse de tom sur le sujet 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.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 6 ans 8 mois #6109 par GeeDV
Réponse de GeeDV sur le sujet Tsugi configuration - warning ini_set()
Thank you for confirming Tom, and yes, I agree that finding a solution will be much better than patching.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 6 ans 8 mois #6111 par tom
Réponse de tom sur le sujet 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);
Les utilisateur(s) suivant ont remercié: Alan

Connexion ou Créer un compte pour participer à la conversation.

Modérateurs: JohnSmith
Temps de génération de la page : 0.137 secondes
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo