Commit 14e99f0
committed
feature #58165 [FrameworkBundle] Remove default value for
This PR was merged into the 7.2 branch.
Discussion
----------
[FrameworkBundle] Remove default value for `gc_probability` config option
| Q | A
| ------------- | ---
| Branch? | 7.2
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Issues | -
| License | MIT
While playing on a test app, I experienced an error related to the session GC:
> Notice: SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/lib/php/sessions) failed: Permission denied (13)
This is triggered by StrictSessionHandler calling the gc() method of the native session handler.
I figured out the GC was running with 1/1440 probability so I tried increasing the probability to reproduce. I did so patching my ini settings and this did nothing, until I figured out that the corresponding option shadows the ini settings.
This was done 10 years ago in #10366 (/cc `@fabpot`) to fix #10349. Re-reading that issue, I think it doesn't apply anymore: by default, we now encourage storing sessions in the folder configured in the ini settings also.
Let's revert that PR.
Then, what about the error itself? It happens because the folder configured on my Ubuntu doesn't have the `x` permission, so that the session GC cannot list its content. This is consistent with `session.gc_probability` being set to `0`. My host relies on cron instead of this GC. Which means there's nothing else to fix actually.
Commits
-------
e42eb19 [FrameworkBundle] Remove default value for gc_probability config optiongc_probability config option (nicolas-grekas)File tree
Expand file treeCollapse file tree
2 files changed
+1
-2
lines changedOpen diff view settings
Filter options
- src/Symfony/Bundle/FrameworkBundle
- DependencyInjection
- Tests/DependencyInjection
Expand file treeCollapse file tree
2 files changed
+1
-2
lines changedOpen diff view settings
Collapse file
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
673 | 673 | |
674 | 674 | |
675 | 675 | |
676 | | - |
| 676 | + |
677 | 677 | |
678 | 678 | |
679 | 679 | |
|
Collapse file
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php-1Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
814 | 814 | |
815 | 815 | |
816 | 816 | |
817 | | - |
818 | 817 | |
819 | 818 | |
820 | 819 | |
|
0 commit comments