I am using the following code to set a cookie for 30 seconds:
$value = $_GET[submit_enter];
if (! isset($_COOKIE['testit'])){
setcookie('test it',$value,time ()+30,'/');
}
What happens:
1. On the windows apache server the cookie disappears after 30 seconds
2. On the linux apache server the cookie disappears after hours????
Fact is: Servertime is localtime
Questions:
1. Does anyone know about this problem on a linux machine?
2. Do we really need the time() to set a cookie?
3. Is there a special configuration to be done (php.ini or somewhere else)?
Thank you for your help
Stefan
$value = $_GET[submit_enter];
if (! isset($_COOKIE['testit'])){
setcookie('test it',$value,time ()+30,'/');
}
What happens:
1. On the windows apache server the cookie disappears after 30 seconds
2. On the linux apache server the cookie disappears after hours????
Fact is: Servertime is localtime
Questions:
1. Does anyone know about this problem on a linux machine?
2. Do we really need the time() to set a cookie?
3. Is there a special configuration to be done (php.ini or somewhere else)?
Thank you for your help
Stefan
Comment