Symfony2 sessions not working as expected / session keeps timing out

前端 未结 5 1905
后悔当初
后悔当初 2021-01-03 00:31

My Symfony2 application displays a main page, and from there on it primarily uses AJAX requests to display content to the user via modals.

I\'ve noticed that after t

5条回答
  •  感动是毒
    2021-01-03 00:48

    My first answer seems not suitable for your issue. Maybe this one will help.

    Do you clear Symfony cache between your requests ?

    Extract of symfony documentation :

    save_path

    type: string default: %kernel.cache.dir%/sessions

    This determines the argument to be passed to the save handler. If you choose the default file handler, this is the path where the session files are created. For more information, see Configuring the Directory where Session Files are Saved.

    You can also set this value to the save_path of your php.ini by setting the value to null.

    By default, Symfony stores sessions in the cache directory that is emptied while clearing cache...

提交回复
热议问题