IE setcookie BUG?

Jack quiet_celt at yahoo.com
Wed Jun 15 18:17:47 CDT 2005


Alright. This is funky. Not sure if it's me, the
webserver configuration or IE. Or maybe IO'm just
plain crazy.

Here's my code starting from the first line of the
file. 

<?php
 // this line works and sets a session cookie
 $didset0=setcookie('user0','goliath');
 $emailid =  $_POST['emailid'];
 $ckyexp=mktime() + 1800;
 $ckyexp3=mktime() + 4886;
 // this line works in Mozilla but not IE
 $didset=setcookie("ssid",$emailid,time()+1800); 
 // ditto
 $didset2=setcookie('user','floyd',$ckyexp);
 // this line works in both
 // any number below 4881 won't set the cookie
 // even though 1800 should set it for 30 minutes from
 // now
 $didset3=setcookie('user3','floyd3',$ckyexp3);
 // this is just a bit shy of the maxint value and
 // works for both
 $didset4=setcookie('user4','floyd4',2147483646);
...

My question is has anyone else run up against this?
Why, is this happening? Actually some of my numbers
may be off the two computers were off by 20 minutes.
Fixing the clocks allowed my to push the value down to
4800 or better so 20 minutes on Windows is >= 81 in
$ckyexp3. THis is a bit of a pain as I would like the
cookie to expire after 1/2 hour, not 1 1/2 hours.  Any
have any ideas why this is and/or how to fix it?

Thanks,

Brian Densmore

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Kclug mailing list