Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Warning: session_set_save_handler() & session_set_cookie_params() #19127

Closed
Quy opened this issue Dec 22, 2017 · 8 comments
Closed

PHP Warning: session_set_save_handler() & session_set_cookie_params() #19127

Quy opened this issue Dec 22, 2017 · 8 comments

Comments

@Quy
Copy link
Contributor

Quy commented Dec 22, 2017

Steps to reproduce the issue

Just upgraded to PHP 7.2.0

Go to the front end.
Log in.
See php error log.

Actual result

PHP Warning: session_set_save_handler(): Cannot change save handler when session is active in \libraries\joomla\session\storage.php on line 106

PHP Warning: session_set_cookie_params(): Cannot change session cookie parameters when session is active in \libraries\src\Session\Session.php on line 807

System information (as much as possible)

PHP 7.2.0

@joomdonation
Copy link
Contributor

I can confirm the issue. Updated our website to PHP 7.2 last week and saw the same warning in error logs

@brianteeman
Copy link
Contributor

Is this PR a fix? #15742

@Quy
Copy link
Contributor Author

Quy commented Dec 22, 2017

Sadly no.

@joomdonation
Copy link
Contributor

joomdonation commented Dec 23, 2017

Just want to add that this issue happens when user logs in and seems like a bug in fork method of Session class https://github.com/joomla/joomla-cms/blob/staging/libraries/src/Session/Session.php#L792

I don't understand deep enough about session, however, look like https://github.com/joomla/joomla-cms/blob/staging/libraries/src/Session/Session.php#L804 doesn't need to be called as the session is active (comment it will solve the first warning)

Also, I am not sure this command https://github.com/joomla/joomla-cms/blob/staging/libraries/src/Session/Session.php#L811 is needed as because after the previous line called $this->_handler->regenerate(true, null);, session is started already

@mbabker Could you please take a look at this issue?

@joomla-cms-bot
Copy link

Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/19127

@ghost
Copy link

ghost commented Dec 28, 2017

closed as having Pull Request #19199

@haggar30
Copy link

haggar30 commented Jan 14, 2018

Have same issue, solved copy this into php.ini

error_log=C:\Windows\temp\PHP7_errors.log
upload_tmp_dir=C:\Windows\temp
session.save_path=C:\Windows\temp
cgi.force_redirect=0
cgi.fix_pathinfo=1
fastcgi.impersonate=1
fastcgi.logging=0
max_execution_time=300
date.timezone=Europe/Belgrade

@Quy
Copy link
Contributor Author

Quy commented Jan 14, 2018

@haggar30 can you test PR #19199?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants