-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[BC Break?] "Failed to start the session" error #12562
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
Comments
After upgrading to 2.5.7 I am getting the same issue when using StreamedResponse, PHP 5.3.10. |
I am not using StreamedResponse - looks like @nikolajosipovic's issue has been reported here: #12423. I am unsure if this issue is related. |
Few more notes about this issue: I am using Symfony's HttpCache, I have a cached full-page layout with an esi fragment that is not cached and accessing the session. I think the exception is being raised during rendering the fragment. |
I'll provide a fix on the weekend. |
Just to add another 'me too' here. Just updated from 2.3.5 to 2.3.22 and I get the "RuntimeException: Failed to start the session: already started by PHP ($_SESSION is set)." error. The exception is raised from here: cache/dev/classes.php NativeSessionStorage->start() That line has changed in 2.3.22, if (PHP_VERSION_ID < 50400 && isset($_SESSION) && session_id()) { God knows the reason for changing what appears to be a perfectly fine block of code though. |
we had the same problem with php 5.3.27 and that was caused by the "render_esi" command so we removed it temporarily |
Is this related to #12833? |
See #12961 for a fix |
This PR was merged into the 2.3 branch. Discussion ---------- fix session restart on PHP 5.3 | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | no | Fixed tickets | #12562 | License | MIT | Doc PR | - this also removes some useless code Commits ------- b9d3c92 fix session restart on PHP 5.3
Just confirming that the fix works for me thanks @Tobion |
After upgrading to 2.5.7 I started seeing this error very frequently. It looks like it has to do with #12341 and am only seeing it with PHP 5.3 (5.3.15 specifically). I don't appear to have the issue on PHP 5.5. When I revert to 2.5.6 everything worked as expected.
I am using the PdoSessionHandler.
Here is an excerpt from my logs:
(Ref: #12325)
The text was updated successfully, but these errors were encountered: