You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Provide more information if writing session with custom save handler fails #7787
session_write_close(): Failed to write session data using user defined save handler. (session.save_path: /var/lib/php)
But I expected this output instead:
Having this "fake" session handler, it is impossible to say where session write failed and find the cause. An installed error handler just reports
errorHandler::errorHandler called at [:]
What would the desired additional information be? The name of the user defined session handler class?
Edit: If you are asking for PHP to somehow distinguish which of the "return false" in SessionHandler::write() resulted in the failure, this is plainly impossible. You'd have to throw a notice from the session handler yourself if you wanted to achieve that.
changed the title [-]session_save_handler incomplete stack trace[/-][+]Provide more information if writing session with custom save handler fails[/+]on Dec 19, 2021
Activity
nikic commentedon Dec 19, 2021
What would the desired additional information be? The name of the user defined session handler class?
Edit: If you are asking for PHP to somehow distinguish which of the "return false" in
SessionHandler::write()resulted in the failure, this is plainly impossible. You'd have to throw a notice from the session handler yourself if you wanted to achieve that.mokraemer commentedon Dec 19, 2021
I think the class name and the function called (updateTimestamp or write) would help to see which of those two functions failed.
[-]session_save_handler incomplete stack trace[/-][+]Provide more information if writing session with custom save handler fails[/+]