Symfony2 sessions not working as expected / session keeps timing out

前端 未结 5 1870
后悔当初
后悔当初 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:51

    Travis T, I went the simplest route of all. I said

    nano /etc/cron.d/php5

    This opened the file showing the tremendously long crontab code that purges your session by default every 30 mins. The script was preceded by a #, and all I did was uncomment both lines by removing the #. So:

    #  Look for and purge old sessions every 30 minutes
    #  09, 39, *  * * *  root  @[ -x /usr/lib/php5/maxlifetime ] && [  etc 
       it's a long file.....]
    

    I just removed the 2 #'s in front of Look and 09. That's it !

提交回复
热议问题