I'm currently working on a perl script which needs to store cookies to retain user preferences. For some reason, I can't get it to work (not fully at least).
Can you please give me some hints bcs I cant see the problem anymore.
Here's my code:
use CGI::Carp qw(fatalsToBrowser);
my $Cgi = new CGI;
my $Cookie = CGI::Cookie->new(
-name => 'test',
-value => 'abc',
-expires => '+2d'
print $Cgi->header(-cookie => $Cookie);
So here are my test results:
Elinks (text web browser under debian): OK
Internet explorer 8: NOK
Sniffing the actual response traffic to IE8/Firefox with wireshark shows the cookie but it is not taken into account. Changed the security settings on both web browser to almost none but still not accepted....
I played around with all kinds of cookie settings but it doesn't work. The only thing I still thought was that I'm currently working with a fake test domain name which is in the localhost file (I use vmware / apache / mod_perl with virtual hosting). So there's "www.websitea.be" in my hosts file (both on server and client). so I tried to change the domain name to something official like yahoo.com but it doesnt work.
I also use NTP to sync date & time so that there can't be any problem with the expiration of the cookies...
I'm almost desperate. wasted some hours on this already
Thx for you help