Skip to main content
Tags in title (http://meta.stackexchange.com/q/19190)
Source Link
jww
  • 103.6k
  • 107
  • 453
  • 975

Symfony2 Security automatic Automatic logout unexpectedly

I am facing an weird issue,sometimes when an user weather he is active or not reloads the page or click on any other page,the session logs out. I am using FOS User Bundle here.Also,in that case the webpage loads the half of the expected page and half of the login page. This leads to a broken design. So I have 2 problems here: 1.Unexpected session timeout. 2.loading of two twig files at the same time. I assume symfony security tries to loads the login page once it finds the session is timed out,at the same time where the current file was loading.

  1. Unexpected session timeout.
  2. Loading of two twig files at the same time. I assume symfony security tries to loads the login page once it finds the session is timed out,at the same time where the current file was loading.

This is how my config.yml file session section looks like.

framework: #esi: ~ #translator: { fallback: "%locale%" } secret: "%secret%" router: resource: "%kernel.root_dir%/config/routing.yml" strict_requirements: ~ form: ~ csrf_protection: ~ validation: { enable_annotations: true } templating: engines: ['twig'] #assets_version: SomeVersionScheme default_locale: "%locale%" trusted_hosts: ~ trusted_proxies: ~ session: # handler_id set to null will use default session handler from php.ini # handler_id: ~ handler_id: session.handler.native_file save_path: "%kernel.root_dir%/sessions" # to avoid this error- Symfony2 and ContextErrorException: Warning: SessionHandler::read() Exception fragments: { path: /_fragment } http_method_override: true 

Symfony2 Security automatic logout unexpectedly

I am facing an weird issue,sometimes when an user weather he is active or not reloads the page or click on any other page,the session logs out. I am using FOS User Bundle here.Also,in that case the webpage loads the half of the expected page and half of the login page. This leads to a broken design. So I have 2 problems here: 1.Unexpected session timeout. 2.loading of two twig files at the same time. I assume symfony security tries to loads the login page once it finds the session is timed out,at the same time where the current file was loading.

This is how my config.yml file session section looks like.

framework: #esi: ~ #translator: { fallback: "%locale%" } secret: "%secret%" router: resource: "%kernel.root_dir%/config/routing.yml" strict_requirements: ~ form: ~ csrf_protection: ~ validation: { enable_annotations: true } templating: engines: ['twig'] #assets_version: SomeVersionScheme default_locale: "%locale%" trusted_hosts: ~ trusted_proxies: ~ session: # handler_id set to null will use default session handler from php.ini # handler_id: ~ handler_id: session.handler.native_file save_path: "%kernel.root_dir%/sessions" # to avoid this error- Symfony2 and ContextErrorException: Warning: SessionHandler::read() Exception fragments: { path: /_fragment } http_method_override: true 

Automatic logout unexpectedly

I am facing an weird issue,sometimes when an user weather he is active or not reloads the page or click on any other page,the session logs out. I am using FOS User Bundle here.Also,in that case the webpage loads the half of the expected page and half of the login page. This leads to a broken design. So I have 2 problems here:

  1. Unexpected session timeout.
  2. Loading of two twig files at the same time. I assume symfony security tries to loads the login page once it finds the session is timed out,at the same time where the current file was loading.

This is how my config.yml file session section looks like.

framework: #esi: ~ #translator: { fallback: "%locale%" } secret: "%secret%" router: resource: "%kernel.root_dir%/config/routing.yml" strict_requirements: ~ form: ~ csrf_protection: ~ validation: { enable_annotations: true } templating: engines: ['twig'] #assets_version: SomeVersionScheme default_locale: "%locale%" trusted_hosts: ~ trusted_proxies: ~ session: # handler_id set to null will use default session handler from php.ini # handler_id: ~ handler_id: session.handler.native_file save_path: "%kernel.root_dir%/sessions" # to avoid this error- Symfony2 and ContextErrorException: Warning: SessionHandler::read() Exception fragments: { path: /_fragment } http_method_override: true 
added 121 characters in body
Source Link
Megha Paul
  • 385
  • 2
  • 7
  • 20

I am facing an weird issue,whensometimes when an user weather he is not active for some time lets assume 5 mints,and he comes back andor not reloads the page or click on any other page,the session logs out. I am using FOS User Bundle here.Also,in that case the webpage loads the half of the expected page and half of the login page. This leads to a broken design. So I have 2 problems here: 1.Unexpected session timeout. 2.loading of two twig files at thatthe same time. I assume symfony security tries to loads the login page once it finds the session is timed out,at the same time where the current file was loading.

This is how my config.yml file session section looks like.

framework: #esi: ~ #translator: { fallback: "%locale%" } secret: "%secret%" router: resource: "%kernel.root_dir%/config/routing.yml" strict_requirements: ~ form: ~ csrf_protection: ~ validation: { enable_annotations: true } templating: engines: ['twig'] #assets_version: SomeVersionScheme default_locale: "%locale%" trusted_hosts: ~ trusted_proxies: ~ session: # handler_id set to null will use default session handler from php.ini # handler_id: ~ handler_id: session.handler.native_file save_path: "%kernel.root_dir%/sessions" # to avoid this error- Symfony2 and ContextErrorException: Warning: SessionHandler::read() Exception fragments: { path: /_fragment } http_method_override: true 

I am facing an weird issue,when an user is not active for some time lets assume 5 mints,and he comes back and reloads the page or click on any other page,the session logs out. I am using FOS User Bundle here.Also,in that case the webpage loads the half of the expected page and half of the login page. This leads to a broken design. So I have 2 problems here: 1.Unexpected session timeout. 2.loading of two twig files at that time.

This is how my config.yml file session section looks like.

framework: #esi: ~ #translator: { fallback: "%locale%" } secret: "%secret%" router: resource: "%kernel.root_dir%/config/routing.yml" strict_requirements: ~ form: ~ csrf_protection: ~ validation: { enable_annotations: true } templating: engines: ['twig'] #assets_version: SomeVersionScheme default_locale: "%locale%" trusted_hosts: ~ trusted_proxies: ~ session: # handler_id set to null will use default session handler from php.ini # handler_id: ~ handler_id: session.handler.native_file save_path: "%kernel.root_dir%/sessions" # to avoid this error- Symfony2 and ContextErrorException: Warning: SessionHandler::read() Exception fragments: { path: /_fragment } http_method_override: true 

I am facing an weird issue,sometimes when an user weather he is active or not reloads the page or click on any other page,the session logs out. I am using FOS User Bundle here.Also,in that case the webpage loads the half of the expected page and half of the login page. This leads to a broken design. So I have 2 problems here: 1.Unexpected session timeout. 2.loading of two twig files at the same time. I assume symfony security tries to loads the login page once it finds the session is timed out,at the same time where the current file was loading.

This is how my config.yml file session section looks like.

framework: #esi: ~ #translator: { fallback: "%locale%" } secret: "%secret%" router: resource: "%kernel.root_dir%/config/routing.yml" strict_requirements: ~ form: ~ csrf_protection: ~ validation: { enable_annotations: true } templating: engines: ['twig'] #assets_version: SomeVersionScheme default_locale: "%locale%" trusted_hosts: ~ trusted_proxies: ~ session: # handler_id set to null will use default session handler from php.ini # handler_id: ~ handler_id: session.handler.native_file save_path: "%kernel.root_dir%/sessions" # to avoid this error- Symfony2 and ContextErrorException: Warning: SessionHandler::read() Exception fragments: { path: /_fragment } http_method_override: true 
Source Link
Megha Paul
  • 385
  • 2
  • 7
  • 20

Symfony2 Security automatic logout unexpectedly

I am facing an weird issue,when an user is not active for some time lets assume 5 mints,and he comes back and reloads the page or click on any other page,the session logs out. I am using FOS User Bundle here.Also,in that case the webpage loads the half of the expected page and half of the login page. This leads to a broken design. So I have 2 problems here: 1.Unexpected session timeout. 2.loading of two twig files at that time.

This is how my config.yml file session section looks like.

framework: #esi: ~ #translator: { fallback: "%locale%" } secret: "%secret%" router: resource: "%kernel.root_dir%/config/routing.yml" strict_requirements: ~ form: ~ csrf_protection: ~ validation: { enable_annotations: true } templating: engines: ['twig'] #assets_version: SomeVersionScheme default_locale: "%locale%" trusted_hosts: ~ trusted_proxies: ~ session: # handler_id set to null will use default session handler from php.ini # handler_id: ~ handler_id: session.handler.native_file save_path: "%kernel.root_dir%/sessions" # to avoid this error- Symfony2 and ContextErrorException: Warning: SessionHandler::read() Exception fragments: { path: /_fragment } http_method_override: true