Re: Why does this not work??

From: Date: Mon, 22 Apr 2002 22:40:36 +0000
Subject: Re: Why does this not work??
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-94082@lists.php.net to get a copy of this message
At 10:28 PM +0000 22/4/02, Jeffrey Means wrote: >In using the setcookie function I can not set a cookie if I specify a time >period. ie. setcookie("Cookie_Name", "Cookie_Value", time()+30); will not >set a cookie, but setcookie("Cookie_Name", "Cookie_Value"); does work. What >am I dooing wrong?? 30 seconds is a mighty short cookie age. Are the clocks on the workstation and server in synch? I suggest your server clock is more than 30 seconds faster than your workstation clock, and the cookie is being set in the past. Cookie expiry times less than an hour can cause problems in time zones which have daylight savings. I always use 2 hours as a minimum. ...R.

« previous php.general (#94082) next »