Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[FrameworkBundle] Inform the user when save_path will be ignored#31620

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:3.4fromgnat42:patch-session.handler_id2
Jul 8, 2019

Conversation

@gnat42
Copy link
Contributor

@gnat42gnat42 commentedMay 25, 2019
edited
Loading

QA
Branch?3.4
Bug fix?yes
New feature?no
BC breaks?no / maybe??
Deprecations?no
Tests pass?yes
Fixed tickets#31611
LicenseMIT

When a project is created, framework.yaml or config.yml has handler_id set to ~. This uses the native php SessionHandler object which is instantiated with the save_path setting from php.ini or php-fpm.d/www.conf. If you set a save_path, it is silently ignored. When using mod_php for apache or php-fpm running as apache/nginx this is typically not a big deal (except your session files are stored someplace other than you actually wanted). However if using php-fpm and running as a non-standard user for the distro, it will fail silently. Sessions won't be saved because the setting has no effect. This throws a warning in those cases to inform the user.

It could be a BC because it changes the default configuration however fixes a 'long standing bug' if you will. Not sure what you want to do about that part.

@gnat42
Copy link
ContributorAuthor

I haven't added tests yet because I'm not 100% sure what the best way to solve this was. This at least informs the user. However if it were possible to detect this and somehow have ini_set('session.save_path', $save_path); called that would fix the 'bug' but where to put that is a bit of a mystery. I also expect it may be useful to update the documentation related to this setting to explain why which I'd be happy to do if this was deemed the correct solution.

@chalasrchalasr added this to the3.4 milestoneMay 25, 2019
@gnat42gnat42force-pushed thepatch-session.handler_id2 branch 2 times, most recently from01f5e22 to267a4f7CompareJune 17, 2019 21:44

publicfunctiontestNullSessionHandlerWithSavePath()
{
$this->expectException(InvalidConfigurationException::class);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Must be converted to an annotation for tests to pass on old PHP versions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@fabpotfabpotforce-pushed thepatch-session.handler_id2 branch from267a4f7 toa090129CompareJuly 8, 2019 12:54
@fabpot
Copy link
Member

Thank you@gnat42.

@fabpotfabpot merged commita090129 intosymfony:3.4Jul 8, 2019
fabpot added a commit that referenced this pull requestJul 8, 2019
…gnored (gnat42)This PR was squashed before being merged into the 3.4 branch (closes#31620).Discussion----------[FrameworkBundle] Inform the user when save_path will be ignored| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| BC breaks?    | no  / maybe??| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#31611| License       | MITWhen a project is created, framework.yaml or config.yml has handler_id set to ~. This uses the native php SessionHandler object which is instantiated with the save_path setting from php.ini or php-fpm.d/www.conf. If you set a save_path, it is silently ignored. When using mod_php for apache or php-fpm running as apache/nginx this is typically not a big deal (except your session files are stored someplace other than you actually wanted). However if using php-fpm and running as a non-standard user for the distro, it will fail silently. Sessions won't be saved because the setting has no effect. This throws a warning in those cases to inform the user._It could be a BC because it changes the default configuration however fixes a 'long standing bug' if you will. Not sure what you want to do about that part._Commits-------a090129 [FrameworkBundle] Inform the user when save_path will be ignored
@gnat42
Copy link
ContributorAuthor

thank you!@fabpot

@gnat42gnat42 deleted the patch-session.handler_id2 branchJuly 10, 2019 19:10
This was referencedJul 27, 2019
luispabon added a commit to luispabon/symfony that referenced this pull requestAug 13, 2019
nicolas-grekas added a commit that referenced this pull requestAug 22, 2019
…ill be ignored (gnat42)"This reverts commitfea98a8, reversingchanges made tobd498f2.
nicolas-grekas added a commit that referenced this pull requestAug 22, 2019
* 3.4:  Revert "bug#31620 [FrameworkBundle] Inform the user when save_path will be ignored (gnat42)"  [Form][PropertyPathMapper] Avoid extra call to get config
nicolas-grekas added a commit that referenced this pull requestAug 22, 2019
* 4.3:  Revert "bug#31620 [FrameworkBundle] Inform the user when save_path will be ignored (gnat42)"  [Form][PropertyPathMapper] Avoid extra call to get config  [HttpKernel] remove unused fixtures
nicolas-grekas added a commit that referenced this pull requestAug 22, 2019
* 4.4:  Revert "bug#31620 [FrameworkBundle] Inform the user when save_path will be ignored (gnat42)"  [Form][PropertyPathMapper] Avoid extra call to get config  [HttpKernel] remove unused fixtures
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot requested changes

@weaverryanweaverryanweaverryan left review comments

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

5 participants

@gnat42@fabpot@weaverryan@chalasr@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp