Looking at the php documentation on setting a cookie I see that I can set an expiration date for the cookie. You can set the cookie to expire at the end of the browser session or at some time in the future but I do not see a way to set the cookie to never expire. Is this even possible and how is this accomplished?
I believe that there isn't a way to make a cookie last forever, but you just need to set it to expire far into the future, such as the year 2100.
Setting the expire time to ten years or so and resetting the cookie every time they access the page should do it, for all intents and purposes.
But as sAc said, it's probably bad practice to.
You shouldn't do that and that's not possible anyway, If you want you can set a greater value such as 10 years ahead.
By the way, I have never seen a cookie with such requirement :)
You're asking the wrong question. There is no way to set a cookie to not expire; This is not a PHP limitation, it's just not part of the specification for cookies (http://www.faqs.org/rfcs/rfc2965.html).
Your best bet is to use a date far in the future. I doubt you really still need your cookie in 20 years.
While that isn't exactly possible you could do something similar to what Google does and set your cookie to expire Jan 17, 2038 or something equally far off.
In all practicality you might be better off setting your cookie for 10 years or 60*60*24*365*10, which should outlive most of the machines your cookie will live on.