Closed zorn-v closed 4 years ago
@zorn-v This is a measure for the problem of duplicate cookie being transmitted, but since that problem exists only in apache2 SAPI, it needs to be processed only for that environment. I will fix this.
Thanks! 👍
that problem exists only in apache2 SAPI
Nope, I get that error in php built in server
@zorn-v I'm sorry to be confused. What I would like to say is that "ini_set ('session.use_cookies', 0);' is required only for apache2 SAPI.
Hi, I am also getting the same error, running nginx web server.
PHP Warning 'yii\base\ErrorException' with message 'ini_set(): A session is active. You cannot change the session module's ini settings at this time'
@zorn-v , @MrAwanishKumar I fixed it. Please try nightly build.
Thanks! 👍
@nao-pon it's working now.
Thanks
PHP 7.3, Apache 2.4.38, elFinder 2.1.53 display this warning.
Perhaps you could check there is no active session before setting it to false, something like that:
if (session_status()!=PHP_SESSION_ACTIVE) ini_set('session.use_cookies', 0);
@lianee I made this fix. In various environments, setting with ini_set () may be possible even after the session starts, so the modification has been made in consideration of such environments.
Thanks! 👍
Thanks, unfortunately, this doesn't fix the issue when a session is active in this environment (classic debian LAMP) and session.use_cookies is true (the default, and the desired state for me).
Well, that's no big case since it's just a warning, but I like to have error reporting, and it bothers me to have this one every action in elFinder.
Do you think just ignoring this warning would cause problems?, as in:
if (@ini_set('session.use_cookies', 0) === false) {
Here https://github.com/Studio-42/elFinder/blob/b3a6555758656379c67e981a386c2fbc72507910/php/elFinderSession.php#L65