The Wayback Machine - https://web.archive.org/web/20230128164346/https://github.com/symfony/symfony/issues/49140
Skip to content
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

Unable to use Sessions: "Cannot find any session data." #49140

Open
panvid opened this issue Jan 27, 2023 · 0 comments
Open

Unable to use Sessions: "Cannot find any session data." #49140

panvid opened this issue Jan 27, 2023 · 0 comments

Comments

@panvid
Copy link

panvid commented Jan 27, 2023

Symfony version(s) affected

6.2.5

Description

Since hours I have lots of trouble with Symfony starting session. Whole Kernel works perfect, I use PHP 8.2.1, Session can be startetd manually without any problem.

How to reproduce

  • Symfony Framework / Runtime 6.2.5
  • PHP 8.2.1
  • PHP Session Support enabled
  • session.auto_start disabled
  • session.save_path is read- and writeable, PHPs session_start() works

Session-Config

framework:
  session:
    handler_id: null
    cookie_secure: auto
    cookie_samesite: lax
    storage_factory_id: session.storage.factory.native

I call the Session with:

\Symfony\Component\HttpFoundation\Request::createFromGlobals()->getSession();

This will throw an exception every time:
Cannot find any session data. thrown in Symfony\Component\HttpFoundation\Request::getSession().

I used he session in local development stage. Project is under "http://localhost:8000".

Possible Solution

No response

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.