Re: [nyphp-talk] cookies and experiation

2011-07-10 Thread Margaret Waldman
So will the world come to an end or will it just weed out the big boys from the little boys? Now, I know I’m in trouble. I finally saw Hans message. From: John Campbell Sent: Sunday, July 10, 2011 10:57 PM To: NYPHP Talk Subject: Re: [nyphp-talk] cookies and experiation The reason you

Re: [nyphp-talk] cookies and experiation

2011-07-10 Thread Margaret Waldman
I guess I reinvented the wheel. Hey, John. From: John Campbell Sent: Sunday, July 10, 2011 10:57 PM To: NYPHP Talk Subject: Re: [nyphp-talk] cookies and experiation The reason you cannot add 125 years is the 2038 problem. A simple solution is to set the expiration date to Jan 1, 2038

Re: [nyphp-talk] cookies and experiation

2011-07-10 Thread John Campbell
ows ‘95 on it and > surfed the web. Granted it was slowed than you can imagine ... > > *From:* Jim Yi > *Sent:* Sunday, July 10, 2011 10:44 AM > *To:* NYPHP Talk > *Subject:* Re: [nyphp-talk] cookies and experiation > > PHP has some useful predefined constants, particu

Re: [nyphp-talk] cookies and experiation

2011-07-10 Thread Margaret Waldman
Jim, I used the at 386 from ‘90-‘04. I even put Windows ‘95 on it and surfed the web. Granted it was slowed than you can imagine ... From: Jim Yi Sent: Sunday, July 10, 2011 10:44 AM To: NYPHP Talk Subject: Re: [nyphp-talk] cookies and experiation PHP has some useful predefined constants

Re: [nyphp-talk] cookies and experiation

2011-07-10 Thread Margaret Waldman
well not of brower specific, but I’ve had several computers crash so I’m fully aware that most no one will be using that cookie in 68 years.lol From: Jim Yi Sent: Sunday, July 10, 2011 10:44 AM To: NYPHP Talk Subject: Re: [nyphp-talk] cookies and experiation PHP has some useful predefined

Re: [nyphp-talk] cookies and experiation

2011-07-10 Thread Margaret Waldman
Talk Subject: Re: [nyphp-talk] cookies and experiation PHP has some useful predefined constants, particularly PHP_INT_MAX in this case (http://php.net/manual/en/reserved.constants.php). What you should really be doing while setting the cookie is ignoring time() completely, and just set the

Re: [nyphp-talk] cookies and experiation

2011-07-10 Thread Jim Yi
PHP has some useful predefined constants, particularly PHP_INT_MAX in this case (http://php.net/manual/en/reserved.constants.php). What you should really be doing while setting the cookie is ignoring time() completely, and just set the expiration time to the maximum size of an integer. setcooki

Re: [nyphp-talk] cookies and experiation

2011-07-10 Thread Margaret Waldman
My calcs/prog show 2147483647 really is the biggest int From: Margaret Waldman Sent: Sunday, July 10, 2011 9:56 AM To: NYPHP Talk Subject: [nyphp-talk] cookies and experiation I wanted to create a cookie that basically never expires. time() + x We can live to say 100 or so, so say 125 years

[nyphp-talk] cookies and experiation

2011-07-10 Thread Margaret Waldman
I wanted to create a cookie that basically never expires. time() + x We can live to say 100 or so, so say 125 years expiration would be good. time() + 394470 But that number is too big. Intval says on a 32 bit machine max is 2147483647. So 2147483647 – time() = 4294967294, which is bigger