-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
Recently upgraded my M2 sample site to PHP 7 to do some performance benchmarking and I'm running into the following issue when trying to do anything session related (admin login, checkout, account functions, etc).
I use Redis backend for cache and Memcache for php session cache.
Getting the following error in Magento 2 on PHP 7.0.1:
session_regenerate_id(): Failed to create(read) session ID: user (path: aws-memcache-instance:11211) in /var/www/mysite.com/html/vendor/magento/framework/Session/SessionManager.php on line 473
Same issue with CM Redis and another M2 extension:
Inchoo/Inchoo_PHP7#4
colinmollenhour/Cm_RedisSession#70
It appears to be an issue with the read function not always returning a string.
As a temporary fix I cast the return value for the read() function in the SessionHandler as a string.