I spent a bit of time tracking down a session-related error that was occurring after upgrading PHP from version 5 to version 7:
PHP Catchable fatal error: session_regenerate_id(): Failed to create(read) session ID: user (path: /var/lib/php/session) in /vagrant/library/Zend/Session.php on line 322
Although this particular error was coming from Zend Framework, there’s a more general solution that is framework-agnostic:
If you are setting a custom session handler, make sure the
read callback returns a string. Returning null or false will cause the above error.