-
-
Notifications
You must be signed in to change notification settings - Fork 436
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
Fixed PHP warnings when session backend exits before returning. #3109
Fixed PHP warnings when session backend exits before returning. #3109
Conversation
@colinmollenhour do you think we could target v19 or there's something against it? |
Could this be possibly related to #3030? |
It is mostly BC, but will result in minor changes of behavior for error handling if exceptions are throw from the session handler. Namely, all throwable are caught and will cause immediate exit now instead of bubbling up. I don't know what those exceptions would be, they should be rare in my estimation and only affect errors, not normal requests. In the case of So, I think this would fall under a MINOR update, not a MAJOR or PATCH:
This doesn't fix a regression, more of a nuisance.. So based on the new RFC (which hasn't quite passed yet) this would go to "main" and not get backported, in my opinion.
Yes, somewhat related. However, those errors don't occur under normal conditions and seem like a symptom of some other problem as in normal Magento code I don't see why there should be any output before the session has even been started yet. So somewhat related but not exactly. |
@colinmollenhour anyway branch 19.4.x is now on php7.4 |
Description
When a session handler exits during
session_start()
the PHP engine still tries to end the session during shutdown even though it was never successfully started. TheCm_RedisSession
was updated with asetDieOnError
method (requires 3.1+) to allow this automatic exit to be disabled and this patch for OpenMage disables it and then catches any thrown exceptions and handles the exit more gracefully by first callingsession_abort()
.Fixed Issues
PHP throws a few warnings when exiting un-gracefully during
session_start()
:Manual testing scenarios
Setup Redis sessions in
app/etc/local/xml
:Pass a number of concurrent requests to overwhelm the concurrency limit:
Summary:
Observe that a 503 error is returned for the excess requests and check if any warnings are logged due to the session backend errors.