8000 [Session] Session storage path does not get set. · Issue #16898 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Session] Session storage path does not get set. #16898

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

Closed
Richard87 opened this issue Dec 8, 2015 · 6 comments
Closed

[Session] Session storage path does not get set. #16898

Richard87 opened this issue Dec 8, 2015 · 6 comments

Comments

@Richard87
Copy link

Hi!

It seems Symfony dosn't change the session storage path %kernel.root_dir%/../var/sessions/%kernel.environment%, when checking app_dev.php/_profiler/phpinfo it returns /var/lib/php/session.

This lines solves the problem temporarily:
session_save_path(__DIR__ . "/../var/session"); in app.php and app_dev.php

I got the exception when authenticating because Apache dosn't have write access to the default PHP session storage path.

I'm running Symfony 3.0.0 with PHP 7.0.0.

The project that I noticed the issue on:
https://bitbucket.org/Richardh87/messenger

@Richard87 Richard87 changed the title [Symfony3][HttpFoundation] Session storage path does not get set. [Session] Session storage path does not get set. Dec 8, 2015
@Tobion
Copy link
Contributor
Tobion commented Dec 8, 2015

Did you configure the save_path as in https://github.com/symfony/symfony-standard/blob/master/app/config/config.yml#L31 ?

@Richard87
Copy link
Author

@Tobion
Copy link
Contributor
Tobion commented Dec 8, 2015

I found the problem. See symfony/symfony-standard#904 for the fix.

@Richard87
Copy link
Author

Nice! that was really fast :)

@Richard87
Copy link
Author

that fix solved my problems :)

@xabbuh
Copy link
Member
xabbuh commented Dec 9, 2015

Closing here then as there is nothing we can do in the core.

@xabbuh xabbuh closed this as completed Dec 9, 2015
fabpot added a commit to symfony/symfony-standard that referenced this issue Jan 14, 2016
This PR was merged into the 3.0 branch.

Discussion
----------

fix ignored session save_path

fixes symfony/symfony#16898

do not use php.ini session handler but native file to actually use save_path config

When handler_id is null it uses the Native one, but that does not set the save_path. So we need to use https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php instead (which is the default configuration).

Commits
-------

070e53c do not use php.ini session handler but native file to actually use save_path config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0