MSIE 6.0 refuses to send back cookie (Firefox works)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ticmanis@gmx.de

    MSIE 6.0 refuses to send back cookie (Firefox works)

    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($_COOKI E['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_0000000 7.hannover.huwa g.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.n et

    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("Locatio n:
    ....?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

  • lawrence k

    #2
    Re: MSIE 6.0 refuses to send back cookie (Firefox works)


    ticmanis@gmx.de wrote:[color=blue]
    > 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.
    >[/color]

    I don't have an answer but I had a similar problem yesterday. I logged
    into the site that I'm building. I was logged out with each page. I
    could not surf from one page to another, I was constantly kicked out.
    The site uses sessions. Nothing had changed from the day before. I was
    using FireFox. My browser was set to accept cookies. My browser was not
    working with the session info. My co-worker, sitting right next to me,
    using the same version of FireFox, was having no trouble with the site.


    Today I logged back in. The problem was gone. The session-handling code
    has not been changed. I'm using the same computer, the same FireFox
    browser. Yesterday it did not work, today it worked as well as my co
    workers.

    Odd, to say the least.

    Comment

    Working...