ZF-Commons / ZfcUser

A generic user registration and authentication module for ZF2. Supports Zend\Db and Doctrine2. (Formerly EdpUser)
BSD 3-Clause "New" or "Revised" License
497 stars 343 forks source link

PHP warning: session_regenerate_id(): Session object destruction failed #620

Open intellent opened 8 years ago

intellent commented 8 years ago

Hey everybody,

I have a post-login redirect route set for ZfcUser. After a user logs in for the first time, I get the following PHP warning prior to the redirect:

session_regenerate_id(): Session object destruction failed

session_regenerate_id(true) is being triggered by Zend\Session\SessionManager::regenerateId() which is called in ZfcUser\Authentication\Adapter\Db::authenticate() line 104.

The reason for this warning is that there’s no old session to delete for first time visitors. Is this a bug in the session manager? Should the manager check, if there is an old session to delete? Or is it a bug in ZfcUser’s auth adapter? Or is it a bug in my application?

Help would be highly appreciated.

n0v3xx commented 6 years ago

https://github.com/zendframework/zend-session/issues/70