0

i am using php with symfony 2 framework and IIS has the web server . In my config file i have added the following code for timeout .

  session:
       cookie_lifetime: 36000 //time out is 10 hours

So if the cookie is disabled in user's machine will it affect the timeout or is cookie enabling really needed to timeout to work. I am trying to add a timeout of 10 hrs for user if they have left the application idle. Any feedback would be really helpfull. Thanks

user3290807
  • 381
  • 1
  • 5
  • 23
  • 1
    I'm not sure what you're asking. Does `cookie_lifetime` not work? – sjagr Feb 05 '15 at 20:36
  • my concern is if the cookies are disabled on user's machine will this approach work and user session will not timeout atleast for 10 hrs – user3290807 Feb 06 '15 at 00:05
  • No - user sessions won't work at all if the user disables cookies. [See here](http://stackoverflow.com/questions/12572134/php-sessions-with-disabled-cookies-does-it-work) – sjagr Feb 06 '15 at 03:11

1 Answers1

0

In yuor case it's important to know details about what a cookie is (also it is interesting to understand about server side sessions).

Cookie -> Client side. Session -> Server side.

http://www.phpcubes.com/what-is-the-difference-between-session-and-cookies.html

Cookies are client-side and depends on client browser configuration.

About Symfony cookie handling, check this post:

Read and Write Cookie in Symfony2

I hope it will be useful for you.

Community
  • 1
  • 1
manuelbcd
  • 3,106
  • 1
  • 26
  • 39