Reply to MSIE 6.0 refuses to send back cookie (Firefox works)

Your name:

Reply:


Posted by ticmanis on 05/16/06 09:50

Hello,

I'm having trouble getting MSIE 6.0 (running on XP SP2) to accept a
cookie which works fine in both Firefox and wget. The web server is Boa
0.94.13 (a small embedded server) using PHP 4.3.10 for CGI.

Even with the lowest security settings in MSIE there is no cookie
acceptance, and no "Cookie:" HTTP header is being sent back by MSIE.

This is the php code for a fairly minimal testcase:

<?php
ob_start();
error_reporting (E_ALL);
header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV
INT DEM
PRE"');
// Set cookie
setcookie ('test', 'test', 0, '/', '.huwag.net');
// Check if cookie exists
if (!empty($_COOKIE['test'])) {
echo "Cookies are enabled on your browser";
}
else {
echo "Cookies are <b>NOT</b> enabled on your browser";
}
?>

Here's my traffic, request then response:
--------
GET /cgi-bin/php/cookietest.php HTTP/1.1
Accept: */*
Accept-Language: de
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
..NET CLR 1.1.4322)
Host: hw50251_00000007.hannover.huwag.net
Proxy-Connection: Keep-Alive
Pragma: no-cache
--------
HTTP/1.0 200 OK
Date: Thu, 01 Jan 1970 00:17:21 GMT
Server: Boa/0.94.13
Connection: close
Content-type: text/html
X-Powered-By: PHP/4.3.10
P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM
PRE"
Set-Cookie: test=test; path=/; domain=.huwag.net

Cookies are <b>NOT</b> enabled on your browser
--------

No matter how often I reload the page, MSIE refuses to ever create a a
"Cookie:" header.

I've tried numerous things, such as putting in a header("Location:
....?set=yes") and testing with $_GET['set'] instead of requiring manual
reload; removing and changing the P3P header in all imaginable ways;
not using output buffering or flushing the buffer at various points;
setting the security slider in MSIE options to all imaginable
positions; dropping the path and/or domain part of the setcookie();
tried cookies with several different expiration times set (a few
minutes or a few days in the future, far in the future, in the past,
etc.); and a some other things I've forgot (probably to limit my
frustration ;-).

I'm getting the feeling I've missed something terribly obvious as I'm
rather new at PHP, but what is it?

I'd be very grateful for any help whatsoever. Oh and I'd gladly NOT use
MSIE, but that is not an option in this case, unfortunately.

--
Linards Ticmanis

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация