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 7.2 & session save handler. #2783

Closed
petertron opened this issue Nov 27, 2017 · 5 comments

Comments

Projects
None yet
2 participants
@petertron
Copy link
Contributor

commented Nov 27, 2017

Affected Symphony version(s) : 2.7.x latest
PHP version(s) : 7.2.0RC6
OS(es) : Ubuntu 17.10

Trying to use Symphony with PHP 7.2.0 gives the following error:

ini_set(): Cannot set 'user' save handler by ini_set() or session_module_name()

I don't have much understanding of what is going on.

screenshot-2017-11-27 symphony error

@nitriques nitriques self-assigned this Nov 28, 2017

@nitriques nitriques added the PHP 7 label Nov 28, 2017

@nitriques

This comment has been minimized.

Copy link
Member

commented Nov 28, 2017

I can't find anything on Google and PHP.net about this change. The only thing I can find is that 'user' seems like a valid value. Maybe related: https://github.com/php-memcached-dev/php-memcached/pull/359/files

I'll keep this open, but won't try to fix it until PHP7.2 is officially out.

@petertron

This comment has been minimized.

Copy link
Contributor Author

commented Nov 30, 2017

Now PHP 7.2.0 has been released and is installed on my computer. Not surprisingly the same error happens.

The solution is to simply delete line 60. Setting a custom save handler is just a matter of using session_set_save_handler(). There is no reason why PHP should ever have allowed the 'user' option to be specified with ini_set.

@nitriques

This comment has been minimized.

Copy link
Member

commented Dec 4, 2017

@petertron Thanks. Do we need to ever call it ? Does it still works on 5.6 without that line ?

@petertron

This comment has been minimized.

Copy link
Contributor Author

commented Dec 5, 2017

Symphony works on PHP 5.6 without that line.

@nitriques

This comment has been minimized.

Copy link
Member

commented Dec 11, 2017

Great. I'll fix it ASAP.

nitriques added a commit to DeuxHuitHuit/symphonycms that referenced this issue Dec 13, 2017

Remove session.save_handler from php settings
This has never been required in PHP 5.6 and causes a fatal crash with PHP 7.2

Fixes symphonycms#2783

@nitriques nitriques closed this in e0d058c Feb 1, 2018

KimTheFirst added a commit to KimTheFirst/SessionHandler that referenced this issue Apr 30, 2018

Remove ini_set('session.save_handler').
This chokes on PHP7.2 and appears to be unnecessary.

See also: symphonycms/symphony-2#2783

yunosh added a commit to horde/SessionHandler that referenced this issue Mar 19, 2019

Remove ini_set('session.save_handler').
This chokes on PHP7.2 and appears to be unnecessary.

See also: symphonycms/symphony-2#2783

yunosh pushed a commit to horde/SessionHandler that referenced this issue Mar 19, 2019

Remove ini_set('session.save_handler').
This chokes on PHP7.2 and appears to be unnecessary.

See also: symphonycms/symphony-2#2783
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.